libp2p/js-libp2p-crypto

Ed25519 Private Key length

Aperta

#200 aperta il 7 ott 2021

 (1 commento) (0 reazioni) (1 assegnatario)TypeScript (49 fork)auto 404
P2good first issuehelp wantedstatus/ready

Metriche repository

Star
 (79 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Constructing a new Ed25519 key by passing a 32 byte Uint8Array should be allowed. I assume this check is due to the convention of passing in private & public concatenated, would be nice to detect a 32 byte key per the spec.

I could work on a pull if this is of interest to anyone else.

https://github.com/libp2p/js-libp2p-crypto/blob/a99f419f7904317271c3d0eb6f8eb31e69d3f9b5/src/keys/ed25519-class.js#L44

Guida contributor