@noble/curves 2.0.0-beta.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -326,6 +326,9 @@ import { p256 } from './src/webcrypto.ts';
326
326
  })();
327
327
  ```
328
328
 
329
+ Check out [micro-key-producer](https://github.com/paulmillr/micro-key-producer) for
330
+ pure JS key conversion utils.
331
+
329
332
  ### BLS signatures, bls12-381, bn254 aka alt_bn128
330
333
 
331
334
  ```ts
@@ -747,7 +750,7 @@ NIST prohibits classical cryptography (RSA, DSA, ECDSA, ECDH) [after 2035](https
747
750
  ## Speed
748
751
 
749
752
  ```sh
750
- npm run bench:install && npm run bench
753
+ npm run bench
751
754
  ```
752
755
 
753
756
  noble-curves spends 10+ ms to generate 20MB+ of base point precomputes.
@@ -865,15 +868,29 @@ Supported node.js versions:
865
868
  - v2 (2025-08): v20.19+ (ESM-only)
866
869
  - v1 (2023-04): v14.21+ (ESM & CJS)
867
870
 
868
- ### curves v1 to curves v2
871
+ ### Changelog of curves v1 to curves v2
869
872
 
870
873
  v2 massively simplifies internals, improves security, reduces bundle size and lays path for the future.
871
874
  We tried to keep v2 as much backwards-compatible as possible.
872
875
 
873
- Submodule paths now require `.js` extension e.g. `curves/ed25519` => `curves/ed25519.js`.
874
- 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.
878
+
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
875
892
 
876
- **Logic** changes:
893
+ Changes:
877
894
 
878
895
  - Most methods now expect Uint8Array, string hex inputs are prohibited
879
896
  - The change simplifies reasoning, improves security and reduces malleability
@@ -902,9 +919,9 @@ This allows usage in bundler-less environments without source maps
902
919
  - Remove unnecessary Fn argument in `pippenger`
903
920
  - modular changes:
904
921
  - Field#fromBytes() now validates elements to be in 0..order-1 range
905
- - Massive type renamings and improvements
922
+ - Massively improve error messages, make them more descriptive
906
923
 
907
- **Renamings:**
924
+ Renamings:
908
925
 
909
926
  - Module changes
910
927
  - `p256`, `p384`, `p521` modules have been moved into `nist`
@@ -927,8 +944,9 @@ This allows usage in bundler-less environments without source maps
927
944
  - edwardsToMontgomeryPriv => utils.toMontgomerySecret
928
945
  - Rename all curve-specific hash-to-curve methods to `*curve*_hasher`.
929
946
  Example: `secp256k1.hashToCurve` => `secp256k1_hasher.hashToCurve()`
947
+ - Massive type renamings and improvements
930
948
 
931
- **Removed features:**
949
+ Removed features:
932
950
 
933
951
  - Point#multiplyAndAddUnsafe, Point#hasEvenY
934
952
  - CURVE property with all kinds of random stuff. Point.CURVE() now replaces it, but only provides
@@ -1000,12 +1018,9 @@ Upgrading from [@noble/bls12-381](https://github.com/paulmillr/noble-bls12-381):
1000
1018
 
1001
1019
  - `npm install && npm run build && npm test` will build the code and run tests.
1002
1020
  - `npm run lint` / `npm run format` will run linter / fix linter issues.
1003
- - `npm run bench` will run benchmarks, which may need their deps first (`npm run bench:install`)
1021
+ - `npm run bench` will run benchmarks
1004
1022
  - `npm run build:release` will build single file
1005
1023
 
1006
- Check out [github.com/paulmillr/guidelines](https://github.com/paulmillr/guidelines)
1007
- for general coding practices and rules.
1008
-
1009
1024
  See [paulmillr.com/noble](https://paulmillr.com/noble/)
1010
1025
  for useful resources, articles, documentation and demos
1011
1026
  related to the library.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noble/curves",
3
- "version": "2.0.0-beta.3",
3
+ "version": "2.0.0",
4
4
  "description": "Audited & minimal JS implementation of elliptic curve cryptography",
5
5
  "files": [
6
6
  "*.js",
@@ -11,14 +11,12 @@
11
11
  "src"
12
12
  ],
13
13
  "dependencies": {
14
- "@noble/hashes": "2.0.0-beta.5"
14
+ "@noble/hashes": "2.0.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@paulmillr/jsbt": "0.4.2",
17
+ "@paulmillr/jsbt": "0.4.4",
18
18
  "@types/node": "24.2.1",
19
19
  "fast-check": "4.2.0",
20
- "micro-bmark": "0.4.2",
21
- "micro-should": "0.5.3",
22
20
  "prettier": "3.6.2",
23
21
  "typescript": "5.9.2"
24
22
  },
@@ -1,19 +0,0 @@
1
- /**
2
- * Utilities for short weierstrass curves, combined with noble-hashes.
3
- * @module
4
- */
5
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6
- import { type CurveFn, type CurveType } from './abstract/weierstrass.ts';
7
- import type { CHash } from './utils.ts';
8
- /** connects noble-curves to noble-hashes */
9
- export declare function getHash(hash: CHash): {
10
- hash: CHash;
11
- };
12
- /** Same API as @noble/hashes, with ability to create curve with custom hash */
13
- export type CurveDef = Readonly<Omit<CurveType, 'hash'>>;
14
- export type CurveFnWithCreate = CurveFn & {
15
- create: (hash: CHash) => CurveFn;
16
- };
17
- /** @deprecated use new `weierstrass()` and `ecdsa()` methods */
18
- export declare function createCurve(curveDef: CurveDef, defHash: CHash): CurveFnWithCreate;
19
- //# sourceMappingURL=_shortw_utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_shortw_utils.d.ts","sourceRoot":"","sources":["src/_shortw_utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sEAAsE;AACtE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,2BAA2B,CAAC;AACtF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,4CAA4C;AAC5C,wBAAgB,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAEpD;AACD,+EAA+E;AAC/E,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,OAAO,CAAA;CAAE,CAAC;AAE/E,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,GAAG,iBAAiB,CAGjF"}
package/_shortw_utils.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getHash = getHash;
4
- exports.createCurve = createCurve;
5
- /**
6
- * Utilities for short weierstrass curves, combined with noble-hashes.
7
- * @module
8
- */
9
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
10
- const weierstrass_ts_1 = require("./abstract/weierstrass.js");
11
- /** connects noble-curves to noble-hashes */
12
- function getHash(hash) {
13
- return { hash };
14
- }
15
- /** @deprecated use new `weierstrass()` and `ecdsa()` methods */
16
- function createCurve(curveDef, defHash) {
17
- const create = (hash) => (0, weierstrass_ts_1.weierstrass)({ ...curveDef, hash: hash });
18
- return { ...create(defHash), create };
19
- }
20
- //# sourceMappingURL=_shortw_utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_shortw_utils.js","sourceRoot":"","sources":["src/_shortw_utils.ts"],"names":[],"mappings":";;AASA,0BAEC;AAMD,kCAGC;AApBD;;;GAGG;AACH,sEAAsE;AACtE,8DAAsF;AAGtF,4CAA4C;AAC5C,SAAgB,OAAO,CAAC,IAAW;IACjC,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC;AAKD,gEAAgE;AAChE,SAAgB,WAAW,CAAC,QAAkB,EAAE,OAAc;IAC5D,MAAM,MAAM,GAAG,CAAC,IAAW,EAAW,EAAE,CAAC,IAAA,4BAAW,EAAC,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC"}
@@ -1,78 +0,0 @@
1
- /**
2
- * Deprecated module: moved from curves/abstract/utils.js to curves/utils.js
3
- * @module
4
- */
5
- import * as u from '../utils.ts';
6
- /** @deprecated moved to `@noble/curves/utils.js` */
7
- export type Hex = u.Hex;
8
- /** @deprecated moved to `@noble/curves/utils.js` */
9
- export type PrivKey = u.PrivKey;
10
- /** @deprecated moved to `@noble/curves/utils.js` */
11
- export type CHash = u.CHash;
12
- /** @deprecated moved to `@noble/curves/utils.js` */
13
- export type FHash = u.FHash;
14
- /** @deprecated moved to `@noble/curves/utils.js` */
15
- export declare const abytes: typeof u.abytes;
16
- /** @deprecated moved to `@noble/curves/utils.js` */
17
- export declare const anumber: typeof u.anumber;
18
- /** @deprecated moved to `@noble/curves/utils.js` */
19
- export declare const bytesToHex: typeof u.bytesToHex;
20
- /** @deprecated moved to `@noble/curves/utils.js` */
21
- export declare const bytesToUtf8: typeof u.bytesToUtf8;
22
- /** @deprecated moved to `@noble/curves/utils.js` */
23
- export declare const concatBytes: typeof u.concatBytes;
24
- /** @deprecated moved to `@noble/curves/utils.js` */
25
- export declare const hexToBytes: typeof u.hexToBytes;
26
- /** @deprecated moved to `@noble/curves/utils.js` */
27
- export declare const isBytes: typeof u.isBytes;
28
- /** @deprecated moved to `@noble/curves/utils.js` */
29
- export declare const randomBytes: typeof u.randomBytes;
30
- /** @deprecated moved to `@noble/curves/utils.js` */
31
- export declare const utf8ToBytes: typeof u.utf8ToBytes;
32
- /** @deprecated moved to `@noble/curves/utils.js` */
33
- export declare const abool: typeof u.abool;
34
- /** @deprecated moved to `@noble/curves/utils.js` */
35
- export declare const numberToHexUnpadded: typeof u.numberToHexUnpadded;
36
- /** @deprecated moved to `@noble/curves/utils.js` */
37
- export declare const hexToNumber: typeof u.hexToNumber;
38
- /** @deprecated moved to `@noble/curves/utils.js` */
39
- export declare const bytesToNumberBE: typeof u.bytesToNumberBE;
40
- /** @deprecated moved to `@noble/curves/utils.js` */
41
- export declare const bytesToNumberLE: typeof u.bytesToNumberLE;
42
- /** @deprecated moved to `@noble/curves/utils.js` */
43
- export declare const numberToBytesBE: typeof u.numberToBytesBE;
44
- /** @deprecated moved to `@noble/curves/utils.js` */
45
- export declare const numberToBytesLE: typeof u.numberToBytesLE;
46
- /** @deprecated moved to `@noble/curves/utils.js` */
47
- export declare const numberToVarBytesBE: typeof u.numberToVarBytesBE;
48
- /** @deprecated moved to `@noble/curves/utils.js` */
49
- export declare const ensureBytes: typeof u.ensureBytes;
50
- /** @deprecated moved to `@noble/curves/utils.js` */
51
- export declare const equalBytes: typeof u.equalBytes;
52
- /** @deprecated moved to `@noble/curves/utils.js` */
53
- export declare const copyBytes: typeof u.copyBytes;
54
- /** @deprecated moved to `@noble/curves/utils.js` */
55
- export declare const asciiToBytes: typeof u.asciiToBytes;
56
- /** @deprecated moved to `@noble/curves/utils.js` */
57
- export declare const inRange: typeof u.inRange;
58
- /** @deprecated moved to `@noble/curves/utils.js` */
59
- export declare const aInRange: typeof u.aInRange;
60
- /** @deprecated moved to `@noble/curves/utils.js` */
61
- export declare const bitLen: typeof u.bitLen;
62
- /** @deprecated moved to `@noble/curves/utils.js` */
63
- export declare const bitGet: typeof u.bitGet;
64
- /** @deprecated moved to `@noble/curves/utils.js` */
65
- export declare const bitSet: typeof u.bitSet;
66
- /** @deprecated moved to `@noble/curves/utils.js` */
67
- export declare const bitMask: typeof u.bitMask;
68
- /** @deprecated moved to `@noble/curves/utils.js` */
69
- export declare const createHmacDrbg: typeof u.createHmacDrbg;
70
- /** @deprecated moved to `@noble/curves/utils.js` */
71
- export declare const notImplemented: typeof u.notImplemented;
72
- /** @deprecated moved to `@noble/curves/utils.js` */
73
- export declare const memoized: typeof u.memoized;
74
- /** @deprecated moved to `@noble/curves/utils.js` */
75
- export declare const validateObject: typeof u.validateObject;
76
- /** @deprecated moved to `@noble/curves/utils.js` */
77
- export declare const isHash: typeof u.isHash;
78
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/abstract/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,oDAAoD;AACpD,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC;AACxB,oDAAoD;AACpD,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;AAChC,oDAAoD;AACpD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;AAC5B,oDAAoD;AACpD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;AAE5B,oDAAoD;AACpD,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAiB,CAAC;AAChD,oDAAoD;AACpD,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,OAAmB,CAAC;AACnD,oDAAoD;AACpD,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,CAAC,UAAyB,CAAC;AAC5D,oDAAoD;AACpD,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,CAAC,WAA2B,CAAC;AAC/D,oDAAoD;AACpD,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,CAAC,WAA2B,CAAC;AAC/D,oDAAoD;AACpD,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,CAAC,UAAyB,CAAC;AAC5D,oDAAoD;AACpD,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,OAAmB,CAAC;AACnD,oDAAoD;AACpD,eAAO,MAAM,WAAW,EA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AE,OAAO,CAAC,CAAC,MAAiB,CAAC;AAChD,oDAAoD;AACpD,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAiB,CAAC;AAChD,oDAAoD;AACpD,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAiB,CAAC;AAChD,oDAAoD;AACpD,eAAO,MAAM,OAAO,EAAE,OAAO,CAAC,CAAC,OAAmB,CAAC;AACnD,oDAAoD;AACpD,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,cAAiC,CAAC;AACxE,oDAAoD;AACpD,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,cAAiC,CAAC;AACxE,oDAAoD;AACpD,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAqB,CAAC;AACtD,oDAAoD;AACpD,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,cAAiC,CAAC;AACxE,oDAAoD;AACpD,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAiB,CAAC"}
package/abstract/utils.js DELETED
@@ -1,73 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHash = exports.validateObject = exports.memoized = exports.notImplemented = exports.createHmacDrbg = exports.bitMask = exports.bitSet = exports.bitGet = exports.bitLen = exports.aInRange = exports.inRange = exports.asciiToBytes = exports.copyBytes = exports.equalBytes = exports.ensureBytes = exports.numberToVarBytesBE = exports.numberToBytesLE = exports.numberToBytesBE = exports.bytesToNumberLE = exports.bytesToNumberBE = exports.hexToNumber = exports.numberToHexUnpadded = exports.abool = exports.utf8ToBytes = exports.randomBytes = exports.isBytes = exports.hexToBytes = exports.concatBytes = exports.bytesToUtf8 = exports.bytesToHex = exports.anumber = exports.abytes = void 0;
4
- /**
5
- * Deprecated module: moved from curves/abstract/utils.js to curves/utils.js
6
- * @module
7
- */
8
- const u = require("../utils.js");
9
- /** @deprecated moved to `@noble/curves/utils.js` */
10
- exports.abytes = u.abytes;
11
- /** @deprecated moved to `@noble/curves/utils.js` */
12
- exports.anumber = u.anumber;
13
- /** @deprecated moved to `@noble/curves/utils.js` */
14
- exports.bytesToHex = u.bytesToHex;
15
- /** @deprecated moved to `@noble/curves/utils.js` */
16
- exports.bytesToUtf8 = u.bytesToUtf8;
17
- /** @deprecated moved to `@noble/curves/utils.js` */
18
- exports.concatBytes = u.concatBytes;
19
- /** @deprecated moved to `@noble/curves/utils.js` */
20
- exports.hexToBytes = u.hexToBytes;
21
- /** @deprecated moved to `@noble/curves/utils.js` */
22
- exports.isBytes = u.isBytes;
23
- /** @deprecated moved to `@noble/curves/utils.js` */
24
- exports.randomBytes = u.randomBytes;
25
- /** @deprecated moved to `@noble/curves/utils.js` */
26
- exports.utf8ToBytes = u.utf8ToBytes;
27
- /** @deprecated moved to `@noble/curves/utils.js` */
28
- exports.abool = u.abool;
29
- /** @deprecated moved to `@noble/curves/utils.js` */
30
- exports.numberToHexUnpadded = u.numberToHexUnpadded;
31
- /** @deprecated moved to `@noble/curves/utils.js` */
32
- exports.hexToNumber = u.hexToNumber;
33
- /** @deprecated moved to `@noble/curves/utils.js` */
34
- exports.bytesToNumberBE = u.bytesToNumberBE;
35
- /** @deprecated moved to `@noble/curves/utils.js` */
36
- exports.bytesToNumberLE = u.bytesToNumberLE;
37
- /** @deprecated moved to `@noble/curves/utils.js` */
38
- exports.numberToBytesBE = u.numberToBytesBE;
39
- /** @deprecated moved to `@noble/curves/utils.js` */
40
- exports.numberToBytesLE = u.numberToBytesLE;
41
- /** @deprecated moved to `@noble/curves/utils.js` */
42
- exports.numberToVarBytesBE = u.numberToVarBytesBE;
43
- /** @deprecated moved to `@noble/curves/utils.js` */
44
- exports.ensureBytes = u.ensureBytes;
45
- /** @deprecated moved to `@noble/curves/utils.js` */
46
- exports.equalBytes = u.equalBytes;
47
- /** @deprecated moved to `@noble/curves/utils.js` */
48
- exports.copyBytes = u.copyBytes;
49
- /** @deprecated moved to `@noble/curves/utils.js` */
50
- exports.asciiToBytes = u.asciiToBytes;
51
- /** @deprecated moved to `@noble/curves/utils.js` */
52
- exports.inRange = u.inRange;
53
- /** @deprecated moved to `@noble/curves/utils.js` */
54
- exports.aInRange = u.aInRange;
55
- /** @deprecated moved to `@noble/curves/utils.js` */
56
- exports.bitLen = u.bitLen;
57
- /** @deprecated moved to `@noble/curves/utils.js` */
58
- exports.bitGet = u.bitGet;
59
- /** @deprecated moved to `@noble/curves/utils.js` */
60
- exports.bitSet = u.bitSet;
61
- /** @deprecated moved to `@noble/curves/utils.js` */
62
- exports.bitMask = u.bitMask;
63
- /** @deprecated moved to `@noble/curves/utils.js` */
64
- exports.createHmacDrbg = u.createHmacDrbg;
65
- /** @deprecated moved to `@noble/curves/utils.js` */
66
- exports.notImplemented = u.notImplemented;
67
- /** @deprecated moved to `@noble/curves/utils.js` */
68
- exports.memoized = u.memoized;
69
- /** @deprecated moved to `@noble/curves/utils.js` */
70
- exports.validateObject = u.validateObject;
71
- /** @deprecated moved to `@noble/curves/utils.js` */
72
- exports.isHash = u.isHash;
73
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/abstract/utils.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,iCAAiC;AAWjC,oDAAoD;AACvC,QAAA,MAAM,GAAoB,CAAC,CAAC,MAAM,CAAC;AAChD,oDAAoD;AACvC,QAAA,OAAO,GAAqB,CAAC,CAAC,OAAO,CAAC;AACnD,oDAAoD;AACvC,QAAA,UAAU,GAAwB,CAAC,CAAC,UAAU,CAAC;AAC5D,oDAAoD;AACvC,QAAA,WAAW,GAAyB,CAAC,CAAC,WAAW,CAAC;AAC/D,oDAAoD;AACvC,QAAA,WAAW,GAAyB,CAAC,CAAC,WAAW,CAAC;AAC/D,oDAAoD;AACvC,QAAA,UAAU,GAAwB,CAAC,CAAC,UAAU,CAAC;AAC5D,oDAAoD;AACvC,QAAA,OAAO,GAAqB,CAAC,CA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,CAAC,MAAM,CAAC;AAChD,oDAAoD;AACvC,QAAA,OAAO,GAAqB,CAAC,CAAC,OAAO,CAAC;AACnD,oDAAoD;AACvC,QAAA,cAAc,GAA4B,CAAC,CAAC,cAAc,CAAC;AACxE,oDAAoD;AACvC,QAAA,cAAc,GAA4B,CAAC,CAAC,cAAc,CAAC;AACxE,oDAAoD;AACvC,QAAA,QAAQ,GAAsB,CAAC,CAAC,QAAQ,CAAC;AACtD,oDAAoD;AACvC,QAAA,cAAc,GAA4B,CAAC,CAAC,cAAc,CAAC;AACxE,oDAAoD;AACvC,QAAA,MAAM,GAAoB,CAAC,CAAC,MAAM,CAAC"}
package/jubjub.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * @deprecated
3
- * @module
4
- */
5
- import { jubjub_findGroupHash, jubjub_groupHash, jubjub as jubjubn } from './misc.ts';
6
- /** @deprecated use `import { jubjub } from '@noble/curves/misc.js';` */
7
- export declare const jubjub: typeof jubjubn;
8
- /** @deprecated use `import { jubjub_findGroupHash } from '@noble/curves/misc.js';` */
9
- export declare const findGroupHash: typeof jubjub_findGroupHash;
10
- /** @deprecated use `import { jubjub_groupHash } from '@noble/curves/misc.js';` */
11
- export declare const groupHash: typeof jubjub_groupHash;
12
- //# sourceMappingURL=jubjub.d.ts.map
package/jubjub.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"jubjub.d.ts","sourceRoot":"","sources":["src/jubjub.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtF,wEAAwE;AACxE,eAAO,MAAM,MAAM,EAAE,OAAO,OAAiB,CAAC;AAC9C,sFAAsF;AACtF,eAAO,MAAM,aAAa,EAAE,OAAO,oBAA2C,CAAC;AAC/E,kFAAkF;AAClF,eAAO,MAAM,SAAS,EAAE,OAAO,gBAAmC,CAAC"}
package/jubjub.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.groupHash = exports.findGroupHash = exports.jubjub = void 0;
4
- /**
5
- * @deprecated
6
- * @module
7
- */
8
- const misc_ts_1 = require("./misc.js");
9
- /** @deprecated use `import { jubjub } from '@noble/curves/misc.js';` */
10
- exports.jubjub = misc_ts_1.jubjub;
11
- /** @deprecated use `import { jubjub_findGroupHash } from '@noble/curves/misc.js';` */
12
- exports.findGroupHash = misc_ts_1.jubjub_findGroupHash;
13
- /** @deprecated use `import { jubjub_groupHash } from '@noble/curves/misc.js';` */
14
- exports.groupHash = misc_ts_1.jubjub_groupHash;
15
- //# sourceMappingURL=jubjub.js.map
package/jubjub.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"jubjub.js","sourceRoot":"","sources":["src/jubjub.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAAsF;AAEtF,wEAAwE;AAC3D,QAAA,MAAM,GAAmB,gBAAO,CAAC;AAC9C,sFAAsF;AACzE,QAAA,aAAa,GAAgC,8BAAoB,CAAC;AAC/E,kFAAkF;AACrE,QAAA,SAAS,GAA4B,0BAAgB,CAAC"}
package/p256.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * NIST secp256r1 aka p256.
3
- * @module
4
- */
5
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6
- import { type H2CMethod } from './abstract/hash-to-curve.ts';
7
- import { p256 as p256n } from './nist.ts';
8
- /** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
9
- export declare const p256: typeof p256n;
10
- /** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
11
- export declare const secp256r1: typeof p256n;
12
- /** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
13
- export declare const hashToCurve: H2CMethod<bigint>;
14
- /** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
15
- export declare const encodeToCurve: H2CMethod<bigint>;
16
- //# sourceMappingURL=p256.d.ts.map
package/p256.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p256.d.ts","sourceRoot":"","sources":["src/p256.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sEAAsE;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAe,IAAI,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AACvD,sEAAsE;AACtE,eAAO,MAAM,IAAI,EAAE,OAAO,KAAa,CAAC;AACxC,sEAAsE;AACtE,eAAO,MAAM,SAAS,EAAE,OAAO,KAAa,CAAC;AAC7C,6EAA6E;AAC7E,eAAO,MAAM,WAAW,EAAE,SAAS,CAAC,MAAM,CAAqD,CAAC;AAChG,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,MAAM,CAAuD,CAAC"}
package/p256.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeToCurve = exports.hashToCurve = exports.secp256r1 = exports.p256 = void 0;
4
- const nist_ts_1 = require("./nist.js");
5
- /** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
6
- exports.p256 = nist_ts_1.p256;
7
- /** @deprecated use `import { p256 } from '@noble/curves/nist.js';` */
8
- exports.secp256r1 = nist_ts_1.p256;
9
- /** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
10
- exports.hashToCurve = (() => nist_ts_1.p256_hasher.hashToCurve)();
11
- /** @deprecated use `import { p256_hasher } from '@noble/curves/nist.js';` */
12
- exports.encodeToCurve = (() => nist_ts_1.p256_hasher.encodeToCurve)();
13
- //# sourceMappingURL=p256.js.map
package/p256.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p256.js","sourceRoot":"","sources":["src/p256.ts"],"names":[],"mappings":";;;AAMA,uCAAuD;AACvD,sEAAsE;AACzD,QAAA,IAAI,GAAiB,cAAK,CAAC;AACxC,sEAAsE;AACzD,QAAA,SAAS,GAAiB,cAAK,CAAC;AAC7C,6EAA6E;AAChE,QAAA,WAAW,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,WAAW,CAAC,EAAE,CAAC;AAChG,6EAA6E;AAChE,QAAA,aAAa,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,aAAa,CAAC,EAAE,CAAC"}
package/p384.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * NIST secp384r1 aka p384.
3
- * @module
4
- */
5
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6
- import { type H2CMethod } from './abstract/hash-to-curve.ts';
7
- import { p384 as p384n } from './nist.ts';
8
- /** @deprecated use `import { p384 } from '@noble/curves/nist.js';` */
9
- export declare const p384: typeof p384n;
10
- /** @deprecated use `import { p384 } from '@noble/curves/nist.js';` */
11
- export declare const secp384r1: typeof p384n;
12
- /** @deprecated use `import { p384_hasher } from '@noble/curves/nist.js';` */
13
- export declare const hashToCurve: H2CMethod<bigint>;
14
- /** @deprecated use `import { p384_hasher } from '@noble/curves/nist.js';` */
15
- export declare const encodeToCurve: H2CMethod<bigint>;
16
- //# sourceMappingURL=p384.d.ts.map
package/p384.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p384.d.ts","sourceRoot":"","sources":["src/p384.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sEAAsE;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAe,IAAI,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AACvD,sEAAsE;AACtE,eAAO,MAAM,IAAI,EAAE,OAAO,KAAa,CAAC;AACxC,sEAAsE;AACtE,eAAO,MAAM,SAAS,EAAE,OAAO,KAAa,CAAC;AAC7C,6EAA6E;AAC7E,eAAO,MAAM,WAAW,EAAE,SAAS,CAAC,MAAM,CAAqD,CAAC;AAChG,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,MAAM,CAAuD,CAAC"}
package/p384.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeToCurve = exports.hashToCurve = exports.secp384r1 = exports.p384 = void 0;
4
- const nist_ts_1 = require("./nist.js");
5
- /** @deprecated use `import { p384 } from '@noble/curves/nist.js';` */
6
- exports.p384 = nist_ts_1.p384;
7
- /** @deprecated use `import { p384 } from '@noble/curves/nist.js';` */
8
- exports.secp384r1 = nist_ts_1.p384;
9
- /** @deprecated use `import { p384_hasher } from '@noble/curves/nist.js';` */
10
- exports.hashToCurve = (() => nist_ts_1.p384_hasher.hashToCurve)();
11
- /** @deprecated use `import { p384_hasher } from '@noble/curves/nist.js';` */
12
- exports.encodeToCurve = (() => nist_ts_1.p384_hasher.encodeToCurve)();
13
- //# sourceMappingURL=p384.js.map
package/p384.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p384.js","sourceRoot":"","sources":["src/p384.ts"],"names":[],"mappings":";;;AAMA,uCAAuD;AACvD,sEAAsE;AACzD,QAAA,IAAI,GAAiB,cAAK,CAAC;AACxC,sEAAsE;AACzD,QAAA,SAAS,GAAiB,cAAK,CAAC;AAC7C,6EAA6E;AAChE,QAAA,WAAW,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,WAAW,CAAC,EAAE,CAAC;AAChG,6EAA6E;AAChE,QAAA,aAAa,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,aAAa,CAAC,EAAE,CAAC"}
package/p521.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * NIST secp521r1 aka p521.
3
- * @module
4
- */
5
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
6
- import { type H2CMethod } from './abstract/hash-to-curve.ts';
7
- import { p521 as p521n } from './nist.ts';
8
- /** @deprecated use `import { p521 } from '@noble/curves/nist.js';` */
9
- export declare const p521: typeof p521n;
10
- /** @deprecated use `import { p521 } from '@noble/curves/nist.js';` */
11
- export declare const secp521r1: typeof p521n;
12
- /** @deprecated use `import { p521_hasher } from '@noble/curves/nist.js';` */
13
- export declare const hashToCurve: H2CMethod<bigint>;
14
- /** @deprecated use `import { p521_hasher } from '@noble/curves/nist.js';` */
15
- export declare const encodeToCurve: H2CMethod<bigint>;
16
- //# sourceMappingURL=p521.d.ts.map
package/p521.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p521.d.ts","sourceRoot":"","sources":["src/p521.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,sEAAsE;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAe,IAAI,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AACvD,sEAAsE;AACtE,eAAO,MAAM,IAAI,EAAE,OAAO,KAAa,CAAC;AACxC,sEAAsE;AACtE,eAAO,MAAM,SAAS,EAAE,OAAO,KAAa,CAAC;AAC7C,6EAA6E;AAC7E,eAAO,MAAM,WAAW,EAAE,SAAS,CAAC,MAAM,CAAqD,CAAC;AAChG,6EAA6E;AAC7E,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,MAAM,CAAuD,CAAC"}
package/p521.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeToCurve = exports.hashToCurve = exports.secp521r1 = exports.p521 = void 0;
4
- const nist_ts_1 = require("./nist.js");
5
- /** @deprecated use `import { p521 } from '@noble/curves/nist.js';` */
6
- exports.p521 = nist_ts_1.p521;
7
- /** @deprecated use `import { p521 } from '@noble/curves/nist.js';` */
8
- exports.secp521r1 = nist_ts_1.p521;
9
- /** @deprecated use `import { p521_hasher } from '@noble/curves/nist.js';` */
10
- exports.hashToCurve = (() => nist_ts_1.p521_hasher.hashToCurve)();
11
- /** @deprecated use `import { p521_hasher } from '@noble/curves/nist.js';` */
12
- exports.encodeToCurve = (() => nist_ts_1.p521_hasher.encodeToCurve)();
13
- //# sourceMappingURL=p521.js.map
package/p521.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"p521.js","sourceRoot":"","sources":["src/p521.ts"],"names":[],"mappings":";;;AAMA,uCAAuD;AACvD,sEAAsE;AACzD,QAAA,IAAI,GAAiB,cAAK,CAAC;AACxC,sEAAsE;AACzD,QAAA,SAAS,GAAiB,cAAK,CAAC;AAC7C,6EAA6E;AAChE,QAAA,WAAW,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,WAAW,CAAC,EAAE,CAAC;AAChG,6EAA6E;AAChE,QAAA,aAAa,GAAsC,CAAC,GAAG,EAAE,CAAC,qBAAW,CAAC,aAAa,CAAC,EAAE,CAAC"}
package/pasta.d.ts DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * @deprecated
3
- * @module
4
- */
5
- import { pallas as pn, vesta as vn } from './misc.ts';
6
- /** @deprecated */
7
- export declare const pallas: typeof pn;
8
- /** @deprecated */
9
- export declare const vesta: typeof vn;
10
- //# sourceMappingURL=pasta.d.ts.map
package/pasta.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"pasta.d.ts","sourceRoot":"","sources":["src/pasta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,IAAI,EAAE,EAAE,KAAK,IAAI,EAAE,EAAE,MAAM,WAAW,CAAC;AACtD,kBAAkB;AAClB,eAAO,MAAM,MAAM,EAAE,OAAO,EAAO,CAAC;AACpC,kBAAkB;AAClB,eAAO,MAAM,KAAK,EAAE,OAAO,EAAO,CAAC"}
package/pasta.js DELETED
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vesta = exports.pallas = void 0;
4
- /**
5
- * @deprecated
6
- * @module
7
- */
8
- const misc_ts_1 = require("./misc.js");
9
- /** @deprecated */
10
- exports.pallas = misc_ts_1.pallas;
11
- /** @deprecated */
12
- exports.vesta = misc_ts_1.vesta;
13
- //# sourceMappingURL=pasta.js.map
package/pasta.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"pasta.js","sourceRoot":"","sources":["src/pasta.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAAsD;AACtD,kBAAkB;AACL,QAAA,MAAM,GAAc,gBAAE,CAAC;AACpC,kBAAkB;AACL,QAAA,KAAK,GAAc,eAAE,CAAC"}