Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ctypes instead of python bindings #4

Open
ecdsa opened this issue Jun 8, 2024 · 1 comment
Open

use ctypes instead of python bindings #4

ecdsa opened this issue Jun 8, 2024 · 1 comment

Comments

@ecdsa
Copy link

ecdsa commented Jun 8, 2024

Hello, I am the creator of Electrum.
We noticed that you recently decided to use coincurve instead of secp256k1, so this project seems to be alive :-)

We would like to use nostr in Electrum, in order to let users advertise services.
aionostr looks like a good candidate. I currently use it in this branch:
https://github.com/spesmilo/electrum/tree/swaps_over_nostr

One issue is that aionostr currently pulls too many dependencies (coincurve, cffi, asn1crypto, pycparser).
We do not like to add dependencies because of potential security issues.

In order to avoid this, Electrum uses libsecp256k1 without python bindings.
Instead, we use ctypes, which is part of the python standard library:

Would you be willing to replace coincurve with ctypes in aionostr?
We could try to create a standalone package from our ecc.py and ecc_fast.py modules, to be used by your project.
One caveat is that this package would need to build and install libsecp256k1, if you do not want users to install it themselves.

@ecdsa
Copy link
Author

ecdsa commented Oct 2, 2024

Here is a pure python packages that allows to use libsecp256k1:
https://github.com/spesmilo/electrum-ecc

And here is a fork of aionostr that uses electrum-ecc in place of coincurve:
https://github.com/spesmilo/aionostr/tree/electrum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant