/titanic_50/usr/src/common/mpi/ |
H A D | mp_gf2m-priv.h | 53 extern const mp_digit mp_gf2m_sqr_tb[16]; 86 void s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b); 92 void s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1, 93 const mp_digit b0); 99 void s_bmul_3x3(mp_digit *r, const mp_digit a2, const mp_digit a1, const mp_digit a0, 100 const mp_digit b2, const mp_digit b1, const mp_digit b0); 106 void s_bmul_4x4(mp_digit *r, const mp_digit a3, const mp_digit a2, const mp_digit a1, 107 const mp_digit a0, const mp_digit b3, const mp_digit b2, const mp_digit b1, 108 const mp_digit b0);
|
H A D | mpi-priv.h | 124 #define CARRYOUT(W) (mp_digit)((W)>>DIGIT_BIT) 125 #define ACCUM(W) (mp_digit)(W) 157 void s_mp_setz(mp_digit *dp, mp_size count); /* zero digits */ 158 void s_mp_copy(const mp_digit *sp, mp_digit *dp, mp_size count); /* copy */ 173 #define s_mp_setz(dp, count) memset(dp, 0, (count) * sizeof(mp_digit)) 180 #define s_mp_copy(sp, dp, count) memcpy(dp, sp, (count) * sizeof(mp_digit)) 204 mp_err s_mp_mul_2d(mp_int *mp, mp_digit d); /* multiply by 2^d in place */ 205 void s_mp_div_2d(mp_int *mp, mp_digit d); /* divide by 2^d in place */ 206 void s_mp_mod_2d(mp_int *mp, mp_digit d); /* modulo 2^d in place */ 209 mp_err s_mp_norm(mp_int *a, mp_int *b, mp_digit *pd); [all …]
|
H A D | mp_gf2m.c | 53 const mp_digit mp_gf2m_sqr_tb[16] = 65 s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b) in s_bmul_1x1() 67 register mp_digit h, l, s; in s_bmul_1x1() 68 mp_digit tab[8], top2b = a >> 30; in s_bmul_1x1() 69 register mp_digit a1, a2, a4; in s_bmul_1x1() 97 s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b) in s_bmul_1x1() 99 register mp_digit h, l, s; in s_bmul_1x1() 100 mp_digit tab[16], top3b = a >> 61; in s_bmul_1x1() 101 register mp_digit a1, a2, a4, a8; in s_bmul_1x1() 142 s_bmul_2x2(mp_digit *r, const mp_digit a1, const mp_digit a0, const mp_digit b1, in s_bmul_2x2() [all …]
|
H A D | mpi.c | 155 if((DIGITS(mp) = s_mp_alloc(prec, sizeof(mp_digit), kmflag)) == NULL) in mp_init_size() 186 if((DIGITS(mp) = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL) in mp_init_copy() 220 mp_digit *tmp; in mp_copy() 234 if((tmp = s_mp_alloc(ALLOC(from), sizeof(mp_digit), FLAG(from))) == NULL) in mp_copy() 340 void mp_set(mp_int *mp, mp_digit d) in mp_set() 366 if (sizeof v <= sizeof(mp_digit)) { in mp_set_int() 373 res = s_mp_add_d(mp, (mp_digit)((v >> (ix * CHAR_BIT)) & UCHAR_MAX)); in mp_set_int() 400 if (sizeof z <= sizeof(mp_digit)) { in mp_set_ulong() 407 res = s_mp_add_d(mp, (mp_digit)((z >> (ix * CHAR_BIT)) & UCHAR_MAX)); in mp_set_ulong() 429 mp_err mp_add_d(const mp_int *a, mp_digit d, mp_int *b) in mp_add_d() [all …]
|
H A D | mpprime.h | 57 extern const mp_digit prime_tab[]; 61 mp_err mpp_divis_d(mp_int *a, mp_digit d); 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); 73 mp_err mpp_sieve(mp_int *trial, const mp_digit *primes, mp_size nPrimes,
|
H A D | mpi.h | 155 typedef unsigned long mp_digit; typedef 166 typedef unsigned long long mp_digit; typedef 177 typedef unsigned int mp_digit; typedef 217 #define MP_DIGIT_BIT (CHAR_BIT*sizeof(mp_digit)) 222 #define MP_HALF_RADIX (1+(mp_digit)MP_HALF_DIGIT_MAX) 245 mp_digit *dp; /* the digits themselves */ 260 void mp_set(mp_int *mp, mp_digit d); 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.c | 85 mp_err mpl_rsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_rsh() 104 mp_err mpl_lsh(const mp_int *a, mp_int *b, mp_digit d) in mpl_lsh() 130 mp_digit mask; in mpl_set_bit() 142 mask = (mp_digit)1 << bitNum; in mpl_set_bit() 185 mp_digit * digit = MP_DIGITS(a) + lsWndx; in mpl_get_bits() 186 mp_digit mask = ((1 << numBits) - 1); in mpl_get_bits() 214 mp_digit d; in mpl_significant_bits()
|
H A D | mpmontg.c | 105 mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime; in s_mp_redc() 133 mp_digit *pb; in s_mp_mul_mont() 134 mp_digit m_i; in s_mp_mul_mont() 162 mp_digit b_i = *pb++; in s_mp_mul_mont()
|
H A D | mpprime.c | 92 mp_digit next = 0; in mpp_random() 98 for(jx = 0; jx < sizeof(mp_digit); jx++) { in mpp_random()
|
H A D | mplogic.h | 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 */
|
/titanic_50/usr/src/common/crypto/ecc/ |
H A D | ecp_192.c | 65 mp_digit r3; in ec_GFp_nistp192_mod() 67 mp_digit carry; in ec_GFp_nistp192_mod() 70 mp_digit a5a = 0, a5b = 0, a4a = 0, a4b = 0, a3a = 0, a3b = 0; in ec_GFp_nistp192_mod() 71 mp_digit r0a, r0b, r1a, r1b, r2a, r2b; in ec_GFp_nistp192_mod() 73 mp_digit a5 = 0, a4 = 0, a3 = 0; in ec_GFp_nistp192_mod() 74 mp_digit r0, r1, r2; in ec_GFp_nistp192_mod() 304 mp_digit a0 = 0, a1 = 0, a2 = 0; in ec_GFp_nistp192_add() 305 mp_digit r0 = 0, r1 = 0, r2 = 0; in ec_GFp_nistp192_add() 306 mp_digit carry; in ec_GFp_nistp192_add() 385 mp_digit b0 = 0, b1 = 0, b2 = 0; in ec_GFp_nistp192_sub() [all …]
|
H A D | ecl_gf.c | 276 mp_digit a0 = 0, a1 = 0, a2 = 0; in ec_GFp_add_3() 277 mp_digit r0 = 0, r1 = 0, r2 = 0; in ec_GFp_add_3() 278 mp_digit carry; in ec_GFp_add_3() 359 mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0; in ec_GFp_add_4() 360 mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0; in ec_GFp_add_4() 361 mp_digit carry; in ec_GFp_add_4() 453 mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0; in ec_GFp_add_5() 454 mp_digit r0 = 0, r1 = 0, r2 = 0, r3 = 0, r4 = 0; in ec_GFp_add_5() 455 mp_digit carry; in ec_GFp_add_5() 530 mp_digit a0 = 0, a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0; in ec_GFp_add_6() [all …]
|
H A D | ecp_256.c | 64 mp_digit carry; in ec_GFp_nistp256_mod() 67 mp_digit a8=0, a9=0, a10=0, a11=0, a12=0, a13=0, a14=0, a15=0; in ec_GFp_nistp256_mod() 68 mp_digit r0, r1, r2, r3, r4, r5, r6, r7; in ec_GFp_nistp256_mod() 71 mp_digit a4=0, a5=0, a6=0, a7=0; in ec_GFp_nistp256_mod() 72 mp_digit a4h, a4l, a5h, a5l, a6h, a6l, a7h, a7l; in ec_GFp_nistp256_mod() 73 mp_digit r0, r1, r2, r3; in ec_GFp_nistp256_mod() 202 mp_digit r8_d = r8; in ec_GFp_nistp256_mod() 216 mp_digit r8_d = -r8; in ec_GFp_nistp256_mod() 351 mp_digit r4_long = r4; in ec_GFp_nistp256_mod() 352 mp_digit r4l = (r4_long << 32); in ec_GFp_nistp256_mod() [all …]
|
H A D | ecp_224.c | 67 mp_digit carry; in ec_GFp_nistp224_mod() 69 mp_digit a6a = 0, a6b = 0, in ec_GFp_nistp224_mod() 71 mp_digit r0a, r0b, r1a, r1b, r2a, r2b, r3a; in ec_GFp_nistp224_mod() 73 mp_digit a6 = 0, a5 = 0, a4 = 0, a3b = 0, a5a = 0; in ec_GFp_nistp224_mod() 74 mp_digit a6b = 0, a6a_a5b = 0, a5b = 0, a5a_a4b = 0, a4a_a3b = 0; in ec_GFp_nistp224_mod() 75 mp_digit r0, r1, r2, r3; in ec_GFp_nistp224_mod() 172 mp_digit maxInt = MP_DIGIT_MAX; in ec_GFp_nistp224_mod() 266 MP_ADD_CARRY(r1,((mp_digit)r3b) << 32, r1, 0, carry); in ec_GFp_nistp224_mod()
|
H A D | ec2_163.c | 64 mp_digit *u, z; in ec_GF2m_163_mod() 136 mp_digit *u, *v; in ec_GF2m_163_sqr() 186 mp_digit a2 = 0, a1 = 0, a0, b2 = 0, b1 = 0, b0; in ec_GF2m_163_mul() 189 mp_digit a5 = 0, a4 = 0, a3 = 0, b5 = 0, b4 = 0, b3 = 0; in ec_GF2m_163_mul() 190 mp_digit rm[6]; in ec_GF2m_163_mul()
|
H A D | ec2_193.c | 64 mp_digit *u, z; in ec_GF2m_193_mod() 144 mp_digit *u, *v; in ec_GF2m_193_sqr() 195 mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0; in ec_GF2m_193_mul() 198 mp_digit a6 = 0, a5 = 0, a4 = 0, b6 = 0, b5 = 0, b4 = 0; in ec_GF2m_193_mul() 199 mp_digit rm[8]; in ec_GF2m_193_mul()
|
H A D | ec2_233.c | 64 mp_digit *u, z; in ec_GF2m_233_mod() 160 mp_digit *u, *v; in ec_GF2m_233_sqr() 213 mp_digit a3 = 0, a2 = 0, a1 = 0, a0, b3 = 0, b2 = 0, b1 = 0, b0; in ec_GF2m_233_mul() 216 mp_digit a7 = 0, a6 = 0, a5 = 0, a4 = 0, b7 = 0, b6 = 0, b5 = 0, b4 = in ec_GF2m_233_mul() 218 mp_digit rm[8]; in ec_GF2m_233_mul()
|
H A D | ecl-priv.h | 64 (((curve_size_in_bits)+(sizeof(mp_digit)*8-1))/(sizeof(mp_digit)*8)) 65 #define ECL_BITS (sizeof(mp_digit)*8) 66 #define ECL_MAX_FIELD_SIZE_DIGITS (80/sizeof(mp_digit)) 95 { mp_digit tmp,sum; \ 103 { mp_digit tmp; \
|
H A D | ecp_384.c | 69 mp_digit s[10][12]; in ec_GFp_nistp384_mod() 77 mp_digit s[10][6]; in ec_GFp_nistp384_mod()
|
H A D | ecp_521.c | 70 mp_digit s1[ECP521_DIGITS] = { 0 }; in ec_GFp_nistp521_mod()
|
H A D | ec2_mont.c | 201 mp_digit top_bit, mask; in ec_GF2m_pt_mul_mont()
|