Skip to content

Commit 24d3110

Browse files
committed
Release 2.0.0.
1 parent 9e35456 commit 24d3110

4 files changed

Lines changed: 32 additions & 17 deletions

File tree

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -868,15 +868,29 @@ Supported node.js versions:
868868
- v2 (2025-08): v20.19+ (ESM-only)
869869
- v1 (2023-04): v14.21+ (ESM & CJS)
870870

871-
### curves v1 to curves v2
871+
### Changelog of curves v1 to curves v2
872872

873873
v2 massively simplifies internals, improves security, reduces bundle size and lays path for the future.
874874
We tried to keep v2 as much backwards-compatible as possible.
875875

876-
Submodule paths now require `.js` extension e.g. `curves/ed25519` => `curves/ed25519.js`.
877-
This allows usage in bundler-less environments without source maps
876+
To simplify upgrading, upgrade first to curves 1.9.x. It would show deprecations in vscode-like text editor.
877+
Fix them first.
878878

879-
**Logic** changes:
879+
- The package is now ESM-only. ESM can finally be loaded from common.js on node v20.19+
880+
- `.js` extension must be used for all modules
881+
- Old: `@noble/curves/ed25519`
882+
- New: `@noble/curves/ed25519.js`
883+
- This simplifies working in browsers natively without transpilers
884+
885+
New features:
886+
887+
- webcrypto: create friendly noble-like wrapper over built-in WebCrypto
888+
- oprf: implement RFC 9497 OPRFs (oblivious pseudorandom functions)
889+
- We support p256, p384, p521, ristretto255 and decaf448
890+
- weierstrass, edwards: add `isValidSecretKey`, `isValidPublicKey`
891+
- misc: add Brainpool curves: brainpoolP256r1, brainpoolP384r1, brainpoolP512r1
892+
893+
Changes:
880894

881895
- Most methods now expect Uint8Array, string hex inputs are prohibited
882896
- The change simplifies reasoning, improves security and reduces malleability
@@ -905,9 +919,9 @@ This allows usage in bundler-less environments without source maps
905919
- Remove unnecessary Fn argument in `pippenger`
906920
- modular changes:
907921
- Field#fromBytes() now validates elements to be in 0..order-1 range
908-
- Massive type renamings and improvements
922+
- Massively improve error messages, make them more descriptive
909923

910-
**Renamings:**
924+
Renamings:
911925

912926
- Module changes
913927
- `p256`, `p384`, `p521` modules have been moved into `nist`
@@ -930,8 +944,9 @@ This allows usage in bundler-less environments without source maps
930944
- edwardsToMontgomeryPriv => utils.toMontgomerySecret
931945
- Rename all curve-specific hash-to-curve methods to `*curve*_hasher`.
932946
Example: `secp256k1.hashToCurve` => `secp256k1_hasher.hashToCurve()`
947+
- Massive type renamings and improvements
933948

934-
**Removed features:**
949+
Removed features:
935950

936951
- Point#multiplyAndAddUnsafe, Point#hasEvenY
937952
- CURVE property with all kinds of random stuff. Point.CURVE() now replaces it, but only provides

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@noble/curves",
3-
"version": "2.0.0-beta.3",
3+
"version": "2.0.0",
44
"description": "Audited & minimal JS implementation of elliptic curve cryptography",
55
"files": [
66
"*.js",
@@ -11,7 +11,7 @@
1111
"src"
1212
],
1313
"dependencies": {
14-
"@noble/hashes": "2.0.0-beta.5"
14+
"@noble/hashes": "2.0.0"
1515
},
1616
"devDependencies": {
1717
"@paulmillr/jsbt": "0.4.4",

test/build/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)