/illumos-gate/usr/src/common/crypto/ecc/ |
H A D | ec2_mont.c | 68 MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); in gf2m_Mdouble() 69 MP_CHECKOK(group->meth->field_sqr(z, &t1, group->meth)); in gf2m_Mdouble() 70 MP_CHECKOK(group->meth->field_mul(x, &t1, z, group->meth)); in gf2m_Mdouble() 71 MP_CHECKOK(group->meth->field_sqr(x, x, group->meth)); in gf2m_Mdouble() 72 MP_CHECKOK(group->meth->field_sqr(&t1, &t1, group->meth)); in gf2m_Mdouble() 75 MP_CHECKOK(group->meth->field_add(x, &t1, x, group->meth)); in gf2m_Mdouble() 99 MP_CHECKOK(group->meth->field_mul(x1, z2, x1, group->meth)); in gf2m_Madd() 100 MP_CHECKOK(group->meth->field_mul(z1, x2, z1, group->meth)); in gf2m_Madd() 103 MP_CHECKOK(group->meth->field_sqr(z1, z1, group->meth)); in gf2m_Madd() 142 MP_CHECKOK(group->meth->field_add(x, y, z2, group->meth)); in gf2m_Mxy() [all …]
|
H A D | ecp_jm.c | 87 MP_CHECKOK(group->meth->field_sqr(px, t0, group->meth)); in ec_GFp_pt_dbl_jm() 88 MP_CHECKOK(group->meth->field_add(t0, t0, M, group->meth)); in ec_GFp_pt_dbl_jm() 94 MP_CHECKOK(group->meth->field_add(S, S, rz, group->meth)); in ec_GFp_pt_dbl_jm() 97 MP_CHECKOK(group->meth->field_sqr(py, t0, group->meth)); in ec_GFp_pt_dbl_jm() 99 MP_CHECKOK(group->meth->field_sqr(t0, t1, group->meth)); in ec_GFp_pt_dbl_jm() 104 MP_CHECKOK(group->meth->field_add(S, S, S, group->meth)); in ec_GFp_pt_dbl_jm() 108 MP_CHECKOK(group->meth->field_sqr(M, rx, group->meth)); in ec_GFp_pt_dbl_jm() 113 MP_CHECKOK(group->meth->field_sub(S, rx, S, group->meth)); in ec_GFp_pt_dbl_jm() 170 MP_CHECKOK(group->meth->field_sqr(pz, A, group->meth)); in ec_GFp_pt_add_jm_aff() 180 MP_CHECKOK(group->meth->field_sqr(C, C2, group->meth)); in ec_GFp_pt_add_jm_aff() [all …]
|
H A D | ecp_jac.c | 76 MP_CHECKOK(group->meth->field_enc(rz, rz, group->meth)); in ec_GFp_pt_aff2jac() 113 MP_CHECKOK(group->meth->field_sqr(&z1, &z2, group->meth)); in ec_GFp_pt_jac2aff() 185 MP_CHECKOK(group->meth->field_sqr(pz, &A, group->meth)); in ec_GFp_pt_add_jac_aff() 195 MP_CHECKOK(group->meth->field_sqr(&C, &C2, group->meth)); in ec_GFp_pt_add_jac_aff() 204 MP_CHECKOK(group->meth->field_sqr(&D, &A, group->meth)); in ec_GFp_pt_add_jac_aff() 262 MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth)); in ec_GFp_pt_dbl_jac() 269 MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth)); in ec_GFp_pt_dbl_jac() 277 MP_CHECKOK(group->meth->field_sqr(px, &t0, group->meth)); in ec_GFp_pt_dbl_jac() 280 MP_CHECKOK(group->meth->field_sqr(pz, &M, group->meth)); in ec_GFp_pt_dbl_jac() 281 MP_CHECKOK(group->meth->field_sqr(&M, &M, group->meth)); in ec_GFp_pt_dbl_jac() [all …]
|
H A D | ecl_gf.c | 59 GFMethod *meth; in GFMethod_new() local 64 if (meth == NULL) in GFMethod_new() 77 return meth; in GFMethod_new() 89 if (meth == NULL) in GFMethod_consGFp() 94 meth->irr_arr[1] = meth->irr_arr[2] = meth->irr_arr[3] = in GFMethod_consGFp() 134 return meth; in GFMethod_consGFp() 162 meth->irr_arr[3] = meth->irr_arr[4] = 0; in GFMethod_consGF2m() 190 return meth; in GFMethod_consGF2m() 203 meth->extra_free(meth); in GFMethod_free() 207 free(meth); in GFMethod_free() [all …]
|
H A D | ecp_mont.c | 65 GFMethod *meth = NULL; in GFMethod_consGFp_mont() local 69 if (meth == NULL) in GFMethod_consGFp_mont() 88 meth->extra1 = mmm; in GFMethod_consGFp_mont() 89 meth->extra2 = NULL; in GFMethod_consGFp_mont() 92 mmm->N = meth->irr; in GFMethod_consGFp_mont() 100 GFMethod_free(meth); in GFMethod_consGFp_mont() 103 return meth; in GFMethod_consGFp_mont() 111 const GFMethod *meth) in ec_GFp_mul_mont() argument 150 const GFMethod *meth) in ec_GFp_div_mont() argument 205 free(meth->extra1); in ec_GFp_extra_free_mont() [all …]
|
H A D | ec2_aff.c | 107 MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth)); in ec_GF2m_pt_add_aff() 108 MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth)); in ec_GF2m_pt_add_aff() 111 MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth)); in ec_GF2m_pt_add_aff() 129 MP_CHECKOK(group->meth->field_div(qy, qx, &lambda, group->meth)); in ec_GF2m_pt_add_aff() 145 MP_CHECKOK(group->meth->field_add(&tempy, qy, ry, group->meth)); in ec_GF2m_pt_add_aff() 169 MP_CHECKOK(group->meth->field_add(qx, qy, &nqy, group->meth)); in ec_GF2m_pt_sub_aff() 223 MP_CHECKOK(group->meth->field_add(&qx, &qy, &qy, group->meth)); in ec_GF2m_pt_mul_aff() 314 group->meth->field_enc(px, &pxt, group->meth); in ec_GF2m_validate_point() 315 group->meth->field_enc(py, &pyt, group->meth); in ec_GF2m_validate_point() 321 MP_CHECKOK( group->meth->field_sqr(&pyt, &accl, group->meth) ); in ec_GF2m_validate_point() [all …]
|
H A D | ecp_aff.c | 114 MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth)); in ec_GFp_pt_add_aff() 115 MP_CHECKOK(group->meth->field_sub(px, qx, &tempx, group->meth)); in ec_GFp_pt_add_aff() 127 MP_CHECKOK(group->meth->field_sqr(qx, &tempx, group->meth)); in ec_GFp_pt_add_aff() 130 MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth)); in ec_GFp_pt_add_aff() 138 MP_CHECKOK(group->meth->field_enc(&temp, &temp, group->meth)); in ec_GFp_pt_add_aff() 145 MP_CHECKOK(group->meth->field_sqr(&lambda, &tempx, group->meth)); in ec_GFp_pt_add_aff() 179 MP_CHECKOK(group->meth->field_neg(qy, &nqy, group->meth)); in ec_GFp_pt_sub_aff() 236 MP_CHECKOK(group->meth->field_neg(&qy, &qy, group->meth)); in ec_GFp_pt_mul_aff() 327 group->meth->field_enc(px, &pxt, group->meth); in ec_GFp_validate_point() 328 group->meth->field_enc(py, &pyt, group->meth); in ec_GFp_validate_point() [all …]
|
H A D | ecl-priv.h | 131 const GFMethod *meth); 163 GFMethod *meth; member 206 const GFMethod *meth); 209 const GFMethod *meth); 213 const GFMethod *meth); 215 const GFMethod *meth); 217 const GFMethod *meth); 219 const GFMethod *meth); 221 const GFMethod *meth); 223 const GFMethod *meth); [all …]
|
H A D | ecl_mult.c | 88 MP_CHECKOK(group->meth->field_enc(px, rx, group->meth)); in ECPoint_mul() 89 MP_CHECKOK(group->meth->field_enc(py, ry, group->meth)); in ECPoint_mul() 96 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); in ECPoint_mul() 97 MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); in ECPoint_mul() 140 MP_CHECKOK(group->meth->field_enc(&sx, &sx, group->meth)); in ec_pts_mul_basic() 141 MP_CHECKOK(group->meth->field_enc(&sy, &sy, group->meth)); in ec_pts_mul_basic() 142 MP_CHECKOK(group->meth->field_enc(rx, rx, group->meth)); in ec_pts_mul_basic() 143 MP_CHECKOK(group->meth->field_enc(ry, ry, group->meth)); in ec_pts_mul_basic() 149 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth)); in ec_pts_mul_basic() 150 MP_CHECKOK(group->meth->field_dec(ry, ry, group->meth)); in ec_pts_mul_basic() [all …]
|
H A D | ecp_521.c | 82 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp521_mod() 121 MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); in ec_GFp_nistp521_sqr() 131 const GFMethod *meth) in ec_GFp_nistp521_mul() argument 136 MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); in ec_GFp_nistp521_mul() 145 const GFMethod *meth) in ec_GFp_nistp521_div() argument 152 return mp_invmod(b, &meth->irr, r); in ec_GFp_nistp521_div() 157 MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); in ec_GFp_nistp521_div() 159 MP_CHECKOK(ec_GFp_nistp521_mod(r, r, meth)); in ec_GFp_nistp521_div() 172 group->meth->field_mod = &ec_GFp_nistp521_mod; in ec_group_set_gfp521() 173 group->meth->field_mul = &ec_GFp_nistp521_mul; in ec_group_set_gfp521() [all …]
|
H A D | ecp_test.c | 166 if (group->meth->field_dec) { in ectest_curve_GFp() 167 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth)); in ectest_curve_GFp() 168 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth)); in ectest_curve_GFp() 180 if (group->meth->field_enc) { in ectest_curve_GFp() 201 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp() 222 MP_CHECKOK(group->meth->field_neg(&ry, &ry, group->meth)); in ectest_curve_GFp() 241 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp() 258 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp() 345 MP_CHECKOK(mp_submod(&group->meth->irr, &ry, &group->meth->irr, &ry)); in ectest_curve_GFp() 367 size = mpl_significant_bits(&group->meth->irr); in ectest_curve_GFp() [all …]
|
H A D | ecp_192.c | 86 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp192_mod() 306 const GFMethod *meth) in ec_GFp_nistp192_add() argument 391 const GFMethod *meth) in ec_GFp_nistp192_sub() argument 478 MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); in ec_GFp_nistp192_sqr() 488 const GFMethod *meth) in ec_GFp_nistp192_mul() argument 493 MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); in ec_GFp_nistp192_mul() 502 const GFMethod *meth) in ec_GFp_nistp192_div() argument 509 return mp_invmod(b, &meth->irr, r); in ec_GFp_nistp192_div() 514 MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); in ec_GFp_nistp192_div() 516 MP_CHECKOK(ec_GFp_nistp192_mod(r, r, meth)); in ec_GFp_nistp192_div() [all …]
|
H A D | ec2_test.c | 167 if (group->meth->field_dec) { in ectest_curve_GF2m() 168 MP_CHECKOK(group->meth->field_dec(&group->genx, &gx, group->meth)); in ectest_curve_GF2m() 169 MP_CHECKOK(group->meth->field_dec(&group->geny, &gy, group->meth)); in ectest_curve_GF2m() 182 if (group->meth->field_enc) { in ectest_curve_GF2m() 203 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth)); in ectest_curve_GF2m() 223 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth)); in ectest_curve_GF2m() 243 MP_CHECKOK(group->meth->field_add(&ry, &rx, &ry, group->meth)); in ectest_curve_GF2m() 262 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth)); in ectest_curve_GF2m() 279 MP_CHECKOK(ec_GF2m_add(&ry, &rx, &ry, group->meth)); in ectest_curve_GF2m() 405 size = mpl_significant_bits(&group->meth->irr); in ectest_curve_GF2m() [all …]
|
H A D | ec2_163.c | 59 ec_GF2m_163_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_163_mod() argument 131 ec_GF2m_163_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_163_sqr() argument 140 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_163_sqr() 148 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_163_sqr() 171 return ec_GF2m_163_mod(r, r, meth); in ec_GF2m_163_sqr() 181 const GFMethod *meth) in ec_GF2m_163_mul() argument 192 return ec_GF2m_163_sqr(a, r, meth); in ec_GF2m_163_mul() 262 return ec_GF2m_163_mod(r, r, meth); in ec_GF2m_163_mul() 273 group->meth->field_mod = &ec_GF2m_163_mod; in ec_group_set_gf2m163() 274 group->meth->field_mul = &ec_GF2m_163_mul; in ec_group_set_gf2m163() [all …]
|
H A D | ecp_384.c | 57 ec_GFp_nistp384_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GFp_nistp384_mod() argument 88 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp384_mod() 183 MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r)); in ec_GFp_nistp384_mod() 190 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp384_mod() 252 MP_CHECKOK(mp_submod(r, &m[9], &meth->irr, r)); in ec_GFp_nistp384_mod() 270 MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth)); in ec_GFp_nistp384_sqr() 280 const GFMethod *meth) in ec_GFp_nistp384_mul() argument 285 MP_CHECKOK(ec_GFp_nistp384_mod(r, r, meth)); in ec_GFp_nistp384_mul() 296 group->meth->field_mod = &ec_GFp_nistp384_mod; in ec_group_set_gfp384() 297 group->meth->field_mul = &ec_GFp_nistp384_mul; in ec_group_set_gfp384() [all …]
|
H A D | ec2_193.c | 59 ec_GF2m_193_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_193_mod() argument 139 ec_GF2m_193_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_193_sqr() argument 148 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_193_sqr() 156 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_193_sqr() 180 return ec_GF2m_193_mod(r, r, meth); in ec_GF2m_193_sqr() 190 const GFMethod *meth) in ec_GF2m_193_mul() argument 201 return ec_GF2m_193_sqr(a, r, meth); in ec_GF2m_193_mul() 281 return ec_GF2m_193_mod(r, r, meth); in ec_GF2m_193_mul() 292 group->meth->field_mod = &ec_GF2m_193_mod; in ec_group_set_gf2m193() 293 group->meth->field_mul = &ec_GF2m_193_mul; in ec_group_set_gf2m193() [all …]
|
H A D | ec2_233.c | 59 ec_GF2m_233_mod(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_233_mod() argument 155 ec_GF2m_233_sqr(const mp_int *a, mp_int *r, const GFMethod *meth) in ec_GF2m_233_sqr() argument 164 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_233_sqr() 172 return mp_bsqrmod(a, meth->irr_arr, r); in ec_GF2m_233_sqr() 198 return ec_GF2m_233_mod(r, r, meth); in ec_GF2m_233_sqr() 208 const GFMethod *meth) in ec_GF2m_233_mul() argument 220 return ec_GF2m_233_sqr(a, r, meth); in ec_GF2m_233_mul() 306 return ec_GF2m_233_mod(r, r, meth); in ec_GF2m_233_mul() 317 group->meth->field_mod = &ec_GF2m_233_mod; in ec_group_set_gf2m233() 318 group->meth->field_mul = &ec_GF2m_233_mul; in ec_group_set_gf2m233() [all …]
|
H A D | ecl.c | 70 group->meth = NULL; in ECGroup_new() 110 group->meth = GFMethod_consGFp(irr); in ECGroup_consGFp() 111 if (group->meth == NULL) { in ECGroup_consGFp() 151 group->meth = GFMethod_consGFp_mont(irr); in ECGroup_consGFp_mont() 152 if (group->meth == NULL) { in ECGroup_consGFp_mont() 156 MP_CHECKOK(group->meth-> in ECGroup_consGFp_mont() 158 MP_CHECKOK(group->meth-> in ECGroup_consGFp_mont() 160 MP_CHECKOK(group->meth->field_enc(genx, &group->genx, group->meth)); in ECGroup_consGFp_mont() 161 MP_CHECKOK(group->meth->field_enc(geny, &group->geny, group->meth)); in ECGroup_consGFp_mont() 197 if (group->meth == NULL) { in ECGroup_consGF2m() [all …]
|
H A D | ecp_224.c | 84 MP_CHECKOK(mp_mod(a, &meth->irr, r)); in ec_GFp_nistp224_mod() 332 MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); in ec_GFp_nistp224_sqr() 342 const GFMethod *meth) in ec_GFp_nistp224_mul() argument 347 MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); in ec_GFp_nistp224_mul() 356 const GFMethod *meth) in ec_GFp_nistp224_div() argument 363 return mp_invmod(b, &meth->irr, r); in ec_GFp_nistp224_div() 368 MP_CHECKOK(mp_invmod(b, &meth->irr, &t)); in ec_GFp_nistp224_div() 370 MP_CHECKOK(ec_GFp_nistp224_mod(r, r, meth)); in ec_GFp_nistp224_div() 383 group->meth->field_mod = &ec_GFp_nistp224_mod; in ec_group_set_gfp224() 384 group->meth->field_mul = &ec_GFp_nistp224_mul; in ec_group_set_gfp224() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/cdt/ |
H A D | dtmethod.c | 32 Dtmethod_t* dtmethod(dt, meth) in dtmethod() 34 Dtmethod_t* meth; 39 Dtmethod_t *oldmt = dt->meth; 42 if(!meth || meth == oldmt) 53 dt->searchf = meth->searchf; 54 dt->meth = meth; 61 if(dt->searchf == meth->searchf) 63 dt->meth = oldmt; 69 dt->searchf = meth->searchf; 70 dt->meth = meth; [all …]
|
H A D | dtopen.c | 41 Dt_t* _dtopen(disc, meth, version) in _dtopen() 43 Dtmethod_t* meth; 51 if(!disc || !meth) 56 type = meth->type; 59 pdt.searchf = meth->searchf; 60 pdt.meth = meth; 68 { if((data->type & DT_METHODS) != meth->type) 111 Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth) in dtopen() argument 113 Dt_t* dtopen(disc, meth) in dtopen() 115 Dtmethod_t* meth; [all …]
|
H A D | dtview.c | 48 return (*(dt->meth->searchf))(dt,obj,type); 56 if((o = (*(d->meth->searchf))(d,obj,type)) ) 62 if(dt->meth->type & DT_ORDERED) /* ordered sets/bags */ 69 { if(!(o = (*d->meth->searchf)(d, obj, type)) ) 97 if((o = (*(d->meth->searchf))(d, obj, DT_SEARCH)) ) 109 if((*(p->meth->searchf))(p, obj, DT_SEARCH) ) 112 obj = (*d->meth->searchf)(d, obj, type); 118 obj = (*(d->meth->searchf))(d,NIL(Void_t*),DT_FIRST); 119 else obj = (*(d->meth->searchf))(d,NIL(Void_t*),DT_LAST); 133 if(view && view->meth != dt->meth) /* must use the same method */ [all …]
|
/illumos-gate/usr/src/lib/libkmf/plugins/kmf_openssl/common/ |
H A D | compat.c | 364 RSA_meth_dup(const RSA_METHOD *meth) in RSA_meth_dup() argument 371 (void) memcpy(ret, meth, sizeof (*meth)); in RSA_meth_dup() 392 OPENSSL_free((char *)meth->name); in RSA_meth_set1_name() 393 meth->name = tmpname; in RSA_meth_set1_name() 403 meth->rsa_priv_enc = priv_enc; in RSA_meth_set_priv_enc() 412 meth->rsa_priv_dec = priv_dec; in RSA_meth_set_priv_dec() 419 meth->finish = finish; in RSA_meth_set_finish() 424 RSA_meth_free(RSA_METHOD *meth) in RSA_meth_free() argument 426 if (meth != NULL) { in RSA_meth_free() 427 OPENSSL_free((char *)meth->name); in RSA_meth_free() [all …]
|
H A D | compat.h | 59 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); 60 int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); 61 #define RSA_meth_get_finish(meth) meth->finish argument 62 int RSA_meth_set_priv_enc(RSA_METHOD *meth, 65 int RSA_meth_set_priv_dec(RSA_METHOD *meth, 68 int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish) (RSA *rsa)); 69 void RSA_meth_free(RSA_METHOD *meth);
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/aso/ |
H A D | aso.c | 112 Asometh_t* meth; 191 Asometh_t* meth; 199 if (meth == method[i]) 214 return state.meth; 233 if (state.meth && state.meth->initf && state.data && state.pid == getpid()) 258 if (!meth) 260 if (!meth->lockf && !(meth->type & ASO_INTRINSIC)) 267 if (state.meth && state.meth->initf && state.data) 272 if (!meth->initf) 274 else if (!(data = meth->initf(0, details ? details : meth->details))) [all …]
|