Searched refs:modinv (Results 1 – 2 of 2) sorted by relevance
/freebsd/crypto/libecc/src/arithmetic_tests/ |
H A D | arithmetic_tests_generator.py | 1073 def modinv(a, m): function 1117 mpinv = 2**wlen - (modinv(nn_p, 2**wlen)) 1667 nn_exp_v = modinv(nn_x, nn_m) 1686 nn_exp_v = modinv(nn_x, 2**exp) 1709 out = (nn_in1 * nn_in2 * modinv(nn_r, nn_mod)) % nn_mod 1803 fp_exp_res = (fp_val1 * modinv(fp_val2, nn_p)) % nn_p 1860 fp_exp_res = (fp_val1_mont * fp_val2_mont * modinv(nn_r%nn_p, nn_p)) % nn_p 1862 fp_exp_res = (fp_val1_mont * fp_val1_mont * modinv(nn_r%nn_p, nn_p)) % nn_p
|
/freebsd/crypto/libecc/scripts/ |
H A D | expand_libecc.py | 55 def modinv(a, m): function 70 mpinv = 2**wlen - (modinv(prime, 2**wlen)) 233 L = ((3*pow(x1, 2, curve.p) + curve.a) * modinv(2*y1, curve.p)) % curve.p 236 L = ((y2 - y1) * modinv((x2 - x1) % curve.p, curve.p)) % curve.p 302 return PubKey(curve, modinv(privkey.x, q) * G) 518 s = (modinv(k, q) * ((privkey.x * r) + e)) % q 559 u = (modinv(s, q) * e) % q 560 v = (modinv(s, q) * r) % q 854 e = modinv(stringtoint(h) % q, q) 939 r_inv = modinv(r, q)
|