12345678910111213141516171819202122 |
- #include "pairing.hpp"
- fp12e_t OptimalAte(const curvepoint_fp_t& op1, const twistpoint_fp2_t& op2)
- {
- fp12e_t retval;
- optate(retval, op2, op1);
- return retval;
- }
- Quadripoint pairing(const Bipoint<curvepoint_fp_t>& op1, const Bipoint<twistpoint_fp2_t>& op2)
- {
- Quadripoint retval;
- retval[0] = OptimalAte(op1[0], op2[0]);
- retval[1] = OptimalAte(op1[0], op2[1]);
- retval[2] = OptimalAte(op1[1], op2[0]);
- retval[3] = OptimalAte(op1[1], op2[1]);
-
- return retval;
- }
|