8#define PUT(x) std::cout << #x "\t=" << (x).toString() << std::endl
15 printf(
"%s : ok\n", msg);
17 printf(
"%s : ng\n", msg);
22template<
class T,
class S>
26 printf(
"%s : ok\n", msg);
40 "12723517038133731887338407189719511622662176727675373276651903807414909099441",
41 "4168783608814932154536427934509895782246573715297911553964171371032945126671",
42 "13891744915211034074451795021214165905772212241412891944830863846330766296736",
43 "7937318970632701341203597196594272556916396164729705624521405069090520231616",
57 puts(
"order of group");
70 const Mpz a(
"123456789012345");
71 const Mpz b(
"998752342342342342424242421");
83 assertEqual(
"check g1 * c = g1 * a + g1 * b", Pc, out);
101 assertEqual(
"e(g2 * a, g1) = e(g2, g1)^a", ea1, ea2);
109 assertEqual(
"e(g2a, g1 * b) = e(g2, g1)^b", eb1, eb2);
130 Ec1 g1bt = g1; g1bt.
mul(b);
133 printf(
"errNum = %d\n", errNum);
void mul(const Fp12 &rhs)
void pairing(const Ec2 &ec2, const Ec1 &ec1)
void assertBool(const char *msg, bool b)
void assertEqual(const char *msg, const T &a, const S &b)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define T(meth, val, expected)