/external/boringssl/src/include/openssl/ |
D | bn.h | 172 OPENSSL_EXPORT BIGNUM *BN_new(void); 175 OPENSSL_EXPORT void BN_init(BIGNUM *bn); 179 OPENSSL_EXPORT void BN_free(BIGNUM *bn); 183 OPENSSL_EXPORT void BN_clear_free(BIGNUM *bn); 187 OPENSSL_EXPORT BIGNUM *BN_dup(const BIGNUM *src); 191 OPENSSL_EXPORT BIGNUM *BN_copy(BIGNUM *dest, const BIGNUM *src); 194 OPENSSL_EXPORT void BN_clear(BIGNUM *bn); 197 OPENSSL_EXPORT const BIGNUM *BN_value_one(void); 204 OPENSSL_EXPORT unsigned BN_num_bits(const BIGNUM *bn); 208 OPENSSL_EXPORT unsigned BN_num_bytes(const BIGNUM *bn); [all …]
|
D | dh.h | 92 OPENSSL_EXPORT void DH_get0_key(const DH *dh, const BIGNUM **out_pub_key, 93 const BIGNUM **out_priv_key); 98 OPENSSL_EXPORT int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 102 OPENSSL_EXPORT void DH_get0_pqg(const DH *dh, const BIGNUM **out_p, 103 const BIGNUM **out_q, const BIGNUM **out_g); 109 OPENSSL_EXPORT int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); 117 OPENSSL_EXPORT BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *ret); 147 OPENSSL_EXPORT int DH_compute_key(uint8_t *out, const BIGNUM *peers_key, 187 OPENSSL_EXPORT int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, 251 BIGNUM *p; [all …]
|
D | ec.h | 134 OPENSSL_EXPORT const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); 142 BIGNUM *cofactor, BN_CTX *ctx); 149 OPENSSL_EXPORT int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *out_p, 150 BIGNUM *out_a, BIGNUM *out_b, 221 BIGNUM *x, BIGNUM *y, 230 const BIGNUM *x, 231 const BIGNUM *y, 261 const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit, 286 const BIGNUM *n, const EC_POINT *q, 287 const BIGNUM *m, BN_CTX *ctx); [all …]
|
D | rsa.h | 105 OPENSSL_EXPORT void RSA_get0_key(const RSA *rsa, const BIGNUM **out_n, 106 const BIGNUM **out_e, const BIGNUM **out_d); 110 OPENSSL_EXPORT void RSA_get0_factors(const RSA *rsa, const BIGNUM **out_p, 111 const BIGNUM **out_q); 117 OPENSSL_EXPORT void RSA_get0_crt_params(const RSA *rsa, const BIGNUM **out_dmp1, 118 const BIGNUM **out_dmq1, 119 const BIGNUM **out_iqmp); 130 OPENSSL_EXPORT int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d); 140 OPENSSL_EXPORT int RSA_set0_factors(RSA *rsa, BIGNUM *p, BIGNUM *q); 150 OPENSSL_EXPORT int RSA_set0_crt_params(RSA *rsa, BIGNUM *dmp1, BIGNUM *dmq1, [all …]
|
D | dsa.h | 100 OPENSSL_EXPORT void DSA_get0_key(const DSA *dsa, const BIGNUM **out_pub_key, 101 const BIGNUM **out_priv_key); 105 OPENSSL_EXPORT void DSA_get0_pqg(const DSA *dsa, const BIGNUM **out_p, 106 const BIGNUM **out_q, const BIGNUM **out_g); 114 OPENSSL_EXPORT int DSA_set0_key(DSA *dsa, BIGNUM *pub_key, BIGNUM *priv_key); 121 OPENSSL_EXPORT int DSA_set0_pqg(DSA *dsa, BIGNUM *p, BIGNUM *q, BIGNUM *g); 166 BIGNUM *r, *s; 398 BIGNUM *p; 399 BIGNUM *q; // == 20 400 BIGNUM *g; [all …]
|
/external/boringssl/src/crypto/fipsmodule/bn/ |
D | internal.h | 216 int bn_minimal_width(const BIGNUM *bn); in OPENSSL_MSVC_PRAGMA() 220 void bn_set_minimal_width(BIGNUM *bn); in OPENSSL_MSVC_PRAGMA() 225 int bn_wexpand(BIGNUM *bn, size_t words); in OPENSSL_MSVC_PRAGMA() 229 int bn_expand(BIGNUM *bn, size_t bits); in OPENSSL_MSVC_PRAGMA() 233 OPENSSL_EXPORT int bn_resize_words(BIGNUM *bn, size_t words); in OPENSSL_MSVC_PRAGMA() 242 int bn_set_words(BIGNUM *bn, const BN_ULONG *words, size_t num); in OPENSSL_MSVC_PRAGMA() 246 int bn_fits_in_words(const BIGNUM *bn, size_t num); in OPENSSL_MSVC_PRAGMA() 250 int bn_copy_words(BN_ULONG *out, size_t num, const BIGNUM *bn); in OPENSSL_MSVC_PRAGMA() 336 int bn_rand_secret_range(BIGNUM *r, int *out_is_uniform, BN_ULONG min_inclusive, in OPENSSL_MSVC_PRAGMA() 337 const BIGNUM *max_exclusive); in OPENSSL_MSVC_PRAGMA() [all …]
|
D | div.c | 195 int BN_div(BIGNUM *quotient, BIGNUM *rem, const BIGNUM *numerator, in BN_div() 196 const BIGNUM *divisor, BN_CTX *ctx) { in BN_div() 198 BIGNUM wnum; in BN_div() 223 BIGNUM *tmp = BN_CTX_get(ctx); in BN_div() 224 BIGNUM *snum = BN_CTX_get(ctx); in BN_div() 225 BIGNUM *sdiv = BN_CTX_get(ctx); in BN_div() 226 BIGNUM *res = NULL; in BN_div() 403 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) { in BN_nnmod() 459 int bn_div_consttime(BIGNUM *quotient, BIGNUM *remainder, in bn_div_consttime() 460 const BIGNUM *numerator, const BIGNUM *divisor, in bn_div_consttime() [all …]
|
D | bn.c | 69 BIGNUM *BN_new(void) { in BN_new() 70 BIGNUM *bn = OPENSSL_malloc(sizeof(BIGNUM)); in BN_new() 77 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_new() 83 void BN_init(BIGNUM *bn) { in BN_init() 84 OPENSSL_memset(bn, 0, sizeof(BIGNUM)); in BN_init() 87 void BN_free(BIGNUM *bn) { in BN_free() 103 void BN_clear_free(BIGNUM *bn) { in BN_clear_free() 122 OPENSSL_cleanse(bn, sizeof(BIGNUM)); in BN_clear_free() 126 BIGNUM *BN_dup(const BIGNUM *src) { in BN_dup() 127 BIGNUM *copy; in BN_dup() [all …]
|
D | gcd.c | 116 int BN_mod_inverse_odd(BIGNUM *out, int *out_no_inverse, const BIGNUM *a, in BN_mod_inverse_odd() 117 const BIGNUM *n, BN_CTX *ctx) { in BN_mod_inverse_odd() 130 BIGNUM *A, *B, *X, *Y; in BN_mod_inverse_odd() 143 BIGNUM *R = out; in BN_mod_inverse_odd() 283 BIGNUM *BN_mod_inverse(BIGNUM *out, const BIGNUM *a, const BIGNUM *n, in BN_mod_inverse() 285 BIGNUM *new_out = NULL; in BN_mod_inverse() 296 BIGNUM *a_reduced = NULL; in BN_mod_inverse() 328 int BN_mod_inverse_blinded(BIGNUM *out, int *out_no_inverse, const BIGNUM *a, in BN_mod_inverse_blinded() 338 BIGNUM blinding_factor; in BN_mod_inverse_blinded() 356 int bn_mod_inverse_prime(BIGNUM *out, const BIGNUM *a, const BIGNUM *p, in bn_mod_inverse_prime() [all …]
|
D | add.c | 67 int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in BN_add() 68 const BIGNUM *tmp; in BN_add() 103 int bn_uadd_consttime(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in bn_uadd_consttime() 106 const BIGNUM *tmp = a; in bn_uadd_consttime() 130 int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in BN_uadd() 138 int BN_add_word(BIGNUM *a, BN_ULONG w) { in BN_add_word() 178 int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in BN_sub() 180 const BIGNUM *tmp; in BN_sub() 226 int bn_usub_consttime(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in bn_usub_consttime() 260 int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { in BN_usub() [all …]
|
D | prime.c | 393 static size_t num_trial_division_primes(const BIGNUM *n) { in num_trial_division_primes() 461 static int probable_prime(BIGNUM *rnd, int bits); 462 static int probable_prime_dh(BIGNUM *rnd, int bits, const BIGNUM *add, 463 const BIGNUM *rem, BN_CTX *ctx); 464 static int probable_prime_dh_safe(BIGNUM *rnd, int bits, const BIGNUM *add, 465 const BIGNUM *rem, BN_CTX *ctx); 482 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, in BN_generate_prime_ex() 483 const BIGNUM *rem, BN_GENCB *cb) { in BN_generate_prime_ex() 484 BIGNUM *t; in BN_generate_prime_ex() 581 static int bn_trial_division(uint16_t *out, const BIGNUM *bn) { in bn_trial_division() [all …]
|
D | exponentiation.c | 123 int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) { in BN_exp() 125 BIGNUM *v, *rr; in BN_exp() 176 BIGNUM N; // the divisor 177 BIGNUM Nr; // the reciprocal 200 static int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx) { in BN_RECP_CTX_set() 215 static int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx) { in BN_reciprocal() 217 BIGNUM *t; in BN_reciprocal() 240 static int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, in BN_div_recp() 243 BIGNUM *a, *b, *d, *r; in BN_div_recp() 343 static int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, in BN_mod_mul_reciprocal() [all …]
|
D | gcd_extra.c | 49 static int bn_gcd_consttime(BIGNUM *r, unsigned *out_shift, const BIGNUM *x, in bn_gcd_consttime() 50 const BIGNUM *y, BN_CTX *ctx) { in bn_gcd_consttime() 61 BIGNUM *u = BN_CTX_get(ctx); in bn_gcd_consttime() 62 BIGNUM *v = BN_CTX_get(ctx); in bn_gcd_consttime() 63 BIGNUM *tmp = BN_CTX_get(ctx); in bn_gcd_consttime() 122 int BN_gcd(BIGNUM *r, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) { in BN_gcd() 128 int bn_is_relatively_prime(int *out_relatively_prime, const BIGNUM *x, in bn_is_relatively_prime() 129 const BIGNUM *y, BN_CTX *ctx) { in bn_is_relatively_prime() 133 BIGNUM *gcd = BN_CTX_get(ctx); in bn_is_relatively_prime() 156 int bn_lcm_consttime(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { in bn_lcm_consttime() [all …]
|
D | cmp.c | 98 int BN_ucmp(const BIGNUM *a, const BIGNUM *b) { in BN_ucmp() 102 int BN_cmp(const BIGNUM *a, const BIGNUM *b) { in BN_cmp() 130 int BN_abs_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_abs_is_word() 141 int BN_cmp_word(const BIGNUM *a, BN_ULONG b) { in BN_cmp_word() 142 BIGNUM b_bn; in BN_cmp_word() 152 int BN_is_zero(const BIGNUM *bn) { in BN_is_zero() 156 int BN_is_one(const BIGNUM *bn) { in BN_is_one() 160 int BN_is_word(const BIGNUM *bn, BN_ULONG w) { in BN_is_word() 164 int BN_is_odd(const BIGNUM *bn) { in BN_is_odd() 168 int BN_is_pow2(const BIGNUM *bn) { in BN_is_pow2() [all …]
|
D | montgomery.c | 163 static int bn_mont_ctx_set_N_and_n0(BN_MONT_CTX *mont, const BIGNUM *mod) { in bn_mont_ctx_set_N_and_n0() 208 int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) { in BN_MONT_CTX_set() 236 BN_MONT_CTX *BN_MONT_CTX_new_for_modulus(const BIGNUM *mod, BN_CTX *ctx) { in BN_MONT_CTX_new_for_modulus() 246 BN_MONT_CTX *BN_MONT_CTX_new_consttime(const BIGNUM *mod, BN_CTX *ctx) { in BN_MONT_CTX_new_consttime() 265 const BIGNUM *mod, BN_CTX *bn_ctx) { in BN_MONT_CTX_set_locked() 283 int BN_to_montgomery(BIGNUM *ret, const BIGNUM *a, const BN_MONT_CTX *mont, in BN_to_montgomery() 319 static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, in BN_from_montgomery_word() 326 const BIGNUM *n = &mont->N; in BN_from_montgomery_word() 343 int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, const BN_MONT_CTX *mont, in BN_from_montgomery() 346 BIGNUM *t; in BN_from_montgomery() [all …]
|
D | bn_test.cc | 96 static int HexToBIGNUM(bssl::UniquePtr<BIGNUM> *out, const char *in) { in HexToBIGNUM() 97 BIGNUM *raw = NULL; in HexToBIGNUM() 112 bssl::UniquePtr<BIGNUM> GetBIGNUM(const char *attribute) { in GetBIGNUM() 117 bssl::UniquePtr<BIGNUM> ret = in GetInt() 133 bssl::UniquePtr<BIGNUM> GetBIGNUMImpl(const char *attribute, bool resize) { in GetBIGNUMImpl() 139 bssl::UniquePtr<BIGNUM> ret; in GetBIGNUMImpl() 162 const char *actual_expr, const char *operation, const BIGNUM *expected, in AssertBIGNUMSEqual() 163 const BIGNUM *actual) { in AssertBIGNUMSEqual() 185 bssl::UniquePtr<BIGNUM> a = t->GetBIGNUM("A"); in TestSum() 186 bssl::UniquePtr<BIGNUM> b = t->GetBIGNUM("B"); in TestSum() [all …]
|
D | bytes.c | 65 BIGNUM *BN_bin2bn(const uint8_t *in, size_t len, BIGNUM *ret) { in BN_bin2bn() 69 BIGNUM *bn = NULL; in BN_bin2bn() 111 BIGNUM *BN_le2bn(const uint8_t *in, size_t len, BIGNUM *ret) { in BN_le2bn() 112 BIGNUM *bn = NULL; in BN_le2bn() 145 size_t BN_bn2bin(const BIGNUM *in, uint8_t *out) { in BN_bn2bin() 165 int BN_bn2le_padded(uint8_t *out, size_t len, const BIGNUM *in) { in BN_bn2le_padded() 183 int BN_bn2bin_padded(uint8_t *out, size_t len, const BIGNUM *in) { in BN_bn2bin_padded() 203 BN_ULONG BN_get_word(const BIGNUM *bn) { in BN_get_word() 214 int BN_get_u64(const BIGNUM *bn, uint64_t *out) { in BN_get_u64()
|
D | shift.c | 67 int BN_lshift(BIGNUM *r, const BIGNUM *a, int n) { in BN_lshift() 105 int BN_lshift1(BIGNUM *r, const BIGNUM *a) { in BN_lshift1() 156 int BN_rshift(BIGNUM *r, const BIGNUM *a, int n) { in BN_rshift() 172 int bn_rshift_secret_shift(BIGNUM *r, const BIGNUM *a, unsigned n, in bn_rshift_secret_shift() 176 BIGNUM *tmp = BN_CTX_get(ctx); in bn_rshift_secret_shift() 210 int BN_rshift1(BIGNUM *r, const BIGNUM *a) { in BN_rshift1() 221 int BN_set_bit(BIGNUM *a, int n) { in BN_set_bit() 243 int BN_clear_bit(BIGNUM *a, int n) { in BN_clear_bit() 270 int BN_is_bit_set(const BIGNUM *a, int n) { in BN_is_bit_set() 277 int BN_mask_bits(BIGNUM *a, int n) { in BN_mask_bits() [all …]
|
/external/boringssl/src/crypto/fipsmodule/ec/ |
D | internal.h | 125 int (*group_set_curve)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, 126 const BIGNUM *b, BN_CTX *); 173 const BIGNUM *in); 174 int (*felem_to_bignum)(const EC_GROUP *group, BIGNUM *out, 203 BIGNUM order; 212 BIGNUM field; // For curves over GF(p), this is the modulus. 253 int ec_bignum_to_felem(const EC_GROUP *group, EC_FELEM *out, const BIGNUM *in); 257 int ec_felem_to_bignum(const EC_GROUP *group, BIGNUM *out, const EC_FELEM *in); 286 const BIGNUM *in); 370 int ec_field_element_to_scalar(const EC_GROUP *group, BIGNUM *r); [all …]
|
/external/boringssl/src/crypto/bn_extra/ |
D | convert.c | 72 int BN_bn2cbb_padded(CBB *out, size_t len, const BIGNUM *in) { in BN_bn2cbb_padded() 79 char *BN_bn2hex(const BIGNUM *bn) { in BN_bn2hex() 115 static int decode_hex(BIGNUM *bn, const char *in, int in_len) { in decode_hex() 162 static int decode_dec(BIGNUM *bn, const char *in, int in_len) { in decode_dec() 187 typedef int (*decode_func) (BIGNUM *bn, const char *in, int in_len); 190 static int bn_x2bn(BIGNUM **outp, const char *in, decode_func decode, char_test_func want_char) { in bn_x2bn() 191 BIGNUM *ret = NULL; in bn_x2bn() 242 int BN_hex2bn(BIGNUM **outp, const char *in) { in BN_hex2bn() 246 char *BN_bn2dec(const BIGNUM *a) { in BN_bn2dec() 249 BIGNUM *copy = NULL; in BN_bn2dec() [all …]
|
/external/openssh/ |
D | bufbn.c | 33 buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum_ret() 45 buffer_put_bignum(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum() 52 buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) in buffer_get_bignum_ret() 64 buffer_get_bignum(Buffer *buffer, BIGNUM *value) in buffer_get_bignum() 72 buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum2_ret() 84 buffer_put_bignum2(Buffer *buffer, const BIGNUM *value) in buffer_put_bignum2() 91 buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value) in buffer_get_bignum2_ret() 103 buffer_get_bignum2(Buffer *buffer, BIGNUM *value) in buffer_get_bignum2()
|
D | kex.h | 187 int kex_derive_keys_bn(struct ssh *, u_char *, u_int, const BIGNUM *); 202 const BIGNUM *, const BIGNUM *, const BIGNUM *, u_char *, size_t *); 207 const BIGNUM *, const BIGNUM *, const BIGNUM *, 208 const BIGNUM *, const BIGNUM *, 213 const EC_POINT *, const EC_POINT *, const BIGNUM *, u_char *, size_t *); 229 derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
|
/external/boringssl/src/crypto/fipsmodule/rsa/ |
D | rsa_impl.c | 112 static int ensure_fixed_copy(BIGNUM **out, const BIGNUM *in, int width) { in ensure_fixed_copy() 116 BIGNUM *copy = BN_dup(in); in ensure_fixed_copy() 159 const BIGNUM *n_fixed = &rsa->mont_n->N; in freeze_private_key() 182 const BIGNUM *p_fixed = &rsa->mont_p->N; in freeze_private_key() 190 const BIGNUM *q_fixed = &rsa->mont_q->N; in freeze_private_key() 195 BIGNUM *iqmp = BN_new(); in freeze_private_key() 216 BIGNUM *inv_small_mod_large_mont = BN_new(); in freeze_private_key() 261 BIGNUM *f, *result; in RSA_encrypt() 568 static int mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx); 578 BIGNUM *f, *result; in RSA_verify_raw() [all …]
|
/external/wpa_supplicant_8/src/crypto/ |
D | crypto_openssl.c | 84 static BIGNUM * get_group5_prime(void) in get_group5_prime() 116 static BIGNUM * get_group5_order(void) in get_group5_order() 552 BIGNUM *pub, *p; in crypto_dh_derive_secret() 563 BIGNUM *q, *tmp; in crypto_dh_derive_secret() 594 BIGNUM *bn_base, *bn_exp, *bn_modulus, *bn_result; in crypto_mod_exp() 804 BIGNUM *p, *g, *q; in dh5_init() 805 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dh5_init() 894 BIGNUM *p = NULL, *g, *priv_key = NULL, *pub_key = NULL; in dh5_init_fixed() 934 BIGNUM *pub_key; in dh5_derive_shared() 1276 BIGNUM *bn; in crypto_bignum_init_set() [all …]
|
/external/boringssl/src/crypto/dh/ |
D | dh.c | 117 void DH_get0_key(const DH *dh, const BIGNUM **out_pub_key, in DH_get0_key() 118 const BIGNUM **out_priv_key) { in DH_get0_key() 127 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() 141 void DH_get0_pqg(const DH *dh, const BIGNUM **out_p, const BIGNUM **out_q, in DH_get0_pqg() 142 const BIGNUM **out_g) { in DH_get0_pqg() 154 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { in DH_set0_pqg() 204 BIGNUM *t1, *t2; in DH_generate_parameters_ex() 296 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() 379 int DH_compute_key(unsigned char *out, const BIGNUM *peers_key, DH *dh) { in DH_compute_key() 381 BIGNUM *shared_key; in DH_compute_key() [all …]
|