/titanic_41/usr/src/common/crypto/ecc/ |
H A D | ecl-priv.h | 132 mp_err (*field_add) (const mp_int *a, const mp_int *b, mp_int *r, 134 mp_err (*field_neg) (const mp_int *a, mp_int *r, const GFMethod *meth); 135 mp_err (*field_sub) (const mp_int *a, const mp_int *b, mp_int *r, 137 mp_err (*field_mod) (const mp_int *a, mp_int *r, const GFMethod *meth); 138 mp_err (*field_mul) (const mp_int *a, const mp_int *b, mp_int *r, 140 mp_err (*field_sqr) (const mp_int *a, mp_int *r, const GFMethod *meth); 141 mp_err (*field_div) (const mp_int *a, const mp_int *b, mp_int *r, 143 mp_err (*field_enc) (const mp_int *a, mp_int *r, const GFMethod *meth); 144 mp_err (*field_dec) (const mp_int *a, mp_int *r, const GFMethod *meth); 182 mp_err (*point_add) (const mp_int *px, const mp_int *py, [all …]
|
H A D | ecp.h | 53 mp_err ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py); 56 mp_err ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py); 60 mp_err ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, 65 mp_err ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, 70 mp_err ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, 74 mp_err ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group); 80 mp_err ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, 87 mp_err ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx, 92 mp_err ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, 98 mp_err ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, [all …]
|
H A D | ec2.h | 53 mp_err ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py); 56 mp_err ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py); 60 mp_err ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, 65 mp_err ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, 70 mp_err ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx, 74 mp_err ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group); 81 mp_err ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, 89 mp_err ec_GF2m_pt_mul_mont(const mp_int *n, const mp_int *px, 96 mp_err ec_GF2m_pt_aff2proj(const mp_int *px, const mp_int *py, mp_int *rx, 101 mp_err ec_GF2m_pt_proj2aff(const mp_int *px, const mp_int *py, [all …]
|
H A D | ecp_mont.c | 65 mp_err res = MP_OKAY; in GFMethod_consGFp_mont() 111 mp_err 115 mp_err res = MP_OKAY; in ec_GFp_mul_mont() 143 mp_err 150 mp_err 154 mp_err res = MP_OKAY; in ec_GFp_div_mont() 171 mp_err 175 mp_err res = MP_OKAY; in ec_GFp_enc_mont() 185 mp_err 188 mp_err res = MP_OKAY; in ec_GFp_dec_mont()
|
H A D | ecp_521.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GFp_nistp521_mod() 117 mp_err 120 mp_err res = MP_OKAY; in ec_GFp_nistp521_sqr() 131 mp_err 135 mp_err res = MP_OKAY; in ec_GFp_nistp521_mul() 145 mp_err 149 mp_err res = MP_OKAY; in ec_GFp_nistp521_div() 170 mp_err
|
H A D | ecl_gf.c | 60 mp_err res = MP_OKAY; in GFMethod_new() 87 mp_err res = MP_OKAY; in GFMethod_consGFp() 146 mp_err res = MP_OKAY; in GFMethod_consGF2m() 216 mp_err 221 mp_err res; in ec_GFp_add() 233 mp_err 246 mp_err 250 mp_err res = MP_OKAY; in ec_GFp_sub() 271 mp_err 275 mp_err res = MP_OKAY; in ec_GFp_add_3() [all …]
|
H A D | ecp_192.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GFp_nistp192_mod() 299 mp_err 303 mp_err res = MP_OKAY; in ec_GFp_nistp192_add() 380 mp_err 384 mp_err res = MP_OKAY; in ec_GFp_nistp192_sub() 459 mp_err 462 mp_err res = MP_OKAY; in ec_GFp_nistp192_sqr() 473 mp_err 477 mp_err res = MP_OKAY; in ec_GFp_nistp192_mul() [all …]
|
H A D | ec2_aff.c | 55 mp_err 68 mp_err 78 mp_err 83 mp_err res = MP_OKAY; in ec_GF2m_pt_add_aff() 160 mp_err 165 mp_err res = MP_OKAY; in ec_GF2m_pt_sub_aff() 180 mp_err 191 mp_err 195 mp_err res = MP_OKAY; in ec_GF2m_pt_mul_aff() 284 mp_err [all …]
|
H A D | ecp_aff.c | 59 mp_err 72 mp_err 84 mp_err 89 mp_err res = MP_OKAY; in ec_GFp_pt_add_aff() 170 mp_err 175 mp_err res = MP_OKAY; in ec_GFp_pt_sub_aff() 191 mp_err 204 mp_err 208 mp_err res = MP_OKAY; in ec_GFp_pt_mul_aff() 297 mp_err [all …]
|
H A D | ec2_163.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GF2m_163_mod() 132 mp_err 135 mp_err res = MP_OKAY; in ec_GF2m_163_sqr() 181 mp_err 185 mp_err res = MP_OKAY; in ec_GF2m_163_mul() 262 mp_err
|
H A D | ecl.h | 81 mp_err ECPoint_mul(const ECGroup *group, const mp_int *k, const mp_int *px, 88 mp_err ECPoints_mul(const ECGroup *group, const mp_int *k1, 96 mp_err ECPoint_validate(const ECGroup *group, const mp_int *px, const
|
H A D | ec2_193.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GF2m_193_mod() 140 mp_err 143 mp_err res = MP_OKAY; in ec_GF2m_193_sqr() 190 mp_err 194 mp_err res = MP_OKAY; in ec_GF2m_193_mul() 279 mp_err
|
H A D | ec2_233.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GF2m_233_mod() 156 mp_err 159 mp_err res = MP_OKAY; in ec_GF2m_233_sqr() 208 mp_err 212 mp_err res = MP_OKAY; in ec_GF2m_233_mul() 302 mp_err
|
H A D | ecp_384.c | 58 mp_err 61 mp_err res = MP_OKAY; in ec_GFp_nistp384_mod() 266 mp_err 269 mp_err res = MP_OKAY; in ec_GFp_nistp384_sqr() 280 mp_err 284 mp_err res = MP_OKAY; in ec_GFp_nistp384_mul() 294 mp_err
|
H A D | ecp_224.c | 60 mp_err 63 mp_err res = MP_OKAY; in ec_GFp_nistp224_mod() 319 mp_err 322 mp_err res = MP_OKAY; in ec_GFp_nistp224_sqr() 333 mp_err 337 mp_err res = MP_OKAY; in ec_GFp_nistp224_mul() 347 mp_err 351 mp_err res = MP_OKAY; in ec_GFp_nistp224_div() 372 mp_err
|
H A D | ecp_jac.c | 65 mp_err 69 mp_err res = MP_OKAY; in ec_GFp_pt_aff2jac() 89 mp_err 93 mp_err res = MP_OKAY; in ec_GFp_pt_jac2aff() 130 mp_err 138 mp_err 152 mp_err 157 mp_err res = MP_OKAY; in ec_GFp_pt_add_jac_aff() 241 mp_err 245 mp_err res = MP_OKAY; in ec_GFp_pt_dbl_jac() [all …]
|
/titanic_41/usr/src/common/mpi/ |
H A D | mpi.h | 131 typedef int mp_err; typedef 253 mp_err mp_init(mp_int *mp, int kmflag); 254 mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag); 255 mp_err mp_init_copy(mp_int *mp, const mp_int *from); 256 mp_err mp_copy(const mp_int *from, mp_int *to); 261 mp_err mp_set_int(mp_int *mp, long z); 263 mp_err mp_set_ulong(mp_int *mp, unsigned long z); 266 mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b); 267 mp_err mp_sub_d(const mp_int *a, mp_digit d, mp_int *b); 268 mp_err mp_mul_d(const mp_int *a, mp_digit d, mp_int *b); [all …]
|
H A D | mplogic.h | 71 mp_err mpl_not(mp_int *a, mp_int *b); /* one's complement */ 72 mp_err mpl_and(mp_int *a, mp_int *b, mp_int *c); /* bitwise AND */ 73 mp_err mpl_or(mp_int *a, mp_int *b, mp_int *c); /* bitwise OR */ 74 mp_err mpl_xor(mp_int *a, mp_int *b, mp_int *c); /* bitwise XOR */ 78 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d); /* right shift */ 79 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d); /* left shift */ 83 mp_err mpl_num_set(mp_int *a, int *num); /* count set bits */ 84 mp_err mpl_num_clear(mp_int *a, int *num); /* count clear bits */ 85 mp_err mpl_parity(mp_int *a); /* determine parity */ 89 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value); [all …]
|
H A D | mpprime.h | 60 mp_err mpp_divis(mp_int *a, mp_int *b); 61 mp_err mpp_divis_d(mp_int *a, mp_digit d); 64 mp_err mpp_random(mp_int *a); 65 mp_err mpp_random_size(mp_int *a, mp_size prec); 68 mp_err mpp_divis_vector(mp_int *a, const mp_digit *vec, int size, int *which); 69 mp_err mpp_divis_primes(mp_int *a, mp_digit *np); 70 mp_err mpp_fermat(mp_int *a, mp_digit w); 71 mp_err mpp_fermat_list(mp_int *a, const mp_digit *primes, mp_size nPrimes); 72 mp_err mpp_pprime(mp_int *a, int nt); 73 mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes, [all …]
|
H A D | mpi-priv.h | 187 mp_err s_mp_grow(mp_int *mp, mp_size min); /* increase allocated size */ 188 mp_err s_mp_pad(mp_int *mp, mp_size min); /* left pad with zeroes */ 202 mp_err s_mp_lshd(mp_int *mp, mp_size p); /* left-shift by p digits */ 204 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */ 208 mp_err s_mp_mul_2(mp_int *mp); /* multiply by 2 in place */ 209 mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd); 211 mp_err s_mp_add_d(mp_int *mp, mp_digit d); /* unsigned digit addition */ 212 mp_err s_mp_sub_d(mp_int *mp, mp_digit d); /* unsigned digit subtract */ 213 mp_err s_mp_mul_d(mp_int *mp, mp_digit d); /* unsigned digit multiply */ 214 mp_err s_mp_div_d(mp_int *mp, mp_digit d, mp_digit *r); [all …]
|
H A D | mplogic.c | 85 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_rsh() 87 mp_err res; in mpl_rsh() 104 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_lsh() 106 mp_err res; in mpl_lsh() 126 mp_err mpl_set_bit(mp_int *a, mp_size bitNum, mp_size value) in mpl_set_bit() 129 mp_err rv; in mpl_set_bit() 156 mp_err mpl_get_bit(const mp_int *a, mp_size bitNum) in mpl_get_bit() 159 mp_err rv; in mpl_get_bit() 167 rv = (mp_err)(MP_DIGIT(a, ix) >> bit) & 1; in mpl_get_bit() 181 mp_err mpl_get_bits(const mp_int *a, mp_size lsbNum, mp_size numBits) in mpl_get_bits() [all …]
|
H A D | mp_gf2m.h | 53 mp_err mp_badd(const mp_int *a, const mp_int *b, mp_int *c); 54 mp_err mp_bmul(const mp_int *a, const mp_int *b, mp_int *c); 61 mp_err mp_bmod(const mp_int *a, const unsigned int p[], mp_int *r); 62 mp_err mp_bmulmod(const mp_int *a, const mp_int *b, const unsigned int p[], 64 mp_err mp_bsqrmod(const mp_int *a, const unsigned int p[], mp_int *r); 65 mp_err mp_bdivmod(const mp_int *y, const mp_int *x, const mp_int *pp, 69 mp_err mp_barr2poly(const unsigned int p[], mp_int *a);
|
H A D | mpi.c | 132 mp_err mp_init(mp_int *mp, int kmflag) in mp_init() 150 mp_err mp_init_size(mp_int *mp, mp_size prec, int kmflag) in mp_init_size() 179 mp_err mp_init_copy(mp_int *mp, const mp_int *from) in mp_init_copy() 211 mp_err mp_copy(const mp_int *from, mp_int *to) in mp_copy() 354 mp_err mp_set_int(mp_int *mp, long z) in mp_set_int() 358 mp_err res; in mp_set_int() 389 mp_err mp_set_ulong(mp_int *mp, unsigned long z) in mp_set_ulong() 392 mp_err res; in mp_set_ulong() 429 mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b) in mp_add_d() 432 mp_err res; in mp_add_d() [all …]
|
H A D | mpprime.c | 89 mp_err mpp_random(mp_int *a) in mpp_random() 112 mp_err mpp_random_size(mp_int *a, mp_size prec) in mpp_random_size() 114 mp_err res; in mpp_random_size()
|
H A D | mp_gf2m.c | 209 mp_err 215 mp_err res = MP_OKAY; in mp_badd() 287 mp_err 293 mp_err res = MP_OKAY; in mp_bmul() 352 mp_err 359 mp_err res = MP_OKAY; in mp_bmod() 434 mp_err 437 mp_err res; in mp_bmulmod() 449 mp_err 455 mp_err res; in mp_bsqrmod() [all …]
|