@libp2p/crypto
libp2p key and crypto primitives: Ed25519, secp256k1, ECDSA P-256, P-384 and P-521, and RSA keys, ephemeral ECDH, AES-GCM, HMAC and PBKDF2.
In short
What to know.
- Algorithms
- Ed25519, ECDSA on secp256k1, ECDSA on P-256, ECDSA on P-384 and 7 more7 of 11 would be broken by a large quantum computer.
- Advisories
- 1 in the storeOSV last read 3 December 2026, 16:49 UTC.
- What to do
- Check your version against the advisories below. Each lists its affected and fixed versions. Plan a move away from Ed25519, ECDSA on secp256k1, ECDSA on P-256, ECDSA on P-384, ECDSA on P-521, RSA signatures, ECDH (Weierstrass curves) before large quantum computers exist.
1 in the store
Advisories
| Advisory | Id | Affected versions | Fixed in | Source's rating |
|---|---|---|---|---|
| libp2p: ASN.1 DER decoder drives an unbounded synchronous loop on attacker-controlled length fields, stalling the Node event loop pre-auth | GHSA-rvfr-cqwq-rc4j | before 5.1.22 | Fixed in 5.1.22 | Rated High |
1 listed
Findings
| Finding | Id | Severity | Updated |
|---|---|---|---|
| libp2p: ASN.1 DER decoder drives an unbounded synchronous loop on attacker-controlled length fields, stalling the Node event loop pre-auth | NMN-2026-0083 | Severity High | 3 December 2026 |
Reviewed 3 December 2026
Sources
- npm registry metadata for @libp2p/cryptoregistry.npmjs.orgRetrieved 3 December 2026
- @libp2p/crypto API documentationlibp2p.github.ioRetrieved 3 December 2026
- @libp2p/crypto key module sourceraw.githubusercontent.comRetrieved 3 December 2026
Full record
- Package
- @libp2p/crypto
- Ecosystem
- npm
- Role
- Toolkit
- Repository
- github.com/libp2p/js-libp2p
- Status
- Not marked deprecated by its registry or maintainers.
- Reviewed
- Entry reviewed 3 December 2026. Catalogue entry, curated by hand and incomplete by design.
- Advisories read
- Last read from OSV 3 December 2026, 16:49 UTC
- Findings
- 1 listed above.
Algorithms it provides
- Ed25519 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on secp256k1 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-256 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-384 signatureClassical public keyBroken by Shor's algorithm
- ECDSA on P-521 signatureClassical public keyBroken by Shor's algorithm
- RSA signatures signatureClassical public keyBroken by Shor's algorithm
- ECDH (Weierstrass curves) key-exchangeClassical public keyBroken by Shor's algorithm
- AES-GCM aeadSymmetricWeakened by Grover's search
- HMAC macSymmetricWeakened by Grover's search
- PBKDF2 kdfSymmetricWeakened by Grover's search
- Cryptographically strong random number generation rngOtherNot applicable
What a large quantum computer would change
- Broken by Shor's algorithmRests on factoring or discrete logarithms. A large fault-tolerant quantum computer running Shor's algorithm would break it.Ed25519, ECDSA on secp256k1, ECDSA on P-256, ECDSA on P-384, ECDSA on P-521, RSA signatures, ECDH (Weierstrass curves)
- Weakened by Grover's searchGrover's search would roughly halve its effective security. 256-bit keys and outputs stay adequate.AES-GCM, HMAC, PBKDF2
- Not applicableThe quantum question does not apply to this part.Cryptographically strong random number generation
Notes describe algorithm families, not any one project.