/external/boringssl/src/crypto/bn/ |
D | internal.h | 160 #define TOBN(hi, lo) ((BN_ULONG)hi << 32 | lo) 192 (BN_ULONG *)x, sizeof(x) / sizeof(BN_ULONG), \ 193 sizeof(x) / sizeof(BN_ULONG), 0, BN_FLG_STATIC_DATA \ 197 #define Lw(t) (((BN_ULONG)(t))&BN_MASK2) 198 #define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2) 201 BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); 202 BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w); 203 void bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num); 204 BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d); 205 BN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,int num); [all …]
|
D | rsaz_exp.h | 48 void RSAZ_1024_mod_exp_avx2(BN_ULONG result[16], 49 const BN_ULONG base_norm[16], const BN_ULONG exponent[16], 50 const BN_ULONG m_norm[16], const BN_ULONG RR[16], BN_ULONG k0); 53 void RSAZ_512_mod_exp(BN_ULONG result[8], 54 const BN_ULONG base_norm[8], const BN_ULONG exponent[8], 55 const BN_ULONG m_norm[8], BN_ULONG k0, const BN_ULONG RR[8]);
|
D | generic.c | 100 BN_ULONG high, low, ret, tmp = (a); \ 113 BN_ULONG high, low, ret, ta = (a); \ 123 BN_ULONG tmp = (a); \ 143 BN_ULONG m, m1, lt, ht; \ 153 ht += L2HBITS((BN_ULONG)1); \ 165 BN_ULONG l, h, m; \ 184 BN_ULONG l, h; \ 205 BN_ULONG l, h; \ 223 BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, in bn_mul_add_words() 224 BN_ULONG w) { in bn_mul_add_words() [all …]
|
D | mul.c | 65 void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb) { in bn_mul_normal() 66 BN_ULONG *rr; in bn_mul_normal() 70 BN_ULONG *ltmp; in bn_mul_normal() 110 void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) { in bn_mul_low_normal() 146 static BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, in bn_sub_part_words() 147 const BN_ULONG *b, int cl, int dl) { in bn_sub_part_words() 148 BN_ULONG c, t; in bn_sub_part_words() 298 BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, 316 static void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, in bn_mul_recursive() 317 int dna, int dnb, BN_ULONG *t) { in bn_mul_recursive() [all …]
|
D | rsaz_exp.c | 55 void rsaz_1024_mul_avx2(void *ret,const void *a,const void *b,const void *n,BN_ULONG k); 56 void rsaz_1024_sqr_avx2(void *ret,const void *a,const void *n,BN_ULONG k,int cnt); 72 ALIGN64 static const BN_ULONG one[40] = 74 ALIGN64 static const BN_ULONG two80[40] = 77 void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16], in RSAZ_1024_mod_exp_avx2() 78 const BN_ULONG base_norm[16], const BN_ULONG exponent[16], in RSAZ_1024_mod_exp_avx2() 79 const BN_ULONG m_norm[16], const BN_ULONG RR[16], BN_ULONG k0) in RSAZ_1024_mod_exp_avx2() 265 void rsaz_512_mul(void *ret,const void *a,const void *b,const void *n,BN_ULONG k); 266 void rsaz_512_mul_scatter4(void *ret,const void *a,const void *n,BN_ULONG k,const void *tbl,unsigne… 267 void rsaz_512_mul_gather4(void *ret,const void *a,const void *tbl,const void *n,BN_ULONG k,unsigned… [all …]
|
D | cmp.c | 64 BN_ULONG t1, t2, *ap, *bp; in BN_ucmp() 87 BN_ULONG t1, t2; in BN_cmp() 133 int bn_cmp_words(const BN_ULONG *a, const BN_ULONG *b, int n) { in bn_cmp_words() 135 BN_ULONG aa, bb; in bn_cmp_words() 153 int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b, int cl, int dl) { in bn_cmp_part_words() 175 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_abs_is_word() 194 int BN_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_is_word()
|
D | div.c | 119 BN_ULONG *resp, *wnump; in BN_div() 120 BN_ULONG d0, d1; in BN_div() 252 BN_ULONG q, l0; in BN_div() 255 BN_ULONG n0, n1, rem = 0; in BN_div() 267 q = (BN_ULONG)(((((BN_ULLONG)n0) << BN_BITS2) | n1) / d0); in BN_div() 292 BN_ULONG t2l, t2h; in BN_div() 311 BN_ULONG ql, qh; in BN_div() 564 BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w) { in BN_div_word() 565 BN_ULONG ret = 0; in BN_div_word() 572 return (BN_ULONG) - 1; in BN_div_word() [all …]
|
D | convert.c | 75 BN_ULONG word = 0; in BN_bin2bn() 123 BN_ULONG l; in BN_bn2bin() 135 static BN_ULONG constant_time_select_ulong(int v, BN_ULONG x, BN_ULONG y) { in constant_time_select_ulong() 136 BN_ULONG mask = v; in constant_time_select_ulong() 153 static BN_ULONG read_word_padded(const BIGNUM *in, size_t i) { in read_word_padded() 155 BN_ULONG l = in->d[constant_time_select_ulong( in read_word_padded() 164 BN_ULONG l; in BN_bn2bin_padded() 261 BN_ULONG word = 0; in decode_hex() 266 BN_ULONG hex; in decode_hex() 292 BN_ULONG l = 0; in decode_dec() [all …]
|
D | bn.c | 169 static const BN_ULONG kOneLimbs[1] = { 1 }; in BN_value_one() 183 unsigned BN_num_bits_word(BN_ULONG l) { in BN_num_bits_word() 253 int BN_set_word(BIGNUM *bn, BN_ULONG value) { in BN_set_word() 282 BN_ULONG *a; in bn_wexpand() 298 a = (BN_ULONG *)OPENSSL_malloc(sizeof(BN_ULONG) * words); in bn_wexpand() 304 memcpy(a, bn->d, sizeof(BN_ULONG) * bn->top); in bn_wexpand() 322 BN_ULONG *ftl; in bn_correct_top()
|
D | shift.c | 68 BN_ULONG *t, *f; in BN_lshift() 69 BN_ULONG l; in BN_lshift() 105 BN_ULONG *ap, *rp, t, c; in BN_lshift1() 137 BN_ULONG *t, *f; in BN_rshift() 138 BN_ULONG l, tmp; in BN_rshift() 189 BN_ULONG *ap, *rp, t, c; in BN_rshift1() 240 a->d[i] |= (((BN_ULONG)1) << j); in BN_set_bit() 258 a->d[i] &= (~(((BN_ULONG)1) << j)); in BN_clear_bit()
|
D | prime.c | 635 static BN_ULONG get_word(const BIGNUM *bn) { in get_word() 645 BN_ULONG delta; in probable_prime() 646 BN_ULONG maxdelta = BN_MASK2 - primes[NUMPRIMES - 1]; in probable_prime() 656 mods[i] = (uint16_t)BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime() 661 BN_ULONG size_limit; in probable_prime() 664 size_limit = ~((BN_ULONG)0) - get_word(rnd); in probable_prime() 666 size_limit = (((BN_ULONG)1) << bits) - get_word(rnd) - 1; in probable_prime() 676 BN_ULONG rnd_word = get_word(rnd); in probable_prime() 756 if (BN_mod_word(rnd, (BN_ULONG)primes[i]) <= 1) { in probable_prime_dh() 828 if ((BN_mod_word(p, (BN_ULONG)primes[i]) == 0) || in probable_prime_dh_safe() [all …]
|
D | montgomery.c | 169 BN_ULONG buf[2]; in BN_MONT_CTX_set() 223 if (bn_expand(Ri, (int)sizeof(BN_ULONG) * 2) == NULL) { in BN_MONT_CTX_set() 333 BN_ULONG *ap, *np, *rp, n0, v, carry; 354 memset(&rp[r->top], 0, (max - r->top) * sizeof(BN_ULONG)); 378 BN_ULONG *nrp; 385 nrp = (BN_ULONG *)(((intptr_t)rp & ~m) | ((intptr_t)ap & m)); 388 BN_ULONG t1, t2, t3, t4; 421 BN_ULONG *ap,*np,*rp,n0,v,carry; in BN_from_montgomery_word() 440 memset(&(rp[r->top]),0,(max-r->top)*sizeof(BN_ULONG)); in BN_from_montgomery_word() 463 BN_ULONG *nrp; in BN_from_montgomery_word() [all …]
|
D | exponentiation.c | 127 void bn_mul_mont_gather5(BN_ULONG *rp, const BN_ULONG *ap, const void *table, 128 const BN_ULONG *np, const BN_ULONG *n0, int num, 130 void bn_scatter5(const BN_ULONG *inp, size_t num, void *table, size_t power); 131 void bn_gather5(BN_ULONG *out, size_t num, void *table, size_t power); 132 void bn_power5(BN_ULONG *rp, const BN_ULONG *ap, const void *table, 133 const BN_ULONG *np, const BN_ULONG *n0, int num, int power); 134 int bn_from_montgomery(BN_ULONG *rp, const BN_ULONG *ap, 135 const BN_ULONG *not_used, const BN_ULONG *np, 136 const BN_ULONG *n0, int num); 609 BN_ULONG A = a->d[0]; in BN_mod_exp() [all …]
|
D | add.c | 106 BN_ULONG *ap, *bp, *rp, carry, t1, t2; in BN_uadd() 162 int BN_add_word(BIGNUM *a, BN_ULONG w) { in BN_add_word() 163 BN_ULONG l; in BN_add_word() 263 register BN_ULONG t1, t2, *ap, *bp, *rp; in BN_usub() 327 int BN_sub_word(BIGNUM *a, BN_ULONG w) { in BN_sub_word()
|
D | kronecker.c | 59 #define BN_lsw(n) (((n)->top == 0) ? (BN_ULONG) 0 : (n)->d[0])
|
D | bn_test.cc | 837 static void print_word(FILE *fp, BN_ULONG w) { in print_word() 859 BN_ULONG s = b->d[0]; in test_div_word() 860 BN_ULONG r = BN_div_word(b.get(), s); in test_div_word() 861 if (r == (BN_ULONG)-1) { in test_div_word()
|
/external/boringssl/src/crypto/bn/asm/ |
D | x86_64-gcc.c | 73 register BN_ULONG high, low; \ 88 register BN_ULONG high, low; \ 99 BN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num, in bn_mul_add_words() 100 BN_ULONG w) { in bn_mul_add_words() 101 BN_ULONG c1 = 0; in bn_mul_add_words() 132 BN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w) { in bn_mul_words() 133 BN_ULONG c1 = 0; in bn_mul_words() 162 void bn_sqr_words(BN_ULONG *r, const BN_ULONG *a, int n) { in bn_sqr_words() 189 BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d) { in bn_div_words() 190 BN_ULONG ret, waste; in bn_div_words() [all …]
|
/external/boringssl/src/crypto/ec/ |
D | p256-x86_64.c | 54 BN_ULONG X[P256_LIMBS]; 55 BN_ULONG Y[P256_LIMBS]; 56 BN_ULONG Z[P256_LIMBS]; 60 BN_ULONG X[P256_LIMBS]; 61 BN_ULONG Y[P256_LIMBS]; 69 void ecp_nistz256_neg(BN_ULONG res[P256_LIMBS], const BN_ULONG a[P256_LIMBS]); 71 void ecp_nistz256_mul_mont(BN_ULONG res[P256_LIMBS], 72 const BN_ULONG a[P256_LIMBS], 73 const BN_ULONG b[P256_LIMBS]); 75 void ecp_nistz256_sqr_mont(BN_ULONG res[P256_LIMBS], [all …]
|
D | ec.c | 473 !BN_set_word(&group->cofactor, (BN_ULONG)data->cofactor)) { in ec_group_new_from_data()
|
D | p256-x86_64-table.h | 32 static const BN_ULONG 34 sizeof(BN_ULONG)] = {
|
/external/boringssl/src/crypto/dh/ |
D | params.c | 61 static const BN_ULONG dh1024_160_p[] = { 71 static const BN_ULONG dh1024_160_g[] = { 81 static const BN_ULONG dh1024_160_q[] = { 85 static const BN_ULONG dh2048_224_p[] = { 104 static const BN_ULONG dh2048_224_g[] = { 123 static const BN_ULONG dh2048_224_q[] = { 128 static const BN_ULONG dh2048_256_p[] = { 146 static const BN_ULONG dh2048_256_g[] = { 164 static const BN_ULONG dh2048_256_q[] = { 171 static const BN_ULONG dh1024_safe_prime_1[] = { [all …]
|
D | check.c | 103 BN_ULONG l; in DH_check()
|
/external/boringssl/src/include/openssl/ |
D | bn.h | 149 #define BN_ULONG uint64_t macro 155 #define BN_ULONG uint32_t 222 OPENSSL_EXPORT int BN_set_word(BIGNUM *bn, BN_ULONG value); 301 OPENSSL_EXPORT BN_ULONG BN_get_word(const BIGNUM *bn); 384 OPENSSL_EXPORT int BN_add_word(BIGNUM *a, BN_ULONG w); 397 OPENSSL_EXPORT int BN_sub_word(BIGNUM *a, BN_ULONG w); 406 OPENSSL_EXPORT int BN_mul_word(BIGNUM *bn, BN_ULONG w); 424 OPENSSL_EXPORT BN_ULONG BN_div_word(BIGNUM *numerator, BN_ULONG divisor); 446 OPENSSL_EXPORT int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w); 455 OPENSSL_EXPORT int BN_is_word(const BIGNUM *bn, BN_ULONG w); [all …]
|
/external/google-tv-pairing-protocol/cpp/src/polo/util/ |
D | poloutil.cc | 67 BN_ULONG value = bn->d[0]; in BigEndianBytesToInt()
|
/external/ipsec-tools/src/racoon/ |
D | crypto_openssl.c | 2594 *var = vmalloc(bn->top * sizeof(BN_ULONG));
|