We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 270e5d6 + 0cdef32 commit 48a97b7Copy full SHA for 48a97b7
1 file changed
src/abstract/bls.ts
@@ -424,8 +424,12 @@ function createBlsSig<P, S>(
424
// Before it was G.negate() in G2, now it's always pubKey.negate
425
// e(P, -Q)===e(-P, Q)==e(P, Q)^-1. Negate can be done anywhere (as long it is done once per pair).
426
// We just moving sign, but since pairing is multiplicative, we doing X * X^-1 = 1
427
- const exp = pairingBatch([pair(P, Hm), pair(G, S)]);
428
- return Fp12.eql(exp, Fp12.ONE);
+ try {
+ const exp = pairingBatch([pair(P, Hm), pair(G, S)]);
429
+ return Fp12.eql(exp, Fp12.ONE);
430
+ } catch {
431
+ return false;
432
+ }
433
},
434
// https://ethresear.ch/t/fast-verification-of-multiple-bls-signatures/5407
435
// e(G, S) = e(G, SUM(n)(Si)) = MUL(n)(e(G, Si))
0 commit comments