Home
last modified time | relevance | path

Searched refs:MP_CHECKOK (Results 1 – 24 of 24) sorted by relevance

/titanic_50/usr/src/common/crypto/ecc/
H A Decp_jac.c72 MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz)); in ec_GFp_pt_aff2jac()
74 MP_CHECKOK(mp_copy(px, rx)); in ec_GFp_pt_aff2jac()
75 MP_CHECKOK(mp_copy(py, ry)); in ec_GFp_pt_aff2jac()
76 MP_CHECKOK(mp_set_int(rz, 1)); in ec_GFp_pt_aff2jac()
78 MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth)); in ec_GFp_pt_aff2jac()
99 MP_CHECKOK(mp_init(&z1, FLAG(px))); in ec_GFp_pt_jac2aff()
100 MP_CHECKOK(mp_init(&z2, FLAG(px))); in ec_GFp_pt_jac2aff()
101 MP_CHECKOK(mp_init(&z3, FLAG(px))); in ec_GFp_pt_jac2aff()
105 MP_CHECKOK(ec_GFp_pt_set_inf_aff(rx, ry)); in ec_GFp_pt_jac2aff()
111 MP_CHECKOK(mp_copy(px, rx)); in ec_GFp_pt_jac2aff()
[all …]
H A Dec2_mont.c68 MP_CHECKOK(mp_init(&t1, kmflag)); in gf2m_Mdouble()
70 MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); in gf2m_Mdouble()
71 MP_CHECKOK(group->meth->field_sqr(z, &t1, group->meth)); in gf2m_Mdouble()
72 MP_CHECKOK(group->meth->field_mul(x, &t1, z, group->meth)); in gf2m_Mdouble()
73 MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); in gf2m_Mdouble()
74 MP_CHECKOK(group->meth->field_sqr(&t1, &t1, group->meth)); in gf2m_Mdouble()
75 MP_CHECKOK(group->meth-> in gf2m_Mdouble()
77 MP_CHECKOK(group->meth->field_add(x, &t1, x, group->meth)); in gf2m_Mdouble()
97 MP_CHECKOK(mp_init(&t1, kmflag)); in gf2m_Madd()
98 MP_CHECKOK(mp_init(&t2, kmflag)); in gf2m_Madd()
[all …]
H A Dec2_aff.c89 MP_CHECKOK(mp_init(&lambda, FLAG(px))); in ec_GF2m_pt_add_aff()
90 MP_CHECKOK(mp_init(&tempx, FLAG(px))); in ec_GF2m_pt_add_aff()
91 MP_CHECKOK(mp_init(&tempy, FLAG(px))); in ec_GF2m_pt_add_aff()
94 MP_CHECKOK(mp_copy(qx, rx)); in ec_GF2m_pt_add_aff()
95 MP_CHECKOK(mp_copy(qy, ry)); in ec_GF2m_pt_add_aff()
101 MP_CHECKOK(mp_copy(px, rx)); in ec_GF2m_pt_add_aff()
102 MP_CHECKOK(mp_copy(py, ry)); in ec_GF2m_pt_add_aff()
109 MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth)); in ec_GF2m_pt_add_aff()
110 MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth)); in ec_GF2m_pt_add_aff()
111 MP_CHECKOK(group->meth-> in ec_GF2m_pt_add_aff()
[all …]
H A Decp_aff.c96 MP_CHECKOK(mp_init(&lambda, FLAG(px))); in ec_GFp_pt_add_aff()
97 MP_CHECKOK(mp_init(&temp, FLAG(px))); in ec_GFp_pt_add_aff()
98 MP_CHECKOK(mp_init(&tempx, FLAG(px))); in ec_GFp_pt_add_aff()
99 MP_CHECKOK(mp_init(&tempy, FLAG(px))); in ec_GFp_pt_add_aff()
102 MP_CHECKOK(mp_copy(qx, rx)); in ec_GFp_pt_add_aff()
103 MP_CHECKOK(mp_copy(qy, ry)); in ec_GFp_pt_add_aff()
109 MP_CHECKOK(mp_copy(px, rx)); in ec_GFp_pt_add_aff()
110 MP_CHECKOK(mp_copy(py, ry)); in ec_GFp_pt_add_aff()
116 MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth)); in ec_GFp_pt_add_aff()
117 MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth)); in ec_GFp_pt_add_aff()
[all …]
H A Decp_jm.c84 MP_CHECKOK(ec_GFp_pt_set_inf_jac(rx, ry, rz)); in ec_GFp_pt_dbl_jm()
89 MP_CHECKOK(group->meth->field_sqr(px, t0, group->meth)); in ec_GFp_pt_dbl_jm()
90 MP_CHECKOK(group->meth->field_add(t0, t0, M, group->meth)); in ec_GFp_pt_dbl_jm()
91 MP_CHECKOK(group->meth->field_add(t0, M, t0, group->meth)); in ec_GFp_pt_dbl_jm()
92 MP_CHECKOK(group->meth->field_add(t0, paz4, M, group->meth)); in ec_GFp_pt_dbl_jm()
95 MP_CHECKOK(group->meth->field_mul(py, pz, S, group->meth)); in ec_GFp_pt_dbl_jm()
96 MP_CHECKOK(group->meth->field_add(S, S, rz, group->meth)); in ec_GFp_pt_dbl_jm()
99 MP_CHECKOK(group->meth->field_sqr(py, t0, group->meth)); in ec_GFp_pt_dbl_jm()
100 MP_CHECKOK(group->meth->field_add(t0, t0, t0, group->meth)); in ec_GFp_pt_dbl_jm()
101 MP_CHECKOK(group->meth->field_sqr(t0, t1, group->meth)); in ec_GFp_pt_dbl_jm()
[all …]
H A Dec2_test.c127 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
139 MP_CHECKOK( ectest_curve_GF2m(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
157 MP_CHECKOK(mp_init(&one, kmflag)); in ectest_curve_GF2m()
158 MP_CHECKOK(mp_init(&order_1, kmflag)); in ectest_curve_GF2m()
159 MP_CHECKOK(mp_init(&gx, kmflag)); in ectest_curve_GF2m()
160 MP_CHECKOK(mp_init(&gy, kmflag)); in ectest_curve_GF2m()
161 MP_CHECKOK(mp_init(&rx, kmflag)); in ectest_curve_GF2m()
162 MP_CHECKOK(mp_init(&ry, kmflag)); in ectest_curve_GF2m()
163 MP_CHECKOK(mp_init(&n, kmflag)); in ectest_curve_GF2m()
165 MP_CHECKOK(mp_set_int(&one, 1)); in ectest_curve_GF2m()
[all …]
H A Decp_test.c126 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 1, KM_SLEEP) ); \
138 MP_CHECKOK( ectest_curve_GFp(group, ectestPrint, ectestTime, 0, KM_SLEEP) ); \
156 MP_CHECKOK(mp_init(&one, kmflag)); in ectest_curve_GFp()
157 MP_CHECKOK(mp_init(&order_1, kmflag)); in ectest_curve_GFp()
158 MP_CHECKOK(mp_init(&gx, kmflag)); in ectest_curve_GFp()
159 MP_CHECKOK(mp_init(&gy, kmflag)); in ectest_curve_GFp()
160 MP_CHECKOK(mp_init(&rx, kmflag)); in ectest_curve_GFp()
161 MP_CHECKOK(mp_init(&ry, kmflag)); in ectest_curve_GFp()
162 MP_CHECKOK(mp_init(&n, kmflag)); in ectest_curve_GFp()
164 MP_CHECKOK(mp_set_int(&one, 1)); in ectest_curve_GFp()
[all …]
H A Decl_mult.c71 MP_CHECKOK(mp_init(&kt, FLAG(k))); in ECPoint_mul()
72 MP_CHECKOK(mp_mod(k, &group->order, &kt)); in ECPoint_mul()
82 MP_CHECKOK(group->base_point_mul(&kt, rx, ry, group)); in ECPoint_mul()
84 MP_CHECKOK(group-> in ECPoint_mul()
90 MP_CHECKOK(group->meth->field_enc(px, rx, group->meth)); in ECPoint_mul()
91 MP_CHECKOK(group->meth->field_enc(py, ry, group->meth)); in ECPoint_mul()
92 MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group)); in ECPoint_mul()
94 MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group)); in ECPoint_mul()
98 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); in ECPoint_mul()
99 MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); in ECPoint_mul()
[all …]
H A Decl.c85 MP_CHECKOK(mp_init(&group->curvea, kmflag)); in ECGroup_new()
86 MP_CHECKOK(mp_init(&group->curveb, kmflag)); in ECGroup_new()
87 MP_CHECKOK(mp_init(&group->genx, kmflag)); in ECGroup_new()
88 MP_CHECKOK(mp_init(&group->geny, kmflag)); in ECGroup_new()
89 MP_CHECKOK(mp_init(&group->order, kmflag)); in ECGroup_new()
117 MP_CHECKOK(mp_copy(curvea, &group->curvea)); in ECGroup_consGFp()
118 MP_CHECKOK(mp_copy(curveb, &group->curveb)); in ECGroup_consGFp()
119 MP_CHECKOK(mp_copy(genx, &group->genx)); in ECGroup_consGFp()
120 MP_CHECKOK(mp_copy(geny, &group->geny)); in ECGroup_consGFp()
121 MP_CHECKOK(mp_copy(order, &group->order)); in ECGroup_consGFp()
[all …]
H A Decp_384.c90 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp384_mod()
176 MP_CHECKOK(mp_add(&m[0], &m[1], r)); in ec_GFp_nistp384_mod()
177 MP_CHECKOK(mp_add(r, &m[1], r)); in ec_GFp_nistp384_mod()
178 MP_CHECKOK(mp_add(r, &m[2], r)); in ec_GFp_nistp384_mod()
179 MP_CHECKOK(mp_add(r, &m[3], r)); in ec_GFp_nistp384_mod()
180 MP_CHECKOK(mp_add(r, &m[4], r)); in ec_GFp_nistp384_mod()
181 MP_CHECKOK(mp_add(r, &m[5], r)); in ec_GFp_nistp384_mod()
182 MP_CHECKOK(mp_add(r, &m[6], r)); in ec_GFp_nistp384_mod()
183 MP_CHECKOK(mp_sub(r, &m[7], r)); in ec_GFp_nistp384_mod()
184 MP_CHECKOK(mp_sub(r, &m[8], r)); in ec_GFp_nistp384_mod()
[all …]
H A Decp_521.c84 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp521_mod()
94 MP_CHECKOK(s_mp_pad(r,ECP521_DIGITS)); in ec_GFp_nistp521_mod()
102 MP_CHECKOK(s_mp_add(r, &m1)); in ec_GFp_nistp521_mod()
104 MP_CHECKOK(s_mp_add_d(r,1)); in ec_GFp_nistp521_mod()
122 MP_CHECKOK(mp_sqr(a, r)); in ec_GFp_nistp521_sqr()
123 MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); in ec_GFp_nistp521_sqr()
137 MP_CHECKOK(mp_mul(a, b, r)); in ec_GFp_nistp521_mul()
138 MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); in ec_GFp_nistp521_mul()
158 MP_CHECKOK(mp_init(&t, FLAG(b))); in ec_GFp_nistp521_div()
159 MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); in ec_GFp_nistp521_div()
[all …]
H A Decp_mont.c121 MP_CHECKOK(mp_mul(a, b, r)); in ec_GFp_mul_mont()
122 MP_CHECKOK(s_mp_redc(r, (mp_mont_modulus *) meth->extra1)); in ec_GFp_mul_mont()
129 MP_CHECKOK(mp_init(&s, FLAG(a))); in ec_GFp_mul_mont()
130 MP_CHECKOK(s_mp_mul_mont in ec_GFp_mul_mont()
132 MP_CHECKOK(mp_copy(&s, r)); in ec_GFp_mul_mont()
160 MP_CHECKOK(ec_GFp_div(a, b, r, meth)); in ec_GFp_div_mont()
161 MP_CHECKOK(ec_GFp_enc_mont(r, r, meth)); in ec_GFp_div_mont()
163 MP_CHECKOK(ec_GFp_enc_mont(r, r, meth)); in ec_GFp_div_mont()
178 MP_CHECKOK(mpl_lsh(a, r, mmm->b)); in ec_GFp_enc_mont()
179 MP_CHECKOK(mp_mod(r, &mmm->N, r)); in ec_GFp_enc_mont()
[all …]
H A Decp_192.c88 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp192_mod()
176 MP_CHECKOK(s_mp_pad(r, 6)); in ec_GFp_nistp192_mod()
281 MP_CHECKOK(s_mp_pad(r, 3)); in ec_GFp_nistp192_mod()
363 MP_CHECKOK(s_mp_pad(r, 3)); in ec_GFp_nistp192_add()
442 MP_CHECKOK(s_mp_pad(r, 3)); in ec_GFp_nistp192_sub()
464 MP_CHECKOK(mp_sqr(a, r)); in ec_GFp_nistp192_sqr()
465 MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); in ec_GFp_nistp192_sqr()
479 MP_CHECKOK(mp_mul(a, b, r)); in ec_GFp_nistp192_mul()
480 MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); in ec_GFp_nistp192_mul()
500 MP_CHECKOK(mp_init(&t, FLAG(b))); in ec_GFp_nistp192_div()
[all …]
H A Decp_224.c86 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp224_mod()
196 MP_CHECKOK(s_mp_pad(r, 7)); in ec_GFp_nistp224_mod()
300 MP_CHECKOK(s_mp_pad(r, 4)); in ec_GFp_nistp224_mod()
324 MP_CHECKOK(mp_sqr(a, r)); in ec_GFp_nistp224_sqr()
325 MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); in ec_GFp_nistp224_sqr()
339 MP_CHECKOK(mp_mul(a, b, r)); in ec_GFp_nistp224_mul()
340 MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); in ec_GFp_nistp224_mul()
360 MP_CHECKOK(mp_init(&t, FLAG(b))); in ec_GFp_nistp224_div()
361 MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); in ec_GFp_nistp224_div()
362 MP_CHECKOK(mp_mul(a, &t, r)); in ec_GFp_nistp224_div()
[all …]
H A Dec2_163.c67 MP_CHECKOK(mp_copy(a, r)); in ec_GF2m_163_mod()
71 MP_CHECKOK(s_mp_pad(r, 6)); in ec_GF2m_163_mod()
92 MP_CHECKOK(s_mp_pad(r, 11)); in ec_GF2m_163_mod()
145 MP_CHECKOK(s_mp_pad(r, 6)); in ec_GF2m_163_sqr()
153 MP_CHECKOK(s_mp_pad(r, 12)); in ec_GF2m_163_sqr()
229 MP_CHECKOK(s_mp_pad(r, 6)); in ec_GF2m_163_mul()
234 MP_CHECKOK(s_mp_pad(r, 12)); in ec_GF2m_163_mul()
H A Decl_gf.c72 MP_CHECKOK(mp_init(&meth->irr, kmflag)); in GFMethod_new()
94 MP_CHECKOK(mp_copy(irr, &meth->irr)); in GFMethod_consGFp()
154 MP_CHECKOK(mp_copy(irr, &meth->irr)); in GFMethod_consGF2m()
255 MP_CHECKOK(mp_sub(b, a, r)); in ec_GFp_sub()
257 MP_CHECKOK(mp_add(r, &meth->irr, r)); in ec_GFp_sub()
259 MP_CHECKOK(ec_GFp_neg(r, r, meth)); in ec_GFp_sub()
262 MP_CHECKOK(mp_add(r, &meth->irr, r)); in ec_GFp_sub()
314 MP_CHECKOK(s_mp_pad(r, 3)); in ec_GFp_add_3()
403 MP_CHECKOK(s_mp_pad(r, 4)); in ec_GFp_add_4()
488 MP_CHECKOK(s_mp_pad(r, 5)); in ec_GFp_add_5()
[all …]
H A Dec2_193.c67 MP_CHECKOK(mp_copy(a, r)); in ec_GF2m_193_mod()
71 MP_CHECKOK(s_mp_pad(r, 7)); in ec_GF2m_193_mod()
96 MP_CHECKOK(s_mp_pad(r, 13)); in ec_GF2m_193_mod()
153 MP_CHECKOK(s_mp_pad(r, 7)); in ec_GF2m_193_sqr()
161 MP_CHECKOK(s_mp_pad(r, 13)); in ec_GF2m_193_sqr()
242 MP_CHECKOK(s_mp_pad(r, 8)); in ec_GF2m_193_mul()
247 MP_CHECKOK(s_mp_pad(r, 14)); in ec_GF2m_193_mul()
H A Dec2_233.c67 MP_CHECKOK(mp_copy(a, r)); in ec_GF2m_233_mod()
71 MP_CHECKOK(s_mp_pad(r, 8)); in ec_GF2m_233_mod()
100 MP_CHECKOK(s_mp_pad(r, 15)); in ec_GF2m_233_mod()
169 MP_CHECKOK(s_mp_pad(r, 8)); in ec_GF2m_233_sqr()
177 MP_CHECKOK(s_mp_pad(r, 15)); in ec_GF2m_233_sqr()
265 MP_CHECKOK(s_mp_pad(r, 8)); in ec_GF2m_233_mul()
270 MP_CHECKOK(s_mp_pad(r, 16)); in ec_GF2m_233_mul()
H A Decp_256.c83 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp256_mod()
228 MP_CHECKOK(s_mp_pad(r,8)); in ec_GFp_nistp256_mod()
248 MP_CHECKOK(mp_sub(r, &meth->irr, r)); in ec_GFp_nistp256_mod()
255 MP_CHECKOK(mp_add(r, &meth->irr, r)); in ec_GFp_nistp256_mod()
258 MP_CHECKOK(mp_sub(r, &meth->irr, r)); in ec_GFp_nistp256_mod()
264 MP_CHECKOK(mp_sub(r, &meth->irr, r)); in ec_GFp_nistp256_mod()
372 MP_CHECKOK(s_mp_pad(r,4)); in ec_GFp_nistp256_mod()
388 MP_CHECKOK(mp_sub(r, &meth->irr, r)); in ec_GFp_nistp256_mod()
407 MP_CHECKOK(mp_sqr(a, r)); in ec_GFp_nistp256_sqr()
408 MP_CHECKOK(ec_GFp_nistp256_mod(r, r, meth)); in ec_GFp_nistp256_sqr()
[all …]
H A Dec_naf.c80 MP_CHECKOK(mp_init_copy(&k, in)); in ec_compute_wNAF()
/titanic_50/usr/src/common/mpi/
H A Dmp_gf2m.c233 MP_CHECKOK( s_mp_pad(c, used_pa) ); in mp_badd()
254 #define s_mp_div2(a) MP_CHECKOK( mpl_rsh((a), (a), 1) );
300 MP_CHECKOK( mp_init_copy(&tmp, a) ); in mp_bmul()
305 MP_CHECKOK( mp_init_copy(&tmp, b) ); in mp_bmul()
316 MP_CHECKOK( s_mp_pad(c, USED(a) + USED(b)) ); in mp_bmul()
365 MP_CHECKOK( mp_copy(a, r) ); in mp_bmod()
461 MP_CHECKOK( mp_init_copy(&tmp, a) ); in mp_bsqrmod()
466 MP_CHECKOK( s_mp_pad(r, 2*USED(a)) ); in mp_bsqrmod()
479 MP_CHECKOK( mp_bmod(r, p, r) ); in mp_bsqrmod()
506 MP_CHECKOK( mp_init_copy(&aa, x) ); in mp_bdivmod()
[all …]
H A Dmpi.c757 MP_CHECKOK( s_mp_add_3arg(a, b, c) ); in mp_add()
759 MP_CHECKOK( s_mp_sub_3arg(a, b, c) ); in mp_add()
761 MP_CHECKOK( s_mp_sub_3arg(b, a, c) ); in mp_add()
795 MP_CHECKOK( s_mp_add_3arg(a, b, c) ); in mp_sub()
800 MP_CHECKOK( s_mp_sub_3arg(a, b, c) ); in mp_sub()
802 MP_CHECKOK( s_mp_sub_3arg(b, a, c) ); in mp_sub()
943 MP_CHECKOK( s_mp_grow(sqr, ix) ); in mp_sqr()
1033 MP_CHECKOK( mp_init_copy(&rtmp, a) ); in mp_div()
1036 MP_CHECKOK( mp_copy(a, r) ); in mp_div()
1041 MP_CHECKOK( mp_init_size(&qtmp, MP_USED(a), FLAG(a)) ); in mp_div()
[all …]
H A Dmpmontg.c103 MP_CHECKOK( s_mp_pad(T, i) ); in s_mp_redc()
107 MP_CHECKOK( s_mp_mul_d_add_offset(&mmm->N, m_i, T, i) ); in s_mp_redc()
116 MP_CHECKOK( s_mp_sub(T, &mmm->N) ); in s_mp_redc()
179 MP_CHECKOK( s_mp_sub(c, &mmm->N) ); in s_mp_mul_mont()
H A Dmpi.h360 #define MP_CHECKOK(x) if (MP_OKAY > (res = (x))) goto CLEANUP macro