indutny / elliptic

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

Can I sign different messages with the same public key? #118

Closed VictorTaelin closed 7 years ago

VictorTaelin commented 7 years ago

As stated on the README, elliptic uses deterministic signatures. Doesn't that mean that k is always constant and, thus, signing two different messages with the same private key would immediately reveal it? What is the correct way to sign messages using this lib?

fanatid commented 7 years ago

@MaiaVictor check Implementation details.. k is not constant, this number generated by RFC6979

indutny commented 7 years ago

k is unique for each message+key combination.