python-ecdsa icon indicating copy to clipboard operation
python-ecdsa copied to clipboard

Edwards curves are not compatible with ECDH

Open Sarkoxed opened this issue 1 year ago • 1 comments

After trying to initialize ECDH with Ed25519 and compute a shared secret it returns the following error:

AttributeError: 'PrivateKey' object has no attribute 'secret_multiplier'

I believe it's called __s in eddsa.PrivateKey class.

Sarkoxed avatar Oct 04 '24 23:10 Sarkoxed

yes, because that's Ed25519, ECDH operation over Curve25519 is X25519, that's not implemented.

it's documented in the README.md:

Key generation, siging and verifying is also supported for Ed25519 and Ed448 curves.

tomato42 avatar Oct 04 '24 23:10 tomato42