26 #ifndef CRYPTO3_ALGEBRA_PAIRING_EDWARDS_183_TATE_MILLER_LOOP_HPP
27 #define CRYPTO3_ALGEBRA_PAIRING_EDWARDS_183_TATE_MILLER_LOOP_HPP
29 #include <nil/crypto3/multiprecision/number.hpp>
30 #include <nil/crypto3/multiprecision/cpp_int.hpp>
41 template<std::
size_t Version = 183>
53 static typename gt_type::value_type
process(
const policy_type::tate_g1_precomp &prec_P,
54 const policy_type::tate_g2_precomp &prec_Q) {
56 typename gt_type::value_type f = gt_type::value_type::one();
58 bool found_one =
false;
60 for (
long i = policy_type::scalar_field_bits - 1; i >= 0; --i) {
62 nil::crypto3::multiprecision::bit_test(policy_type::scalar_field_modulus, i);
72 typename policy_type::Fq_conic_coefficients cc = prec_P[idx++];
73 typename gt_type::value_type g_RR_at_Q =
typename gt_type::value_type(
74 Fq3(cc.c_XZ, Fq(0l), Fq(0l)) + cc.c_XY * prec_Q.y0, cc.c_ZZ * prec_Q.eta);
75 f = f.squared() * g_RR_at_Q;
79 typename gt_type::value_type g_RP_at_Q =
typename gt_type::value_type(
80 Fq3(cc.c_XZ, Fq(0l), Fq(0l)) + cc.c_XY * prec_Q.y0, cc.c_ZZ * prec_Q.eta);
Definition: pairing/detail/alt_bn128/params.hpp:38
Definition: pairing/detail/edwards/183/types.hpp:38
static gt_type::value_type process(const policy_type::tate_g1_precomp &prec_P, const policy_type::tate_g2_precomp &prec_Q)
Definition: tate_miller_loop.hpp:53
Definition: tate_miller_loop.hpp:42
A struct representing a Edwards curve, providing 128 bits of security.
Definition: curves/edwards.hpp:51
policy_type::gt_field_type gt_type
Definition: curves/edwards.hpp:69