multiformats / multicodec

Compact self-describing codecs. Save space by using predefined multicodec tables.
MIT License
338 stars 202 forks source link

adds multicodec table entries for private keys of ecdsa curves #315

Closed kezike closed 1 year ago

kezike commented 1 year ago

This PR adds multicodec table entries for private keys of ecdsa curves P-256, P-384, and P-521.

rvagg commented 1 year ago

this is fine I think, but what does it mean for the private keys to be "compressed"? is there a compressed form of them and an uncompressed form that we're differentiating in the private keys?

conr2d commented 1 year ago

AFAIK a private key in ECDSA is a scalar value, and there is no compressed form unlike its corresponding public key.

kezike commented 1 year ago

Thanks for the feedback all. I only added compressed to follow the example of the other ECDSA entries (p256-pub, p384-pub, and p521-pub). I wasn't sure whether I should use it for the private keys as well. If not, I can remove it.