24 printf(
"Running bilinearity tests:\n");
32 P.print_coordinates();
35 Q.print_coordinates();
43 printf(
"Pairing bilinearity tests (three must match):\n");
44 GT<ppT> ans1 = ppT::reduced_pairing(sP, Q);
45 GT<ppT> ans2 = ppT::reduced_pairing(
P, sQ);
46 GT<ppT> ans3 = ppT::reduced_pairing(
P, Q)^
s;
53 assert(ans1 != GT_one);
71 const Fqk<ppT> ans_1 = ppT::miller_loop(prec_P1, prec_Q1);
72 const Fqk<ppT> ans_2 = ppT::miller_loop(prec_P2, prec_Q2);
73 const Fqk<ppT> ans_12 = ppT::double_miller_loop(prec_P1, prec_Q1, prec_P2, prec_Q2);
74 assert(ans_1 * ans_2 == ans_12);
82 printf(
"Running bilinearity tests:\n");
96 printf(
"Pairing bilinearity tests (three must match):\n");
97 GT<ppT> ans1 = ppT::affine_reduced_pairing(sP, Q);
98 GT<ppT> ans2 = ppT::affine_reduced_pairing(
P, sQ);
99 GT<ppT> ans3 = ppT::affine_reduced_pairing(
P, Q)^
s;
103 assert(ans1 == ans2);
104 assert(ans2 == ans3);
106 assert(ans1 != GT_one);
143 printf(
"All tests here depend on assert() which is disabled by -DNDEBUG. Please recompile and run again.\n");
static void init_public_params()
static void init_public_params()
static void init_public_params()
static void init_public_params()
static void init_public_params()
LOGGING_API void printf(Category category, const char *format,...)
typename EC_ppT::Fqk_type Fqk
typename EC_ppT::G1_precomp_type G1_precomp
typename EC_ppT::G1_type G1
typename EC_ppT::Fp_type Fr
typename EC_ppT::GT_type GT
typename EC_ppT::G2_precomp_type G2_precomp
void affine_pairing_test()
void double_miller_loop_test()