Skip to content

fix(deps): update dependency @noble/curves to v2 - #159

Open
renovate[bot] wants to merge 1 commit into
devfrom
renovate/noble-curves-2.x
Open

renovate[bot] wants to merge 1 commit into
devfrom
renovate/noble-curves-2.x

Conversation

@renovate

@renovate renovate Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@noble/curves (source) ^1.9.2^2.3.0 age confidence

Release Notes

paulmillr/noble-curves (@​noble/curves)

v2.3.0

Compare Source

Security & constant-timeness

  • Hardened constant-time execution from best-effort to actual guarantees: no measurable timing behavior on 200K samples. Scalar multiplication now uses secret-scalar blinding via CSPRNG, un-precomputed points now use a constant-time fixed-window multiply instead of variable-time fallbacks, and modular arithmetic helpers were hardened. New CT benchmarks track timing behavior.
  • General hardening across all modules
  • Fixes from the Trail of Bits review: recovered ECDSA signatures are now bound to their recovery id, non-canonical BLS signature encodings are rejected, Edwards <-> Montgomery conversion helpers were corrected, and FROST DKG round-2 retry handling was hardened.
X25519 hardening

It was possible to execute a remote timing attack on X25519, across many samples, and learn up to 4.036 bits of long-term private key. Other 247 bits were NOT affected.

The impact: mainly fingerprinting (recognition of key across deployments), NOT key recovery, NOT X25519 breakage. Maintainer was also not able to escalate to co-residency (SMT).

Reported and found by:

  • George Stergiopoulos, Department of Informatics, Athens University of Economics and Business, Greece (geostergiop@aueb.gr)
  • Constantinos Patsakis, Department of Informatics, University of Piraeus, 80 Karaoli & Dimitriou str., 18534 Piraeus, Greece (kpatsak@unipi.gr)

Performance

  • ECDSA/EdDSA verification up to +32%, Weierstrass ECDH up to +19%, x25519 getPublicKey 2.7×
  • BLS signatures 2x
  • Init time (first getPublicKey or sign) reduced ~2x for ed25519, p256, p384, p521
  • Also faster verification of recovered signatures, pairing tower / FFT / Pippenger optimizations, and joint-MSM paths in FROST and OPRF
  • getPublicKey / sign got slower because we've decreased window size (W=8 => W=6) and hardened CT execution (see above). Long-running apps that prefer 2.2.0-level speed can restore it with one line: secp256k1.Point.BASE.precompute(8) (likewise for other curves).

Misc

  • Smaller bundles: improved tree-shaking across modules
  • Better error messages and type checks
  • Upgrade noble-hashes to 2.3.0, with performance boost
  • Reduce on-disk size 1831kb → 1548kb (-282kb) by disabling source maps (they became less relevant).

Full Changelog: paulmillr/noble-curves@2.2.0...2.3.0

v2.2.0

Compare Source

  • March 2026 self-audit (all files): no major issues found
    • Audited for spec compliance and security
    • ed25519: make zip215 verification logic match spec more strictly (spec vectors were not enough)
    • ed448: turn off zip215 mode by default, use stricter one
    • schnorr: reduce rand by mod N instead of throwing
    • math: hardening of sqrt
    • babyjubjub: use correct curve and curve params
    • der: improve parsing
    • bls: improve point decoding
    • bls, bn: Fix Fp6 / Fp12 order
    • hash-to-curve: empty dst / count now throws
    • Apply Object.freeze to most primitives
    • Other minor hardening
  • Fix all Byte Array types, to ensure proper work in both TypeScript 5.6 & TypeScript 5.9+
    • TS 5.6 has Uint8Array, while TS 5.9+ made it generic Uint8Array<ArrayBuffer>
    • This creates incompatibility of code between versions
    • Previously, it was hard to use and constantly emitted errors similar to TS2345
    • See typescript#62240 for more context
  • Implement FROST threshold signatures from RFC 9591
  • Fix compilation issues on TypeScript v6
  • Improve tree-shaking, reduce bundle sizes
  • Add massive amounts of documentation everywhere

