The Verify function computes e(P1, Q1) == e(P2, Q2) where e is pairing.
But Pairing(P, Q) = FE(ML(P, Q)) where ML is MillerLoop and FE is FinalExponentiation.
e(P1, Q1) == e(P2, Q2)
<=> e(P1, Q1) e(-P2, Q2) == 1
<=> FE(ML(P1, Q1) ML(P2, Q2)) == 1 then I added CompareTwoPairings, which can reduce one FE.
I got the following speed on Core i7-7700 3.6GHz:
The
Verify
function computes e(P1, Q1) == e(P2, Q2) where e is pairing. But Pairing(P, Q) = FE(ML(P, Q)) where ML is MillerLoop and FE is FinalExponentiation. e(P1, Q1) == e(P2, Q2) <=> e(P1, Q1) e(-P2, Q2) == 1 <=> FE(ML(P1, Q1) ML(P2, Q2)) == 1 then I addedCompareTwoPairings
, which can reduce one FE. I got the following speed on Core i7-7700 3.6GHz:original g1pubs
optimized g1pubs
original g2pubs
optimized g2pubs