/dports/math/miracl/miracl-5.6/ |
H A D | ecn.h | 64 class ECn 90 ECn& operator=(const ECn& b) {epoint_copy(b.p,p);return *this;} 127 friend ECn operator-(const ECn&); 128 friend void multi_add(int,ECn *,ECn *); 129 friend void double_add(ECn&,ECn&,ECn&,ECn&,big&,big&); 131 friend ECn mul(const Big&, const ECn&, const Big&, const ECn&); 132 friend ECn mul(int, const Big *, ECn *); 137 friend BOOL operator==(const ECn& a,const ECn& b) 139 friend BOOL operator!=(const ECn& a,const ECn& b) 142 friend ECn operator*(const Big &,const ECn&); [all …]
|
H A D | ecn.cpp | 66 int ECn::add(const ECn& b,big *lam,big *ex1,big *ex2) const in add() 74 int ECn::sub(const ECn& b,big *lam,big *ex1,big *ex2) const in sub() 88 ECn operator-(const ECn& e) in operator -() 91 ECn operator*(const Big& e,const ECn& b) in operator *() 93 ECn t; in operator *() 100 ECn mul(const Big& e1,const ECn& p1,const Big& e2,const ECn& p2) in mul() 102 ECn t; in mul() 109 ECn mul(int n,const Big *y,ECn *x) in mul() 111 ECn w; in mul() 142 void multi_add(int m,ECn *x, ECn *w) in multi_add() [all …]
|
H A D | ake2cpw.cpp | 44 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 50 ZZn2 g(ECn& A,ECn& B,ECn& C,ECn& D,ECn& P,ECn& Q) in g() 100 BOOL nw(ECn& P,ECn& Q,Big& q,ZZn& r) in nw() 104 ECn A=P; in nw() 105 ECn B=Q; in nw() 179 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 181 ECn Q; in hash_and_map() 199 ECn Alice,Bob,sA,sB; in main() 200 ECn B2,Server,sS; in main()
|
H A D | bls_ver.cpp | 58 ZZn6 line(ECn& A,ECn& C,ZZn& slope,ZZn3& Qx,ZZn3& Qy) in line() 75 ZZn6 g(ECn& A,ECn& B,ECn& C,ECn& D,ZZn3& Qx,ZZn3& Qy,ZZn3& Sx,ZZn3& Sy) in g() 81 ECn P; in g() 100 BOOL fast_double_tate_pairing(ECn& P,ZZn3& Qx,ZZn3& Qy,ECn& R,ZZn3& Sx,ZZn3& Sy,Big& q,Big &cf) in fast_double_tate_pairing() 103 ECn A1,A2,P2,R2,t1[16],*t2; in fast_double_tate_pairing() 181 BOOL ecap2(ECn& P,ECn3 Q,ECn& R,ECn3 &S,Big& order,Big& cf) in ecap2() 183 ECn PP=P; in ecap2() 184 ECn RR=R; in ecap2() 241 ECn hash_and_map(char *ID,int len) in hash_and_map() 243 ECn Q; in hash_and_map() [all …]
|
H A D | ake2sst.cpp | 58 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 83 ZZn2 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn& a,ZZn& d) in line() 120 ZZn2 g(ECn& A,ECn& B,ZZn& a,ZZn& d) in g() 124 ECn P=A; in g() 146 BOOL tate(ECn& P,ECn& Q,Big& q,ZZn& r) in tate() 152 ECn A; in tate() 248 ECn Hash(char *ID) in Hash() 250 ECn T; in Hash() 263 ECn T; in hash_and_map() 283 ECn Alice,Bob,sA,sB; in main() [all …]
|
H A D | ake2cpt.cpp | 62 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 87 ZZn2 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn& a,ZZn& d) in line() 133 ZZn2 g(ECn& A,ECn& B,ZZn& a,ZZn& d) in g() 137 ECn P=A; in g() 159 BOOL tate(ECn& P,ECn& Q,Big& q,ZZn& r) in tate() 165 ECn A; in tate() 282 ECn Hash(char *ID) in Hash() 284 ECn T; in Hash() 297 ECn T; in hash_and_map() 317 ECn Alice,Bob,sA,sB; in main() [all …]
|
H A D | ake2nsst.cpp | 94 ZZn2 line(ECn& A,ECn& C,ZZn& slope,ZZn& Qx,ZZn& Qy,ZZn& bQx,ZZn2& w2) in line() 125 ZZn2 g(ECn& A,ECn& B,ZZn& Qx,ZZn& Qy,ZZn& bQx,ZZn2& w2) in g() 129 ECn P=A; in g() 139 ECn Phi(ECn A,ZZn beta) in Phi() 158 BOOL tate(ECn& P,ECn Q,Big& q,ZZn& r) in tate() 165 ECn W,A,B; in tate() 302 ECn Hash(char *ID) in Hash() 304 ECn T; in Hash() 317 ECn T; in hash_and_map() 337 ECn Alice,Bob,sA,sB; in main() [all …]
|
H A D | ake1kmt.cpp | 132 void g(ECn& A,ECn& B,ZZn& Qx,ZZn& Qy,ZZn& num,ZZn& denom,BOOL last) in g() 193 ECn A,W; in fast_tate_pairing() 370 ECn Q; in hash_and_map() 378 ECn hash(char *ID) in hash() 380 ECn Q; in hash() 388 ECn map_f(ECn& P,ZZn& zeta) in map_f() 390 ECn R; in map_f() 399 ECn pi1(ECn P,ZZn& zeta,Big lambda) in pi1() 401 ECn T,R; in pi1() 408 ECn pi2(ECn P,ZZn& zeta,Big lambda) in pi2() [all …]
|
H A D | ake6fsta.cpp | 65 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 72 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 108 ZZn6 line(ECn& A,ECn& C,ZZn& slope,ECn& Q) in line() 141 ZZn6 g(ECn& A,ECn& B,ECn& Q) in g() 146 ECn P=A; in g() 164 BOOL fast_pairing(ECn& P,ECn& Q,Big& q,Big &x,ZZn2 &X, ZZn6 &res) in fast_pairing() 167 ECn A; in fast_pairing() 280 ECn hash_and_map(char *ID,Big& cof) in hash_and_map() 282 ECn Q; in hash_and_map() 297 ECn Alice,Bob,sA,sB,Server,sS; in main()
|
H A D | ecnzzn.h | 14 extern void force(ZZn&,ZZn&,ZZn&,ECn&); 15 extern void extract(ECn&,ZZn&,ZZn&,ZZn&); 19 extern void force(ZZn&,ZZn&,ECn&); 20 extern void extract(ECn&,ZZn&,ZZn&);
|
H A D | ake6mntt.cpp | 85 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 92 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 110 ZZn6 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn3& Qx,ZZn3& Qy) in line() 154 ZZn6 g(ECn& A,ECn& B,ZZn3& Qx,ZZn3& Qy) in g() 160 ECn P=A; in g() 182 ECn A,P2,t[8]; in fast_tate_pairing() 310 BOOL ecap(ECn& P,ECn3& Q,Big& order,Big& cf,ZZn6& res) in ecap() 313 ECn PP=P; in ecap() 422 ECn hash_and_map(char *ID) in hash_and_map() 424 ECn Q; in hash_and_map() [all …]
|
H A D | ake4cpt.cpp | 55 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 62 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 80 ZZn4 line(ECn& A,ECn& C,ZZn& slope,ZZn2& Qx,ZZn2& Qy) in line() 113 ZZn4 g(ECn& A,ECn& B,ZZn2& Qx,ZZn2& Qy) in g() 119 ECn P=A; in g() 139 BOOL tate(ECn& P,ECn2 Q,Big& q,Big *cf,ZZn2 &Fr,ZZn2& r) in tate() 142 ECn A; in tate() 268 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 270 ECn Q; in hash_and_map() 302 ECn Alice,Bob,sA,sB; in main()
|
H A D | ake12bne.cpp | 82 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 88 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 125 ZZn12 line(ECn& A,ECn& C,ZZn& slope,ZZn2& Qx,ZZn2& Qy) in line() 156 ZZn12 g(ECn& A,ECn& B,ZZn2& Qx,ZZn2& Qy) in g() 163 ECn P=A; in g() 185 ECn A; in fast_pairing() 278 BOOL ecap(ECn& P,ECn2& Q,Big& x,ZZn2 &X,ZZn6& r) in ecap() 281 ECn PP=P; in ecap() 384 ECn hash_and_map(char *ID) in hash_and_map() 386 ECn Q; in hash_and_map() [all …]
|
H A D | ake4mntt.cpp | 62 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 69 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 87 ZZn4 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn2& Qx,ZZn2& Qy) in line() 122 ZZn4 g(ECn& A,ECn& B,ZZn2& Qx,ZZn2& Qy) in g() 127 ECn P=A; in g() 146 BOOL tate(ECn& P,ECn2 Q,Big& q,ZZn2 &Fr,Big cof,ZZn2& r) in tate() 149 ECn A,P2,t[8]; in tate() 321 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 323 ECn Q; in hash_and_map() 355 ECn Alice,Bob,sA,sB; in main()
|
H A D | ake2cpt2.cpp | 63 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 70 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 88 ZZn2 line(ECn& A,ECn& C,ZZn& slope,ZZn2& Qx,ZZn2& Qy) in line() 139 ZZn2 g(ECn& A,ECn& B,ZZn2& Qx,ZZn2& Qy) in g() 143 ECn P=A; in g() 156 ECn R; in Trace2() 176 BOOL tate(ECn& P,ECn2& Q,Big& q,ZZn& r) in tate() 182 ECn A; in tate() 295 ECn Trace(ECn2 P) in Trace() 297 ECn R; in Trace() [all …]
|
H A D | ake4sbt.cpp | 63 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 70 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 88 ZZn4 line(ECn& A,ECn& C,ZZn& slope,ZZn2& Qx,ZZn2& Qy) in line() 117 ZZn4 g(ECn& A,ECn& B,ZZn2& Qx,ZZn2& Qy) in g() 122 ECn P=A; in g() 141 BOOL power_tate(ECn& P,ECn2 Q,Big& q,Big *cf,ZZn2 &Fr,Big &e,ZZn2& r) in power_tate() 144 ECn A; in power_tate() 292 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 294 ECn Q; in hash_and_map() 327 ECn Alice,Bob,sA,sB; in main()
|
H A D | ake8cpt.cpp | 60 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 67 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 85 ZZn8 line(ECn& A,ECn& C,ZZn& slope,ZZn4& Qx,ZZn4& Qy) in line() 114 ZZn8 g(ECn& A,ECn& B,ZZn4& Qx,ZZn4& Qy) in g() 119 ECn P=A; in g() 139 BOOL power_tate(ECn& P,ECn4 Q,Big& q,Big *cf,ZZn2 &Fr,Big &e,ZZn4& r) in power_tate() 142 ECn A; in power_tate() 304 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 306 ECn Q; in hash_and_map() 340 ECn Alice,Bob,sA,sB; in main()
|
H A D | ecnzzn.cpp | 10 void force(ZZn& x,ZZn& y,ZZn& z,ECn& A) in force() 18 void extract(ECn &A, ZZn& x,ZZn& y,ZZn& z) in extract() 30 void force(ZZn& x,ZZn& y,ECn& A) in force() 37 void extract(ECn& A,ZZn& x,ZZn& y) in extract()
|
H A D | ssp_pair.cpp | 234 ZZn2 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn& Px,ZZn& Py) in line() 270 ZZn2 g(ECn& A,ECn& B,ZZn& Px,ZZn& Py) in g() 275 ECn P=A; in g() 351 ECn A,Q,B; in precomp_for_pairing() 391 ECn *Q,*A; in multi_miller() 392 ECn P; in multi_miller() 398 Q=new ECn[n]; in multi_miller() 399 A=new ECn[n]; in multi_miller() 455 ECn A,Q; in miller_loop() 456 ECn P; in miller_loop() [all …]
|
H A D | ake8bwt.cpp | 68 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 75 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 93 ZZn8 line(ECn& A,ECn& C,ZZn& slope,ZZn4& Qx,ZZn4& Qy) in line() 122 void g(ECn& A,ECn& B,ZZn4& Qx,ZZn4& Qy,ZZn8& num,BOOL first) in g() 128 ECn P=A; in g() 152 BOOL power_tate(ECn& P,ECn4 Q,Big& q,Big *cf,ZZn2 &Fr,Big &e,ZZn4& r) in power_tate() 155 ECn A,P2,t[8]; in power_tate() 356 ECn hash_and_map(char *ID,Big cof) in hash_and_map() 358 ECn Q; in hash_and_map() 392 ECn Alice,Bob,sA,sB; in main()
|
H A D | ake6mntx.cpp | 71 void extract(ECn& A,ZZn& x,ZZn& y) in extract() 78 void extract(ECn& A,ZZn& x,ZZn& y,ZZn& z) in extract() 140 ZZn6 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn3& Qx,ZZn3& Qy) in line() 179 ZZn6 g(ECn& A,ECn& B,ZZn3& Qx,ZZn3& Qy) in g() 184 ECn P=A; in g() 209 ECn A,P2,t[PRECOMP]; in fast_tate_pairing() 300 BOOL ecap(ECn& P,ECn3& Q,Big& x,ZZn2 &X,ZZn6& res) in ecap() 303 ECn PP=P; in ecap() 415 ECn hash_and_map(char *ID) in hash_and_map() 417 ECn Q; in hash_and_map() [all …]
|
H A D | cp_pair.cpp | 225 ZZn2 line(ECn& A,ECn& C,ECn& B,int type,ZZn& slope,ZZn& ex1,ZZn& ex2,ZZn& Px,ZZn& Py) in line() 261 ZZn2 g(ECn& A,ECn& B,ZZn& Px,ZZn& Py) in g() 266 ECn P=A; in g() 343 ECn A,Q,B; in precomp_for_pairing() 383 ECn *Q,*A; in multi_miller() 384 ECn P; in multi_miller() 390 Q=new ECn[n]; in multi_miller() 447 ECn A,Q; in miller_loop() 448 ECn P; in miller_loop() 943 ECn v=w.g; in precomp_for_mult() [all …]
|
H A D | pairing_3.h | 57 #define G2_TYPE ECn 118 ECn g; 120 ECn *mtable; // pointer to values precomputed for multiplication 292 extern void force(ZZn&,ZZn&,ZZn&,ECn&); 293 extern void extract(ECn&,ZZn&,ZZn&,ZZn&); 297 extern void force(ZZn&,ZZn&,ECn&); 298 extern void extract(ECn&,ZZn&,ZZn&);
|
H A D | pairing_1.h | 55 #define G1_TYPE ECn 229 extern void force(ZZn&,ZZn&,ZZn&,ECn&); 230 extern void extract(ECn&,ZZn&,ZZn&,ZZn&); 234 extern void force(ZZn&,ZZn&,ECn&); 235 extern void extract(ECn&,ZZn&,ZZn&);
|
H A D | bls_sign.cpp | 64 ECn hash_and_map(char *ID,int len) in hash_and_map() 66 ECn Q; in hash_and_map() 80 ECn PM; in main()
|