noble-curves

Audited & minimal JS implementation of elliptic curve cryptography.

MIT License

Downloads
9.8M
Stars
660
Committers
16

Bot releases are visible (Hide)

noble-curves - 1.6.0 Latest Release

Published by paulmillr about 2 months ago

What's Changed

  • weierstrass, edwards: add multi-scalar-multiplication using Pippenger algorithm
  • DER encoding: improve edge cases. Fixes p521 signatures
  • hash-to-curve: add more type checks
  • Export abstract/tower for pairing-friendly curves
  • Add support for node.js v14
  • Upgrade hashes to v1.5.0

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.5.0...1.6.0

noble-curves - 1.5.0

Published by paulmillr 2 months ago

  • Implement bn254 (aka alt_bn128) pairings, compatible with EVM and ZEC
    • Point serialization is not implemented (but can be added in user-space), because there is no standard way of doing it. Check out README
  • Refactor range checks for private keys and signatures, simplify them
  • Add memoization for toAffine and assertValidity, to speed-up BLS
  • Make all points immutable and frozen to improve security

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.4.2...1.5.0

noble-curves - 1.4.2

Published by paulmillr 4 months ago

  • Typescript build: revert target from ES2022 to ES2020 due to compat issues

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.4.1...1.4.2

noble-curves - 1.4.1

Published by paulmillr 4 months ago

  • bls12-381: Add mapToCurve; fix typescript types
  • ed25519, utils: Improve tree-shaking
  • Typescript build: emit separate type declarations for ESM, to improve compatibility
  • Typescript build: change target from ES2020 to ES2022

New Contributors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.4.0...1.4.1

noble-curves - 1.4.0

Published by paulmillr 7 months ago

  • Fix verification of BLS short signatures when using hex
  • Fix types in hash-to-field and weierstrass Entropy
  • Update noble-hashes to v1.4, adding support for Big-Endian platforms
  • Small utilities refactor to reduce code duplication
  • tsconfig improvements

New Contributors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.3.0...1.4.0

noble-curves - 1.3.0

Published by paulmillr 10 months ago

New Contributors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.2.0...1.3.0

noble-curves - 1.2.0

Published by paulmillr about 1 year ago

  • ed448: add decaf448 support
  • weierstrass: improve security of random private keys
    by decreasing bias from 2^-64 to 2^-curve_security_level
  • weierstrass: allow extraEntropy to take any amount of bytes
  • poseidon: improve security, make sboxPower mandatory and prohibit values other than 3, 5, 7; prohibit odd roundsFull
  • hash-to-curve: allow string and Uint8Array DSTs
  • tree-shaking improvements: add sideEffects: false to package.json,
    add pure annotations to ed25519
  • update noble-hashes to 1.3.2

New Contributors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.1.0...1.2.0

noble-curves - 1.1.0

Published by paulmillr over 1 year ago

What's Changed

  • ed25519 and ed448 verify now provide non-repudiation (Strongly Binding Signatures) when option zip215: false is used
  • Reduce common-case bundle size by 20% by using PURE annotation. It helps bundlers during tree-shaking and eliminates dead code.
    • secp256k1: 75.4kb => 62.3kb
    • ed25519: 67.5kb => 51.1kb
    • ed448: 55.1kb => 44.0kb
    • p256: 67.8kb => 59.8kb
    • p384: 75.4kb => 67.4kb
    • p521: 75.8kb => 67.8kb
  • weierstrass: sign return type was changed from SignatureType to RecoveredSignatureType
  • edwards: rename edwardsToMontgomery to edwardsToMontgomeryPub, add edwardsToMontgomeryPriv
  • bls12-381: improve friendliness to bad compilers by not using bigint literals
  • Improve friendliness to bad compilers by not using exponentiation operator with bigints
  • ed25519: fix ristrettoHash size typo in hashToCurve by @sublimator in https://github.com/paulmillr/noble-curves/pull/42
  • utils: harmonize with noble-hashes
  • utils: Fix utf8ToBytes in firefox extension context (bugzil.la/1681809)

New Contributors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/1.0.0...1.1.0

noble-curves - 1.0.0

Published by paulmillr over 1 year ago

First stable release. API should remain stable now.

ed25519, ed448: changed API

  • context is now an option in sign and verify
  • zip215 is a new verify option that allows to conform to RFC8032 when false. For true it will instead match ZIP215.
  • Added edwardsToMontgomery function

bls12-381: changed API

  • CURVE is no longer exposed, it was an internal property. Use G1.CURVE, G2.CURVE
  • Fields have been moved into fields: {Fp, Fp2, Fp6, Fp12, Fr} property
  • See README for new usage

weierstrass: improved DER decoding. Validate curve creation
Updated Wycheproof vectors to v0.9
hash-to-curve: restrict expand to xmd and xof

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.9.1...1.0.0

noble-curves - 0.9.1

Published by paulmillr over 1 year ago

  • Fix React Native like environments: remove bigint literals
  • weierstrass, edwards: make points expose typescript x, y
  • edwards: add toRawBytes to typescript type

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.9.0...0.9.1

noble-curves - 0.9.0

Published by paulmillr over 1 year ago

  • CURVE.P is now CURVE.p
  • abstract/modular: Fp is now Field
  • weierstrass: simplified weierstrassPoints initialization

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.8.3...0.9.0

noble-curves - 0.8.3

Published by paulmillr over 1 year ago

Update hashes and devDependencies

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.8.2...0.8.3

noble-curves - 0.8.2

Published by paulmillr over 1 year ago

  • Common.js support has been brought back
  • Stark curve extracted into a separate package

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.8.1...0.8.2

noble-curves - 0.8.1

Published by paulmillr over 1 year ago

Invalid release, re-published as 0.8.2

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.8.0...0.8.1

noble-curves - 0.8.0

Published by paulmillr over 1 year ago

  • ESM-only; remove support for common.js modules
  • ECDSA: remove scalar blinding
  • Stark: more methods
  • secp256k1: Fix schnorrGetExtPubKey y coordinate
  • secp256k1 Schnorr: remove getExtendedPublicKey
  • ristretto255: fix equality testing

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.7.3...0.8.0

noble-curves - 0.7.3

Published by paulmillr over 1 year ago

  • hash-to-curve improvements

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.7.2...0.7.3

noble-curves - 0.7.2

Published by paulmillr over 1 year ago

  • Move p192, p224 from main pkg
  • montgomery: add randomPrivateKey

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.7.1...0.7.2

noble-curves - 0.7.1

Published by paulmillr over 1 year ago

Montgomery improvements

noble-curves - 0.7.0

Published by paulmillr over 1 year ago

  • Move output from lib to root. React Native does not support pkg.json#exports
  • drbg: move from weierstrass to utils
  • improve hex errors

Full Changelog: https://github.com/paulmillr/noble-curves/compare/0.6.4...0.7.0

noble-curves - 0.6.4

Published by paulmillr over 1 year ago