#include "../java/bn254_if.hpp"
#include <iostream>
Go to the source code of this file.
◆ PUT
Value:std::cout << #x "\t=" << (x).toString() << std::endl
Definition at line 8 of file java_api.cpp.
◆ assertBool()
void assertBool |
( |
const char * | msg, |
|
|
bool | b ) |
Definition at line 12 of file java_api.cpp.
13{
14 if (b) {
16 } else {
18 errNum++;
19 }
20}
LOGGING_API void printf(Category category, const char *format,...)
◆ assertEqual()
void assertEqual |
( |
const char * | msg, |
|
|
const T & | a, |
|
|
const S & | b ) |
Definition at line 23 of file java_api.cpp.
24{
27 } else {
30 errNum++;
31 }
32}
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
◆ main()
Definition at line 46 of file java_api.cpp.
47{
53 );
54
57 puts("order of group");
60 {
64 }
65 {
69 }
70 const Mpz a(
"123456789012345");
71 const Mpz b(
"998752342342342342424242421");
72
73
74 {
82
83 assertEqual(
"check g1 * c = g1 * a + g1 * b", Pc, out);
84 }
85
87
90 {
94 }
101 assertEqual(
"e(g2 * a, g1) = e(g2, g1)^a", ea1, ea2);
102
109 assertEqual(
"e(g2a, g1 * b) = e(g2, g1)^b", eb1, eb2);
110
122
123
124
125 g2a = g2;
127 g1b = g1;
130 Ec1 g1bt = g1; g1bt.
mul(b);
133 printf(
"errNum = %d\n", errNum);
134}
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)
◆ g2c
Initial value:= {
"12723517038133731887338407189719511622662176727675373276651903807414909099441",
"4168783608814932154536427934509895782246573715297911553964171371032945126671",
"13891744915211034074451795021214165905772212241412891944830863846330766296736",
"7937318970632701341203597196594272556916396164729705624521405069090520231616",
}