(We're skipping v2.1, to align with other noble packages)

Full Changelog: paulmillr/noble-curves@2.0.1...2.2.0

v2.0.1

Compare Source

  • Disable extension-less imports. If you've used /ed25519, switch to /ed25519.js now. See 2.0.0 for more details.
  • package.json: specify exported submodules to ensure typescript autocompletion
  • package.json: bump hashes to 2.0.1 with scrypt & pkg.json changes
  • ed25519: export map_to_curve_elligator2_curve25519 #​211
  • bls: try-catch pairingBatch in bls12_381.verify() by @​MegaManSec in #​212
  • fft: expose extra info in rootsOfUnity

New Contributors

GitHub Immutable Releases

This GH release does not include standalone noble-curves.js: use 2.0.0 for now, until we upgrade to newly added Immutable Releases

Full Changelog: paulmillr/noble-curves@2.0.0...2.0.1

v2.0.0

Compare Source

High-level

v2 massively simplifies internals, improves security, reduces bundle size and lays path for the future. To simplify upgrading, upgrade first to curves 1.9.x. It would show deprecations in vscode-like text editor.

  • The package is now ESM-only. ESM can finally be loaded from common.js on node v20.19+
    • Node v20.19 is now the minimum required version
    • Package imports now work correctly in bundler-less environments, such as browsers
    • Reduces npm package size (traffic consumed): 354KB => 300KB
    • Reduces unpacked npm size (on-disk space): 2.1MB => 1.2MB
  • Make bundle sizes smaller, compared to v1.x: -4KB for schnorr, -5.3KB for ristretto255, -9.4KB for x448
  • .js extension must be used for all modules
    • Old: @noble/curves/ed25519
    • New: @noble/curves/ed25519.js
    • This simplifies working in browsers natively without transpilers
New features
  • webcrypto: create friendly noble-like wrapper over built-in WebCrypto
  • oprf: implement RFC 9497 OPRFs (oblivious pseudorandom functions)
    • We support p256, p384, p521, ristretto255 and decaf44
  • weierstrass, edwards: add isValidSecretKey, isValidPublicKey
  • misc: add Brainpool curves: brainpoolP256r1, brainpoolP384r1, brainpoolP512r1
Changes
  • Most methods now expect Uint8Array, string hex inputs are prohibited
    • The change simplifies reasoning, improves security and reduces malleability
    • Point.fromHex now expects string-only hex inputs, use Point.fromBytes for Uint8Array
  • Breaking changes of ECDSA (secp256k1, p256, p384...):
    • sign, verify: Switch to prehashed messages. Instead of
      messageHash, the methods now expect unhashed message.
      To bring back old behavior, use option {prehash: false}
    • sign, verify: Switch to lowS signatures by default.
      This change doesn't affect secp256k1, which has been using lowS since beginning.
      If you tested against specific sign / verify vectors, upgrading to v2 would fail, unless old behavior is brought back.
      To bring back old behavior, use option {lowS: false}
    • sign, verify: Switch to Uint8Array signatures (format: 'compact') by default.
    • verify: der format must be explicitly specified in {format: 'der'}.
      This reduces malleability
    • verify: prohibit Signature-instance signature. User must now always do
      signature.toBytes()
  • Breaking changes of BLS signatures (bls12-381, bn254):
    • Move getPublicKey, sign, verify, signShortSignature etc into two new namespaces:
      bls.longSignatures (G1 pubkeys, G2 sigs) and bls.shortSignatures (G1 sigs, G2 pubkeys).
    • verifyBatch now expects array of inputs {message: ..., publicKey: ...}[]
  • Curve changes:
    • Massively simplify curve creation, split it into point creation & sig generator creation
    • New methods are weierstrass() + ecdsa() / edwards() + eddsa()
    • weierstrass / edwards expect simplified curve params (Fp became p)
    • ecdsa / eddsa expect Point class and hash
    • Remove unnecessary Fn argument in pippenger
  • modular changes:
    • Field#fromBytes() now validates elements to be in 0..order-1 range
  • Upgrade typescript compilation env to ts5.9 and es2022
  • Massively improve error messages, make them more descriptive
Renamings
  • Module changes
    • p256, p384, p521 modules have been moved into nist
    • jubjub module has been moved into misc
  • Point changes
    • ExtendedPoint, ProjectivePoint => Point
    • Point coordinates (projective / extended) from px/ex, py/ey, pz/ez, et => X, Y, Z, T
    • Point.normalizeZ, Point.msm => separate methods in abstract/curve.js submodule
    • Point.fromPrivateKey() got removed, use Point.BASE.multiply() and Point.Fn.fromBytes(secretKey)
    • toRawBytes, fromRawBytes => toBytes, fromBytes
    • RistrettoPoint => ristretto255.Point, DecafPoiont => decaf44.Point
  • Signature (ECDSA) changes
    • toCompactRawBytes, toDERRawBytes => toBytes('compact'), toBytes('der')
    • toCompactHex, toDERHex => toHex('compact'), toHex('der')
    • fromCompact, fromDER => fromBytes(format), fromHex(format)
  • utils changes
    • randomPrivateKey => randomSecretKey
    • utils.precompute, Point#_setWindowSize => Point#precompute
    • edwardsToMontgomery => utils.toMontgomery
    • edwardsToMontgomeryPriv => utils.toMontgomerySecret
  • Rename all curve-specific hash-to-curve methods to *curve*_hasher.
    Example: secp256k1.hashToCurve => secp256k1_hasher.hashToCurve()
  • Massive type renamings and improvements
Removed features
  • Point#multiplyAndAddUnsafe, Point#hasEvenY
  • CURVE property with all kinds of random stuff. Point.CURVE() now replaces it, but only provides
    curve parameters
  • Remove pasta, bn254_weierstrass (NOT pairing-based bn254) curves
  • Field.MASK
  • utils.normPrivateKeyToScalar

Full Changelog: paulmillr/noble-curves@1.9.6...2.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 12pm on Sunday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from Dougley as a code owner May 10, 2026 04:48
@renovate
renovate Bot force-pushed the renovate/noble-curves-2.x branch from 3c70330 to 949cf36 Compare July 18, 2026 23:21
@renovate
renovate Bot force-pushed the renovate/noble-curves-2.x branch from 949cf36 to c17d5c9 Compare August 6, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants