Skip to content

build(deps): bump @noble/curves from 1.9.7 to 2.4.0 - #357

Merged
rz1989s merged 4 commits into
mainfrom
dependabot/npm_and_yarn/noble/curves-2.2.0
Sep 23, 2026
Merged

rz1989s merged 4 commits into
mainfrom
dependabot/npm_and_yarn/noble/curves-2.2.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Bumps @noble/curves from 1.9.7 to 2.4.0.

Release notes

Sourced from @​noble/curves's releases.

2.4.0

  • Harden FROST distributed key generation against round-one transcript substitution.
    • This is not a vulnerability; it's protection against those who don't follow the FROST spec. Spec wants user to preserve rounds.
  • FROST: Enforced RFC 9591 point validation for BLS and BN
  • POPRF: replace inversion with const-time version
  • Weierstrass: harden public-key boundaries & infinity handling
    • ECDH and ECDSA now reject the identity even for point types whose generic codec permits it
    • Curves that disallow infinity cannot encode it, while opted-in curves use the canonical SEC 1 0x00 encoding.
  • DER: Bounded ECDSA signature and INTEGER sizes before bigint conversion, preventing malformed inputs from causing disproportionate parsing and allocation work
  • Snapshot all security-sensitive state (passed arguments) to ensure it can't be mutated

Special thanks to Red Team (Rob Hamilton, CalleBTC, Omer Talip) and 1Password's Off-by-1 Labs.

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

2.3.0

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

... (truncated)

Changelog

Sourced from @​noble/curves's changelog.

2.4.0 (2026-08-27)

  • Harden FROST distributed key generation against round-one transcript substitution.
    • This is not a vulnerability; it's protection against those who don't follow the FROST spec. Spec wants user to preserve rounds.
  • FROST: Enforced RFC 9591 point validation for BLS and BN
  • POPRF: replace inversion with const-time version
  • Weierstrass: harden public-key boundaries & infinity handling
    • ECDH and ECDSA now reject the identity even for point types whose generic codec permits it
    • Curves that disallow infinity cannot encode it, while opted-in curves use the canonical SEC 1 0x00 encoding.
  • DER: Bounded ECDSA signature and INTEGER sizes before bigint conversion, preventing malformed inputs from causing disproportionate parsing and allocation work
  • Snapshot all security-sensitive state (passed arguments) to ensure it can't be mutated

Special thanks to Red Team (Rob Hamilton, CalleBTC, Omer Talip) and 1Password's Off-by-1 Labs.

2.3.0 (2026-08-06)

Security and constant-timeness

  • Hardened constant-time execution from best-effort to actual guarantees, with no measurable timing behavior across 200,000 samples. Scalar multiplication now uses secret-scalar blinding via CSPRNG, unprecomputed points use a constant-time fixed-window multiply instead of variable-time fallbacks, and modular arithmetic helpers were hardened. New constant-time benchmarks track timing behavior.
  • General hardening across all modules.
  • Applied 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-to-Montgomery conversion helpers were corrected, and FROST DKG round-two 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 a long-term private key. The other 247 bits were not affected.

The impact is primarily fingerprinting—a key can be recognized across deployments—not key recovery or a break of X25519. The maintainer was also unable to escalate the attack 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 Street, 18534 Piraeus, Greece (kpatsak@unipi.gr).

Performance

  • Improved ECDSA and EdDSA verification by up to 32%, Weierstrass ECDH by up to 19%, and X25519 getPublicKey by 2.7×.
  • Improved BLS signature performance by 2×.
  • Reduced initialization time for the first getPublicKey or sign call by approximately 2× for Ed25519, P-256, P-384, and P-521.
  • Also improved verification of recovered signatures, pairing tower, FFT, and Pippenger performance, as well as joint-MSM paths in FROST and OPRF.
  • getPublicKey and sign became slower because the window size was decreased from 8 to 6 and constant-time execution was hardened. Long-running applications that prefer 2.2.0-level speed can restore it with secp256k1.Point.BASE.precompute(8), and likewise for other curves.

Miscellaneous

  • Improved tree-shaking for smaller bundles.
  • Improved error messages and type checks.
  • Upgraded noble-hashes to 2.3.0 for improved performance.
  • Reduced on-disk size from 1,831 KB to 1,548 KB by disabling source maps, which have become less relevant.

2.2.0 (2026-04-12)

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for @​noble/curves since your current version.


Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jun 29, 2026
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sipher Ready Ready Preview Sep 23, 2026 11:13pm UTC

@rz1989s

rz1989s commented Sep 22, 2026

Copy link
Copy Markdown
Member

@dependabot rebase

Bumps [@noble/curves](https://github.com/paulmillr/noble-curves) from 1.9.7 to 2.4.0.
- [Release notes](https://github.com/paulmillr/noble-curves/releases)
- [Changelog](https://github.com/paulmillr/noble-curves/blob/main/CHANGELOG.md)
- [Commits](paulmillr/noble-curves@1.9.7...2.4.0)

---
updated-dependencies:
- dependency-name: "@noble/curves"
  dependency-version: 2.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title build(deps): bump @noble/curves from 1.9.7 to 2.2.0 build(deps): bump @noble/curves from 1.9.7 to 2.4.0 Sep 22, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/noble/curves-2.2.0 branch from 76e9a82 to 8ba9ec9 Compare September 22, 2026 04:02
…rn/noble/curves-2.2.0

# Conflicts:
#	pnpm-lock.yaml
Lockfile side (2.4.0) was already in place; this completes the code
migration required by the 1.9.7 -> 2.4.0 breaking changes:

- import paths: @noble/curves/ed25519 -> @noble/curves/ed25519.js
  (2.x exports map ships only .js-suffixed subpaths) — 9 sites
- ExtendedPoint -> Point (2.x rename) — transfer.ts, sdk privacy.ts
- ExtendedPoint.fromHex(bytes) -> Point.fromBytes(bytes)
  (2.x fromHex is string-only; 1.9.7 silently coerced Uint8Array) —
  sdk privacy.ts + privacy.test.ts
- point.toRawBytes() -> point.toBytes() (toRawBytes removed in 2.x)
- ed25519.utils.randomPrivateKey() -> randomSecretKey() — auth.test.ts

Crypto parity verified 1.9.7 vs 2.4.0 on fixed inputs (RFC 8032 TEST 1
vector, deterministic sign, verify incl. tampered/wrong-key negatives,
BASE.multiply scalar path, ECDH sharedSecret + viewTag stealth flow,
round-trip, strict zip215=false vs zip215 decode): all 18 outputs
byte-identical.
@rz1989s

rz1989s commented Sep 23, 2026

Copy link
Copy Markdown
Member

Code migration to @noble/curves 2.x (completes the lockfile bump)

The lockfile side (2.4.0, frozen-install-proofed) was already on this branch. Pushed 36c3ca0 migrates the code per the 2.0.0 breaking changes:

Breaking change Fix Sites
.js-suffixed exports-map subpaths only @noble/curves/ed25519 → @noble/curves/ed25519.js 9 import sites
ExtendedPoint → Point renamed transfer.ts:194, sdk privacy.ts:353, privacy.test.ts:414
Point.fromHex is string-only ExtendedPoint.fromHex(bytes) → Point.fromBytes(bytes) (1.9.7 silently coerced Uint8Array; 2.x would throw at runtime) privacy.ts:353, privacy.test.ts:414
toRawBytes() removed → toBytes() renamed transfer.ts:194, privacy.ts:355, privacy.test.ts:416
utils.randomPrivateKey → utils.randomSecretKey renamed agent auth.test.ts:33

Crypto parity evidence (1.9.7 vs 2.4.0, fixed inputs, byte-comparison harness)

18/18 outputs byte-identical across the API boundary:

  • getPublicKey: RFC 8032 TEST 1 vector reproduced exactly on both versions
  • deterministic sign: identical signature bytes; verify: true / tampered→false / wrong-key→false identical
  • Point.BASE.multiply(scalar) (transfer.ts stealth-key derivation path): identical 32-byte output; identity encoding 5866…6666 matches
  • ECDH stealth flow (privacy.ts: fromBytes(eph) · multiply(viewingScalar) → sha256[0] viewTag): identical shared secret + viewTag 18 / 12f6b97a
  • point encode/decode round-trip: identical
  • decode strictness: non-canonical y ≥ p rejected under default (strict) decoding and accepted under zip215: true on both versions — scanner try/catch semantics unchanged

Local gate: pnpm install --frozen-lockfile (pnpm 10) + sdk tsc build + pnpm typecheck + pnpm test -- --run → 563/563 tests in 36 files green.

e2e/fixtures/auth.ts imported the extensionless @noble/curves/ed25519
subpath, which the 2.x exports map rejects at runtime — caught by the
playwright job after the main migration (it got past the sdk build and
died in the playwright webserver). Uses getPublicKey + sign only, both
covered by the parity harness.
@rz1989s
rz1989s merged commit c67e707 into main Sep 23, 2026
8 checks passed
@rz1989s
rz1989s deleted the dependabot/npm_and_yarn/noble/curves-2.2.0 branch September 23, 2026 23:15
@rz1989s

rz1989s commented Sep 23, 2026

Copy link
Copy Markdown
Member

Addendum (83f7746): the playwright job exposed one straggler my file sweep missed — e2e/fixtures/auth.ts imported the extensionless subpath, which the 2.x exports map now rejects at runtime (not just typecheck). Fixed to @noble/curves/ed25519.js (uses only getPublicKey+sign, both parity-proven above). All checks green including playwright.

This branch was successfully deployed

1 active deployment
Preview — 83f77466 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant