Closed ebfull closed 5 years ago
This is a standard optimization already present in most pairing libraries. Closes #9.
Instead of calling
pairing(&a, &b)
if b is fixed in advance, you can precompute b_prepared = G2Prepared::from(b) and instead compute
b
b_prepared = G2Prepared::from(b)
multi_miller_loop(&[(&a, &b_prepared)]).final_exponentiation()
and also, you can use this new multi_miller_loop API to compute the combination of many pairings like
multi_miller_loop
multi_miller_loop(&[(&a, &b_prepared), (&c, &d_prepared)]).final_exponentiation()
and use the separate application of final_exponentiation() to perform batch equation checking while amortizing away the cost of applying the final exponentiation.
final_exponentiation()
This is a standard optimization already present in most pairing libraries. Closes #9.
Instead of calling
if
b
is fixed in advance, you can precomputeb_prepared = G2Prepared::from(b)
and instead computeand also, you can use this new
multi_miller_loop
API to compute the combination of many pairings likeand use the separate application of
final_exponentiation()
to perform batch equation checking while amortizing away the cost of applying the final exponentiation.