libp2p / js-peer-id

peer-id implementation in JavaScript. Deprecated; use https://github.com/libp2p/js-libp2p-peer-id instead.
https://github.com/libp2p/js-libp2p-peer-id
MIT License
80 stars 44 forks source link

Is there some reason Protobuf is being used? #139

Closed TJKoury closed 3 years ago

TJKoury commented 3 years ago

It seems like this library is jumping through a lot of hoops to get and set keys instead of just using raw/jwk/pem/pkcs8/spki.

Is there a technical reason for this, or is it just technical debt from being created during a time where the crypto containers were actively evolving?

aschmahmann commented 3 years ago

It's how the libp2p peerID spec is defined https://github.com/libp2p/specs/blob/d4321b94b51380a371a8f25eb82e11105afbfceb/peer-ids/peer-ids.md#peer-ids

or is it just technical debt from being created during a time where the crypto containers were actively evolving?

IMO, yes.