indutny / elliptic

Fast Elliptic Curve Cryptography in plain javascript
1.68k stars 373 forks source link

Invalid hashed data sign with EDDSA #262

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello.

I'm experimenting the EdDSA but I'm facing a issue. In the documentation it's mentioned than the data should be a hash, but if so, the signature is incorrect. Because I think the sign function hash the data again (which turns out with double hashed data).

So you should either update the doc or update the sign function, as it's leading to invalid signatures.

PS: I tried with other languages on top of openssl and the signature produces by the library matches with a double hashed data.