@noble/curves 1.4.2 → 1.5.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 +135 -123
- package/_shortw_utils.d.ts.map +1 -1
- package/abstract/bls.d.ts +37 -34
- package/abstract/bls.d.ts.map +1 -1
- package/abstract/bls.js +167 -115
- package/abstract/bls.js.map +1 -1
- package/abstract/curve.d.ts +2 -1
- package/abstract/curve.d.ts.map +1 -1
- package/abstract/curve.js +22 -7
- package/abstract/curve.js.map +1 -1
- package/abstract/edwards.d.ts +11 -0
- package/abstract/edwards.d.ts.map +1 -1
- package/abstract/edwards.js +79 -75
- package/abstract/edwards.js.map +1 -1
- package/abstract/modular.d.ts +4 -0
- package/abstract/modular.d.ts.map +1 -1
- package/abstract/modular.js +13 -2
- package/abstract/modular.js.map +1 -1
- package/abstract/montgomery.d.ts.map +1 -1
- package/abstract/montgomery.js +4 -9
- package/abstract/montgomery.js.map +1 -1
- package/abstract/tower.d.ts +106 -0
- package/abstract/tower.d.ts.map +1 -0
- package/abstract/tower.js +497 -0
- package/abstract/tower.js.map +1 -0
- package/abstract/utils.d.ts +17 -0
- package/abstract/utils.d.ts.map +1 -1
- package/abstract/utils.js +50 -1
- package/abstract/utils.js.map +1 -1
- package/abstract/weierstrass.d.ts +7 -0
- package/abstract/weierstrass.d.ts.map +1 -1
- package/abstract/weierstrass.js +88 -72
- package/abstract/weierstrass.js.map +1 -1
- package/bls12-381.d.ts +1 -65
- package/bls12-381.d.ts.map +1 -1
- package/bls12-381.js +48 -575
- package/bls12-381.js.map +1 -1
- package/bn254.d.ts +10 -6
- package/bn254.d.ts.map +1 -1
- package/bn254.js +207 -10
- package/bn254.js.map +1 -1
- package/ed25519.d.ts +7 -4
- package/ed25519.d.ts.map +1 -1
- package/ed25519.js +3 -0
- package/ed25519.js.map +1 -1
- package/esm/_shortw_utils.d.ts.map +1 -1
- package/esm/abstract/bls.d.ts +37 -34
- package/esm/abstract/bls.d.ts.map +1 -1
- package/esm/abstract/bls.js +168 -116
- package/esm/abstract/bls.js.map +1 -1
- package/esm/abstract/curve.d.ts +2 -1
- package/esm/abstract/curve.d.ts.map +1 -1
- package/esm/abstract/curve.js +22 -7
- package/esm/abstract/curve.js.map +1 -1
- package/esm/abstract/edwards.d.ts +11 -0
- package/esm/abstract/edwards.d.ts.map +1 -1
- package/esm/abstract/edwards.js +80 -76
- package/esm/abstract/edwards.js.map +1 -1
- package/esm/abstract/modular.d.ts +4 -0
- package/esm/abstract/modular.d.ts.map +1 -1
- package/esm/abstract/modular.js +12 -2
- package/esm/abstract/modular.js.map +1 -1
- package/esm/abstract/montgomery.d.ts.map +1 -1
- package/esm/abstract/montgomery.js +5 -10
- package/esm/abstract/montgomery.js.map +1 -1
- package/esm/abstract/tower.d.ts +106 -0
- package/esm/abstract/tower.d.ts.map +1 -0
- package/esm/abstract/tower.js +493 -0
- package/esm/abstract/tower.js.map +1 -0
- package/esm/abstract/utils.d.ts +17 -0
- package/esm/abstract/utils.d.ts.map +1 -1
- package/esm/abstract/utils.js +44 -0
- package/esm/abstract/utils.js.map +1 -1
- package/esm/abstract/weierstrass.d.ts +7 -0
- package/esm/abstract/weierstrass.d.ts.map +1 -1
- package/esm/abstract/weierstrass.js +89 -73
- package/esm/abstract/weierstrass.js.map +1 -1
- package/esm/bls12-381.d.ts +1 -65
- package/esm/bls12-381.d.ts.map +1 -1
- package/esm/bls12-381.js +50 -577
- package/esm/bls12-381.js.map +1 -1
- package/esm/bn254.d.ts +10 -6
- package/esm/bn254.d.ts.map +1 -1
- package/esm/bn254.js +206 -9
- package/esm/bn254.js.map +1 -1
- package/esm/ed25519.d.ts +7 -4
- package/esm/ed25519.d.ts.map +1 -1
- package/esm/ed25519.js +3 -0
- package/esm/ed25519.js.map +1 -1
- package/esm/p256.d.ts.map +1 -1
- package/esm/p384.d.ts.map +1 -1
- package/esm/p521.d.ts.map +1 -1
- package/esm/secp256k1.d.ts +6 -0
- package/esm/secp256k1.d.ts.map +1 -1
- package/esm/secp256k1.js +17 -13
- package/esm/secp256k1.js.map +1 -1
- package/p256.d.ts.map +1 -1
- package/p384.d.ts.map +1 -1
- package/p521.d.ts.map +1 -1
- package/package.json +2 -1
- package/secp256k1.d.ts +6 -0
- package/secp256k1.d.ts.map +1 -1
- package/secp256k1.js +16 -12
- package/secp256k1.js.map +1 -1
- package/src/abstract/bls.ts +222 -168
- package/src/abstract/curve.ts +23 -7
- package/src/abstract/edwards.ts +81 -68
- package/src/abstract/modular.ts +13 -3
- package/src/abstract/montgomery.ts +11 -10
- package/src/abstract/tower.ts +604 -0
- package/src/abstract/utils.ts +49 -0
- package/src/abstract/weierstrass.ts +85 -68
- package/src/bls12-381.ts +53 -707
- package/src/bn254.ts +224 -9
- package/src/ed25519.ts +5 -2
- package/src/secp256k1.ts +24 -12
package/README.md
CHANGED
|
@@ -49,20 +49,21 @@ import { secp256k1 } from '@noble/curves/secp256k1'; // ESM and Common.js
|
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
- [Implementations](#implementations)
|
|
52
|
-
- [ECDSA
|
|
52
|
+
- [ECDSA signatures over secp256k1 and others](#ecdsa-signatures-over-secp256k1-and-others)
|
|
53
53
|
- [ECDSA public key recovery & extra entropy](#ecdsa-public-key-recovery--extra-entropy)
|
|
54
54
|
- [ECDH: Elliptic Curve Diffie-Hellman](#ecdh-elliptic-curve-diffie-hellman)
|
|
55
55
|
- [Schnorr signatures over secp256k1, BIP340](#schnorr-signatures-over-secp256k1-bip340)
|
|
56
56
|
- [ed25519, X25519, ristretto255](#ed25519-x25519-ristretto255)
|
|
57
57
|
- [ed448, X448, decaf448](#ed448-x448-decaf448)
|
|
58
58
|
- [bls12-381](#bls12-381)
|
|
59
|
+
- [bn254 aka alt_bn128](#bn254-aka-alt_bn128)
|
|
59
60
|
- [All available imports](#all-available-imports)
|
|
60
61
|
- [Accessing a curve's variables](#accessing-a-curves-variables)
|
|
61
62
|
- [Abstract API](#abstract-api)
|
|
62
63
|
- [weierstrass: Short Weierstrass curve](#weierstrass-short-weierstrass-curve)
|
|
63
64
|
- [edwards: Twisted Edwards curve](#edwards-twisted-edwards-curve)
|
|
64
65
|
- [montgomery: Montgomery curve](#montgomery-montgomery-curve)
|
|
65
|
-
- [bls:
|
|
66
|
+
- [bls: Boneh-Lynn-Shacham signatures](#bls-boneh-lynn-shacham-signatures)
|
|
66
67
|
- [hash-to-curve: Hashing strings to curve points](#hash-to-curve-hashing-strings-to-curve-points)
|
|
67
68
|
- [poseidon: Poseidon hash](#poseidon-poseidon-hash)
|
|
68
69
|
- [modular: Modular arithmetics utilities](#modular-modular-arithmetics-utilities)
|
|
@@ -79,24 +80,24 @@ import { secp256k1 } from '@noble/curves/secp256k1'; // ESM and Common.js
|
|
|
79
80
|
Implementations use [noble-hashes](https://github.com/paulmillr/noble-hashes).
|
|
80
81
|
If you want to use a different hashing library, [abstract API](#abstract-api) doesn't depend on them.
|
|
81
82
|
|
|
82
|
-
#### ECDSA
|
|
83
|
-
|
|
84
|
-
Generic example that works for all curves, shown for secp256k1:
|
|
83
|
+
#### ECDSA signatures over secp256k1 and others
|
|
85
84
|
|
|
86
85
|
```ts
|
|
87
86
|
import { secp256k1 } from '@noble/curves/secp256k1';
|
|
87
|
+
// import { p256 } from '@noble/curves/p256'; // or p384 / p521
|
|
88
|
+
|
|
88
89
|
const priv = secp256k1.utils.randomPrivateKey();
|
|
89
90
|
const pub = secp256k1.getPublicKey(priv);
|
|
90
91
|
const msg = new Uint8Array(32).fill(1); // message hash (not message) in ecdsa
|
|
91
92
|
const sig = secp256k1.sign(msg, priv); // `{prehash: true}` option is available
|
|
92
93
|
const isValid = secp256k1.verify(sig, msg, pub) === true;
|
|
93
94
|
|
|
94
|
-
// hex strings are also supported besides
|
|
95
|
+
// hex strings are also supported besides Uint8Array-s:
|
|
95
96
|
const privHex = '46c930bc7bb4db7f55da20798697421b98c4175a52c630294d75a84b9c126236';
|
|
96
97
|
const pub2 = secp256k1.getPublicKey(privHex);
|
|
97
98
|
```
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
The same code would work for NIST P256 (secp256r1), P384 (secp384r1) & P521 (secp521r1).
|
|
100
101
|
|
|
101
102
|
#### ECDSA public key recovery & extra entropy
|
|
102
103
|
|
|
@@ -246,7 +247,69 @@ Same RFC7748 / RFC8032 / IRTF draft are followed.
|
|
|
246
247
|
|
|
247
248
|
#### bls12-381
|
|
248
249
|
|
|
250
|
+
```ts
|
|
251
|
+
import { bls12_381 as bls } from '@noble/curves/bls12-381';
|
|
252
|
+
|
|
253
|
+
// G1 keys, G2 signatures
|
|
254
|
+
const privateKey = '67d53f170b908cabb9eb326c3c337762d59289a8fec79f7bc9254b584b73265c';
|
|
255
|
+
const message = '64726e3da8';
|
|
256
|
+
const publicKey = bls.getPublicKey(privateKey);
|
|
257
|
+
const signature = bls.sign(message, privateKey);
|
|
258
|
+
const isValid = bls.verify(signature, message, publicKey);
|
|
259
|
+
console.log({ publicKey, signature, isValid });
|
|
260
|
+
|
|
261
|
+
// G2 signatures, G1 keys
|
|
262
|
+
// getPublicKeyForShortSignatures(privateKey)
|
|
263
|
+
// signShortSignature(message, privateKey)
|
|
264
|
+
// verifyShortSignature(signature, message, publicKey)
|
|
265
|
+
// aggregateShortSignatures(signatures)
|
|
266
|
+
|
|
267
|
+
// Custom DST
|
|
268
|
+
const htfEthereum = { DST: 'BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_' };
|
|
269
|
+
const signatureEth = bls.sign(message, privateKey, htfEthereum);
|
|
270
|
+
const isValidEth = bls.verify(signature, message, publicKey, htfEthereum);
|
|
271
|
+
|
|
272
|
+
// Aggregation
|
|
273
|
+
const aggregatedKey = bls.aggregatePublicKeys([bls.utils.randomPrivateKey(), bls.utils.randomPrivateKey()])
|
|
274
|
+
// const aggregatedSig = bls.aggregateSignatures(sigs)
|
|
275
|
+
|
|
276
|
+
// Pairings, with and without final exponentiation
|
|
277
|
+
// bls.pairing(PointG1, PointG2);
|
|
278
|
+
// bls.pairing(PointG1, PointG2, false);
|
|
279
|
+
// bls.fields.Fp12.finalExponentiate(bls.fields.Fp12.mul(PointG1, PointG2));
|
|
280
|
+
|
|
281
|
+
// Others
|
|
282
|
+
// bls.G1.ProjectivePoint.BASE, bls.G2.ProjectivePoint.BASE;
|
|
283
|
+
// bls.fields.Fp, bls.fields.Fp2, bls.fields.Fp12, bls.fields.Fr;
|
|
284
|
+
```
|
|
285
|
+
|
|
249
286
|
See [abstract/bls](#bls-barreto-lynn-scott-curves).
|
|
287
|
+
For example usage, check out [the implementation of BLS EVM precompiles](https://github.com/ethereumjs/ethereumjs-monorepo/blob/361f4edbc239e795a411ac2da7e5567298b9e7e5/packages/evm/src/precompiles/bls12_381/noble.ts).
|
|
288
|
+
|
|
289
|
+
#### bn254 aka alt_bn128
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
import { bn254 } from '@noble/curves/bn254';
|
|
293
|
+
|
|
294
|
+
console.log(
|
|
295
|
+
bn254.G1,
|
|
296
|
+
bn254.G2,
|
|
297
|
+
bn254.pairing
|
|
298
|
+
)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
The API mirrors [BLS](#bls12-381). The curve was previously called alt_bn128.
|
|
302
|
+
The implementation is compatible with [EIP-196](https://eips.ethereum.org/EIPS/eip-196) and
|
|
303
|
+
[EIP-197](https://eips.ethereum.org/EIPS/eip-197).
|
|
304
|
+
|
|
305
|
+
Keep in mind that we don't implement Point methods toHex / toRawBytes. It's because
|
|
306
|
+
different implementations of bn254 do it differently - there is no standard. Points of divergence:
|
|
307
|
+
|
|
308
|
+
- Endianness: LE vs BE (byte-swapped)
|
|
309
|
+
- Flags as first hex bits (similar to BLS) vs no-flags
|
|
310
|
+
- Imaginary part last in G2 vs first (c0, c1 vs c1, c0)
|
|
311
|
+
|
|
312
|
+
For example usage, check out [the implementation of bn254 EVM precompiles](https://github.com/paulmillr/noble-curves/blob/3ed792f8ad9932765b84d1064afea8663a255457/test/bn254.test.js#L697).
|
|
250
313
|
|
|
251
314
|
#### All available imports
|
|
252
315
|
|
|
@@ -590,75 +653,11 @@ use aggregated, batch-verifiable
|
|
|
590
653
|
using Boneh-Lynn-Shacham signature scheme.
|
|
591
654
|
|
|
592
655
|
The module doesn't expose `CURVE` property: use `G1.CURVE`, `G2.CURVE` instead.
|
|
593
|
-
Only BLS12-381 is implemented
|
|
656
|
+
Only BLS12-381 is currently implemented.
|
|
594
657
|
Defining BLS12-377 and BLS24 should be straightforward.
|
|
595
658
|
|
|
596
|
-
Main methods and properties are:
|
|
597
|
-
|
|
598
|
-
- `getPublicKey(privateKey)`
|
|
599
|
-
- `sign(message, privateKey)`
|
|
600
|
-
- `verify(signature, message, publicKey)`
|
|
601
|
-
- `aggregatePublicKeys(publicKeys)`
|
|
602
|
-
- `aggregateSignatures(signatures)`
|
|
603
|
-
- `G1` and `G2` curves containing `CURVE` and `ProjectivePoint`
|
|
604
|
-
- `Signature` property with `fromHex`, `toHex` methods
|
|
605
|
-
- `fields` containing `Fp`, `Fp2`, `Fp6`, `Fp12`, `Fr`
|
|
606
|
-
|
|
607
659
|
The default BLS uses short public keys (with public keys in G1 and signatures in G2).
|
|
608
|
-
Short signatures (public keys in G2 and signatures in G1)
|
|
609
|
-
|
|
610
|
-
- `getPublicKeyForShortSignatures(privateKey)`
|
|
611
|
-
- `signShortSignature(message, privateKey)`
|
|
612
|
-
- `verifyShortSignature(signature, message, publicKey)`
|
|
613
|
-
- `aggregateShortSignatures(signatures)`
|
|
614
|
-
|
|
615
|
-
```ts
|
|
616
|
-
import { bls12_381 as bls } from '@noble/curves/bls12-381';
|
|
617
|
-
const privateKey = '67d53f170b908cabb9eb326c3c337762d59289a8fec79f7bc9254b584b73265c';
|
|
618
|
-
const message = '64726e3da8';
|
|
619
|
-
const publicKey = bls.getPublicKey(privateKey);
|
|
620
|
-
const signature = bls.sign(message, privateKey);
|
|
621
|
-
const isValid = bls.verify(signature, message, publicKey);
|
|
622
|
-
console.log({ publicKey, signature, isValid });
|
|
623
|
-
|
|
624
|
-
// Use custom DST, e.g. for Ethereum consensus layer
|
|
625
|
-
const htfEthereum = { DST: 'BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_' };
|
|
626
|
-
const signatureEth = bls.sign(message, privateKey, htfEthereum);
|
|
627
|
-
const isValidEth = bls.verify(signature, message, publicKey, htfEthereum);
|
|
628
|
-
console.log({ signatureEth, isValidEth });
|
|
629
|
-
|
|
630
|
-
// Sign 1 msg with 3 keys
|
|
631
|
-
const privateKeys = [
|
|
632
|
-
'18f020b98eb798752a50ed0563b079c125b0db5dd0b1060d1c1b47d4a193e1e4',
|
|
633
|
-
'ed69a8c50cf8c9836be3b67c7eeff416612d45ba39a5c099d48fa668bf558c9c',
|
|
634
|
-
'16ae669f3be7a2121e17d0c68c05a8f3d6bef21ec0f2315f1d7aec12484e4cf5',
|
|
635
|
-
];
|
|
636
|
-
const messages = ['d2', '0d98', '05caf3'];
|
|
637
|
-
const publicKeys = privateKeys.map(bls.getPublicKey);
|
|
638
|
-
const signatures2 = privateKeys.map((p) => bls.sign(message, p));
|
|
639
|
-
const aggPubKey2 = bls.aggregatePublicKeys(publicKeys);
|
|
640
|
-
const aggSignature2 = bls.aggregateSignatures(signatures2);
|
|
641
|
-
const isValid2 = bls.verify(aggSignature2, message, aggPubKey2);
|
|
642
|
-
console.log({ signatures2, aggSignature2, isValid2 });
|
|
643
|
-
|
|
644
|
-
// Sign 3 msgs with 3 keys
|
|
645
|
-
const signatures3 = privateKeys.map((p, i) => bls.sign(messages[i], p));
|
|
646
|
-
const aggSignature3 = bls.aggregateSignatures(signatures3);
|
|
647
|
-
const isValid3 = bls.verifyBatch(aggSignature3, messages, publicKeys);
|
|
648
|
-
console.log({ publicKeys, signatures3, aggSignature3, isValid3 });
|
|
649
|
-
|
|
650
|
-
// Pairings, with and without final exponentiation
|
|
651
|
-
bls.pairing(PointG1, PointG2);
|
|
652
|
-
bls.pairing(PointG1, PointG2, false);
|
|
653
|
-
bls.fields.Fp12.finalExponentiate(bls.fields.Fp12.mul(PointG1, PointG2));
|
|
654
|
-
|
|
655
|
-
// Others
|
|
656
|
-
bls.G1.ProjectivePoint.BASE, bls.G2.ProjectivePoint.BASE;
|
|
657
|
-
bls.fields.Fp, bls.fields.Fp2, bls.fields.Fp12, bls.fields.Fr;
|
|
658
|
-
bls.params.x, bls.params.r, bls.params.G1b, bls.params.G2b;
|
|
659
|
-
|
|
660
|
-
// hash-to-curve examples can be seen below
|
|
661
|
-
```
|
|
660
|
+
Short signatures (public keys in G2 and signatures in G1) are also supported.
|
|
662
661
|
|
|
663
662
|
### hash-to-curve: Hashing strings to curve points
|
|
664
663
|
|
|
@@ -871,74 +870,87 @@ is even worse: there is no reliable userspace source of quality entropy.
|
|
|
871
870
|
|
|
872
871
|
## Speed
|
|
873
872
|
|
|
874
|
-
Benchmark results on Apple M2 with node
|
|
873
|
+
Benchmark results on Apple M2 with node v22:
|
|
875
874
|
|
|
876
875
|
```
|
|
877
876
|
secp256k1
|
|
878
877
|
init x 68 ops/sec @ 14ms/op
|
|
879
|
-
getPublicKey x 6,
|
|
880
|
-
sign x 5,
|
|
881
|
-
verify x
|
|
882
|
-
getSharedSecret x
|
|
883
|
-
recoverPublicKey x
|
|
884
|
-
schnorr.sign x
|
|
885
|
-
schnorr.verify x
|
|
878
|
+
getPublicKey x 6,839 ops/sec @ 146μs/op
|
|
879
|
+
sign x 5,226 ops/sec @ 191μs/op
|
|
880
|
+
verify x 893 ops/sec @ 1ms/op
|
|
881
|
+
getSharedSecret x 538 ops/sec @ 1ms/op
|
|
882
|
+
recoverPublicKey x 923 ops/sec @ 1ms/op
|
|
883
|
+
schnorr.sign x 700 ops/sec @ 1ms/op
|
|
884
|
+
schnorr.verify x 919 ops/sec @ 1ms/op
|
|
885
|
+
|
|
886
|
+
ed25519
|
|
887
|
+
init x 51 ops/sec @ 19ms/op
|
|
888
|
+
getPublicKey x 9,809 ops/sec @ 101μs/op
|
|
889
|
+
sign x 4,976 ops/sec @ 200μs/op
|
|
890
|
+
verify x 1,018 ops/sec @ 981μs/op
|
|
891
|
+
|
|
892
|
+
ed448
|
|
893
|
+
init x 19 ops/sec @ 50ms/op
|
|
894
|
+
getPublicKey x 3,723 ops/sec @ 268μs/op
|
|
895
|
+
sign x 1,759 ops/sec @ 568μs/op
|
|
896
|
+
verify x 344 ops/sec @ 2ms/op
|
|
886
897
|
|
|
887
898
|
p256
|
|
888
|
-
init x
|
|
889
|
-
getPublicKey x 6,
|
|
890
|
-
sign x 5,
|
|
891
|
-
verify x
|
|
899
|
+
init x 39 ops/sec @ 25ms/op
|
|
900
|
+
getPublicKey x 6,518 ops/sec @ 153μs/op
|
|
901
|
+
sign x 5,148 ops/sec @ 194μs/op
|
|
902
|
+
verify x 609 ops/sec @ 1ms/op
|
|
892
903
|
|
|
893
904
|
p384
|
|
894
905
|
init x 17 ops/sec @ 57ms/op
|
|
895
|
-
getPublicKey x 2,
|
|
896
|
-
sign x 2,
|
|
897
|
-
verify x
|
|
906
|
+
getPublicKey x 2,933 ops/sec @ 340μs/op
|
|
907
|
+
sign x 2,327 ops/sec @ 429μs/op
|
|
908
|
+
verify x 244 ops/sec @ 4ms/op
|
|
898
909
|
|
|
899
910
|
p521
|
|
900
|
-
init x
|
|
901
|
-
getPublicKey x 1,
|
|
902
|
-
sign x 1,
|
|
903
|
-
verify x
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
911
|
+
init x 8 ops/sec @ 112ms/op
|
|
912
|
+
getPublicKey x 1,484 ops/sec @ 673μs/op
|
|
913
|
+
sign x 1,264 ops/sec @ 790μs/op
|
|
914
|
+
verify x 124 ops/sec @ 8ms/op
|
|
915
|
+
|
|
916
|
+
ristretto255
|
|
917
|
+
add x 680,735 ops/sec @ 1μs/op
|
|
918
|
+
multiply x 10,766 ops/sec @ 92μs/op
|
|
919
|
+
encode x 15,835 ops/sec @ 63μs/op
|
|
920
|
+
decode x 15,972 ops/sec @ 62μs/op
|
|
921
|
+
|
|
922
|
+
decaf448
|
|
923
|
+
add x 345,303 ops/sec @ 2μs/op
|
|
924
|
+
multiply x 300 ops/sec @ 3ms/op
|
|
925
|
+
encode x 5,987 ops/sec @ 167μs/op
|
|
926
|
+
decode x 5,892 ops/sec @ 169μs/op
|
|
916
927
|
|
|
917
928
|
ecdh
|
|
918
|
-
├─x25519 x 1,
|
|
919
|
-
├─secp256k1 x
|
|
920
|
-
├─p256 x
|
|
921
|
-
├─p384 x
|
|
922
|
-
├─p521 x
|
|
923
|
-
└─x448 x
|
|
929
|
+
├─x25519 x 1,477 ops/sec @ 676μs/op
|
|
930
|
+
├─secp256k1 x 537 ops/sec @ 1ms/op
|
|
931
|
+
├─p256 x 512 ops/sec @ 1ms/op
|
|
932
|
+
├─p384 x 198 ops/sec @ 5ms/op
|
|
933
|
+
├─p521 x 99 ops/sec @ 10ms/op
|
|
934
|
+
└─x448 x 504 ops/sec @ 1ms/op
|
|
924
935
|
|
|
925
936
|
bls12-381
|
|
926
937
|
init x 36 ops/sec @ 27ms/op
|
|
927
|
-
getPublicKey
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
938
|
+
getPublicKey x 960 ops/sec @ 1ms/op
|
|
939
|
+
sign x 60 ops/sec @ 16ms/op
|
|
940
|
+
verify x 47 ops/sec @ 21ms/op
|
|
941
|
+
pairing x 125 ops/sec @ 7ms/op
|
|
942
|
+
pairing10 x 40 ops/sec @ 24ms/op ± 23.27% (min: 21ms, max: 48ms)
|
|
943
|
+
MSM 4096 scalars x points x 0 ops/sec @ 4655ms/op
|
|
932
944
|
aggregatePublicKeys/8 x 129 ops/sec @ 7ms/op
|
|
933
945
|
aggregatePublicKeys/32 x 34 ops/sec @ 28ms/op
|
|
934
|
-
aggregatePublicKeys/128 x 8 ops/sec @
|
|
935
|
-
aggregatePublicKeys/512 x 2 ops/sec @
|
|
936
|
-
aggregatePublicKeys/2048 x 0 ops/sec @
|
|
937
|
-
aggregateSignatures/8 x
|
|
938
|
-
aggregateSignatures/32 x
|
|
939
|
-
aggregateSignatures/128 x
|
|
940
|
-
aggregateSignatures/512 x
|
|
941
|
-
aggregateSignatures/2048 x 0 ops/sec @
|
|
946
|
+
aggregatePublicKeys/128 x 8 ops/sec @ 113ms/op
|
|
947
|
+
aggregatePublicKeys/512 x 2 ops/sec @ 449ms/op
|
|
948
|
+
aggregatePublicKeys/2048 x 0 ops/sec @ 1792ms/op
|
|
949
|
+
aggregateSignatures/8 x 62 ops/sec @ 15ms/op
|
|
950
|
+
aggregateSignatures/32 x 16 ops/sec @ 60ms/op
|
|
951
|
+
aggregateSignatures/128 x 4 ops/sec @ 238ms/op
|
|
952
|
+
aggregateSignatures/512 x 1 ops/sec @ 946ms/op
|
|
953
|
+
aggregateSignatures/2048 x 0 ops/sec @ 3774ms/op
|
|
942
954
|
|
|
943
955
|
hash-to-curve
|
|
944
956
|
hash_to_field x 91,600 ops/sec @ 10μs/op
|
package/_shortw_utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_shortw_utils.d.ts","sourceRoot":"","sources":["src/_shortw_utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAe,MAAM,2BAA2B,CAAC;AAGnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,KAAK;;gBAGnB,UAAU,WAAW,UAAU,EAAE;;EAGhD;AAED,KAAK,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC;AAC3E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK;mBACtC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAG+
|
|
1
|
+
{"version":3,"file":"_shortw_utils.d.ts","sourceRoot":"","sources":["src/_shortw_utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAe,MAAM,2BAA2B,CAAC;AAGnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,KAAK;;gBAGnB,UAAU,WAAW,UAAU,EAAE;;EAGhD;AAED,KAAK,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC;AAC3E,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK;mBACtC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAG+5uB,CAAC;;;;;;kFAAwmB,CAAC;+HAA2F,CAAC;2GAAuE,CAAC;;;;qGAAoH,CAAC;;;;;;;+BAA+R,CAAC,eAAe,CAAC;;GAD9mxB"}
|
package/abstract/bls.d.ts
CHANGED
|
@@ -1,47 +1,37 @@
|
|
|
1
1
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2
|
-
import { AffinePoint } from './curve.js';
|
|
3
2
|
import { IField } from './modular.js';
|
|
4
3
|
import { Hex, PrivKey, CHash } from './utils.js';
|
|
5
4
|
import { MapToCurve, Opts as HTFOpts, htfBasicOpts, createHasher } from './hash-to-curve.js';
|
|
6
5
|
import { CurvePointsType, ProjPointType as ProjPointType, CurvePointsRes } from './weierstrass.js';
|
|
6
|
+
import type { Fp2, Fp6, Fp12, Fp2Bls, Fp12Bls } from './tower.js';
|
|
7
7
|
/**
|
|
8
|
-
* BLS
|
|
9
|
-
*
|
|
8
|
+
* BLS != BLS.
|
|
9
|
+
* The file implements BLS (Boneh-Lynn-Shacham) signatures.
|
|
10
|
+
* Used in both BLS (Barreto-Lynn-Scott) and BN (Barreto-Naehrig)
|
|
11
|
+
* families of pairing-friendly curves.
|
|
10
12
|
* Consists of two curves: G1 and G2:
|
|
11
13
|
* - G1 is a subgroup of (x, y) E(Fq) over y² = x³ + 4.
|
|
12
14
|
* - G2 is a subgroup of ((x₁, x₂+i), (y₁, y₂+i)) E(Fq²) over y² = x³ + 4(1 + i) where i is √-1
|
|
13
15
|
* - Gt, created by bilinear (ate) pairing e(G1, G2), consists of p-th roots of unity in
|
|
14
16
|
* Fq^k where k is embedding degree. Only degree 12 is currently supported, 24 is not.
|
|
15
17
|
* Pairing is used to aggregate and verify signatures.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* There are two main ways to use it:
|
|
19
|
+
* 1. Fp for short private keys, Fp₂ for signatures
|
|
20
|
+
* 2. Fp for short signatures, Fp₂ for private keys
|
|
18
21
|
**/
|
|
19
22
|
type Fp = bigint;
|
|
23
|
+
export type TwistType = 'multiplicative' | 'divisive';
|
|
20
24
|
export type ShortSignatureCoder<Fp> = {
|
|
21
25
|
fromHex(hex: Hex): ProjPointType<Fp>;
|
|
22
26
|
toRawBytes(point: ProjPointType<Fp>): Uint8Array;
|
|
23
27
|
toHex(point: ProjPointType<Fp>): string;
|
|
24
28
|
};
|
|
25
|
-
export type SignatureCoder<
|
|
26
|
-
fromHex(hex: Hex): ProjPointType<
|
|
27
|
-
toRawBytes(point: ProjPointType<
|
|
28
|
-
toHex(point: ProjPointType<
|
|
29
|
-
};
|
|
30
|
-
type Fp2Bls<Fp, Fp2> = IField<Fp2> & {
|
|
31
|
-
reim: (num: Fp2) => {
|
|
32
|
-
re: Fp;
|
|
33
|
-
im: Fp;
|
|
34
|
-
};
|
|
35
|
-
multiplyByB: (num: Fp2) => Fp2;
|
|
36
|
-
frobeniusMap(num: Fp2, power: number): Fp2;
|
|
37
|
-
};
|
|
38
|
-
type Fp12Bls<Fp2, Fp12> = IField<Fp12> & {
|
|
39
|
-
frobeniusMap(num: Fp12, power: number): Fp12;
|
|
40
|
-
multiplyBy014(num: Fp12, o0: Fp2, o1: Fp2, o4: Fp2): Fp12;
|
|
41
|
-
conjugate(num: Fp12): Fp12;
|
|
42
|
-
finalExponentiate(num: Fp12): Fp12;
|
|
29
|
+
export type SignatureCoder<Fp> = {
|
|
30
|
+
fromHex(hex: Hex): ProjPointType<Fp>;
|
|
31
|
+
toRawBytes(point: ProjPointType<Fp>): Uint8Array;
|
|
32
|
+
toHex(point: ProjPointType<Fp>): string;
|
|
43
33
|
};
|
|
44
|
-
export type CurveType
|
|
34
|
+
export type CurveType = {
|
|
45
35
|
G1: Omit<CurvePointsType<Fp>, 'n'> & {
|
|
46
36
|
ShortSignature: SignatureCoder<Fp>;
|
|
47
37
|
mapToCurve: MapToCurve<Fp>;
|
|
@@ -55,19 +45,28 @@ export type CurveType<Fp, Fp2, Fp6, Fp12> = {
|
|
|
55
45
|
fields: {
|
|
56
46
|
Fp: IField<Fp>;
|
|
57
47
|
Fr: IField<bigint>;
|
|
58
|
-
Fp2: Fp2Bls
|
|
48
|
+
Fp2: Fp2Bls;
|
|
59
49
|
Fp6: IField<Fp6>;
|
|
60
|
-
Fp12: Fp12Bls
|
|
50
|
+
Fp12: Fp12Bls;
|
|
61
51
|
};
|
|
62
52
|
params: {
|
|
63
|
-
|
|
53
|
+
ateLoopSize: bigint;
|
|
54
|
+
xNegative: boolean;
|
|
64
55
|
r: bigint;
|
|
56
|
+
twistType: TwistType;
|
|
65
57
|
};
|
|
66
58
|
htfDefaults: HTFOpts;
|
|
67
59
|
hash: CHash;
|
|
68
60
|
randomBytes: (bytesLength?: number) => Uint8Array;
|
|
61
|
+
postPrecompute?: (Rx: Fp2, Ry: Fp2, Rz: Fp2, Qx: Fp2, Qy: Fp2, pointAdd: (Rx: Fp2, Ry: Fp2, Rz: Fp2, Qx: Fp2, Qy: Fp2) => {
|
|
62
|
+
Rx: Fp2;
|
|
63
|
+
Ry: Fp2;
|
|
64
|
+
Rz: Fp2;
|
|
65
|
+
}) => void;
|
|
69
66
|
};
|
|
70
|
-
|
|
67
|
+
type PrecomputeSingle = [Fp2, Fp2, Fp2][];
|
|
68
|
+
type Precompute = PrecomputeSingle[];
|
|
69
|
+
export type CurveFn = {
|
|
71
70
|
getPublicKey: (privateKey: PrivKey) => Uint8Array;
|
|
72
71
|
getPublicKeyForShortSignatures: (privateKey: PrivKey) => Uint8Array;
|
|
73
72
|
sign: {
|
|
@@ -93,30 +92,34 @@ export type CurveFn<Fp, Fp2, Fp6, Fp12> = {
|
|
|
93
92
|
(signatures: Hex[]): Uint8Array;
|
|
94
93
|
(signatures: ProjPointType<Fp>[]): ProjPointType<Fp>;
|
|
95
94
|
};
|
|
96
|
-
|
|
95
|
+
millerLoopBatch: (pairs: [Precompute, Fp, Fp][]) => Fp12;
|
|
97
96
|
pairing: (P: ProjPointType<Fp>, Q: ProjPointType<Fp2>, withFinalExponent?: boolean) => Fp12;
|
|
97
|
+
pairingBatch: (pairs: {
|
|
98
|
+
g1: ProjPointType<Fp>;
|
|
99
|
+
g2: ProjPointType<Fp2>;
|
|
100
|
+
}[], withFinalExponent?: boolean) => Fp12;
|
|
98
101
|
G1: CurvePointsRes<Fp> & ReturnType<typeof createHasher<Fp>>;
|
|
99
102
|
G2: CurvePointsRes<Fp2> & ReturnType<typeof createHasher<Fp2>>;
|
|
100
103
|
Signature: SignatureCoder<Fp2>;
|
|
101
104
|
ShortSignature: ShortSignatureCoder<Fp>;
|
|
102
105
|
params: {
|
|
103
|
-
|
|
106
|
+
ateLoopSize: bigint;
|
|
104
107
|
r: bigint;
|
|
105
108
|
G1b: bigint;
|
|
106
109
|
G2b: Fp2;
|
|
107
110
|
};
|
|
108
111
|
fields: {
|
|
109
112
|
Fp: IField<Fp>;
|
|
110
|
-
Fp2: Fp2Bls
|
|
113
|
+
Fp2: Fp2Bls;
|
|
111
114
|
Fp6: IField<Fp6>;
|
|
112
|
-
Fp12: Fp12Bls
|
|
115
|
+
Fp12: Fp12Bls;
|
|
113
116
|
Fr: IField<bigint>;
|
|
114
117
|
};
|
|
115
118
|
utils: {
|
|
116
119
|
randomPrivateKey: () => Uint8Array;
|
|
117
|
-
calcPairingPrecomputes: (p:
|
|
120
|
+
calcPairingPrecomputes: (p: ProjPointType<Fp2>) => Precompute;
|
|
118
121
|
};
|
|
119
122
|
};
|
|
120
|
-
export declare function bls
|
|
123
|
+
export declare function bls(CURVE: CurveType): CurveFn;
|
|
121
124
|
export {};
|
|
122
125
|
//# sourceMappingURL=bls.d.ts.map
|
package/abstract/bls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bls.d.ts","sourceRoot":"","sources":["../src/abstract/bls.ts"],"names":[],"mappings":"AAAA,sEAAsE;
|
|
1
|
+
{"version":3,"file":"bls.d.ts","sourceRoot":"","sources":["../src/abstract/bls.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAGtE,OAAO,EAAE,MAAM,EAAoC,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAyB,MAAM,YAAY,CAAC;AAExE,OAAO,EACL,UAAU,EAAE,IAAI,IAAI,OAAO,EAAuB,YAAY,EAC9D,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,aAAa,IAAI,aAAa,EAC9B,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAElE;;;;;;;;;;;;;;IAcI;AAEJ,KAAK,EAAE,GAAG,MAAM,CAAC;AAKjB,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEtD,MAAM,MAAM,mBAAmB,CAAC,EAAE,IAAI;IACpC,OAA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