libp2p/js-libp2p-crypto

Ed25519 Private Key length

Open

#200 opened on Oct 7, 2021

 (1 comment) (0 reactions) (1 assignee)TypeScript (49 forks)auto 404
P2good first issuehelp wantedstatus/ready

Repository metrics

Stars
 (79 stars)
PR merge metrics
 (PR metrics pending)

Description

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

Contributor guide