We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to sign with EDDSA as below returns me an Exception. Is there someone who can explain what I do wrong?
(I'm using 1.2.5 on python3 3.7.5)
from ecpy.curves import Curve,Point from ecpy.keys import ECPublicKey, ECPrivateKey from ecpy.eddsa import EDDSA from ecpy.ecrand import rnd from hashlib import blake2b curve = Curve.get_curve('Curve25519') # Montgomery with size 256 priv_key = rnd(curve.order) pv_key = ECPrivateKey(priv_key, curve) hasher = blake2b() signer = EDDSA(hasher) sig = signer.sign(b'Lorem ipsu', pv_key) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/francis/dev/projects/edge/venv37-imx/lib/python3.7/site-packages/ecpy/eddsa.py", line 118, in sign return self._do_sign(msg, pv_key) File "/home/francis/dev/projects/edge/venv37-imx/lib/python3.7/site-packages/ecpy/eddsa.py", line 125, in _do_sign size = curve._coord_size() File "/home/francis/dev/projects/edge/venv37-imx/lib/python3.7/site-packages/ecpy/curves.py", line 120, in __getattr__ raise AttributeError(name) AttributeError: _coord_size
I assume one has to use the Ed25519 instead of Curve25519 ...
The text was updated successfully, but these errors were encountered:
This project does EdDSA with Ed25519 and blake2b correctly: https://github.com/Matoking/python-ed25519-blake2b
Sorry, something went wrong.
You cannot use 'Curve25519' with eddsa, you have to use 'Ed25519' Curve25519 is for DH, Ed25519 is for signing. I should add a check in the builder.
Curve25519
Ed25519
No branches or pull requests
Trying to sign with EDDSA as below returns me an Exception.
Is there someone who can explain what I do wrong?
(I'm using 1.2.5 on python3 3.7.5)
I assume one has to use the Ed25519 instead of Curve25519 ...
The text was updated successfully, but these errors were encountered: