diafygi / webcrypto-examples

Web Cryptography API Examples Demo: https://diafygi.github.io/webcrypto-examples/
GNU General Public License v2.0
1.64k stars 194 forks source link

How to recover public key with ECDSA? #37

Open RobinLinus opened 7 years ago

RobinLinus commented 7 years ago

Any suggestions on how to implement public key recovery with WebCrypto ECDSA?

How is (r,s) encoded in the output buffer of sign? Is it just r = [0,32) and s = [32,64) for curve = P-256 (docs) ?

Seams like elliptic.js implements the recovery and it should be possible to import the recovered public key via jwk back into WebCrypto ...