Home
last modified time | relevance | path

Searched refs:BIGNUM (Results 1 – 25 of 196) sorted by relevance

12345678

/external/openssl/crypto/bn/
Dbn.h309 typedef struct bignum_st BIGNUM;
332 BIGNUM RR; /* used to convert to montgomery form */
333 BIGNUM N; /* The modulus */
334 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
346 BIGNUM N; /* the divisor */
347 BIGNUM Nr; /* the reciprocal */
415 BIGNUM *_tmp_bn = (a); \
425 const BIGNUM *BN_value_one(void);
433 BIGNUM *BN_CTX_get(BN_CTX *ctx);
435 int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
[all …]
Dbn_mod.c119 int BN_mod(BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
127 int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx) in BN_nnmod()
141 int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) in BN_mod_add()
150 int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m) in BN_mod_add_quick()
159 int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx) in BN_mod_sub()
168 int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m) in BN_mod_sub_quick()
178 int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, in BN_mod_mul()
181 BIGNUM *t; in BN_mod_mul()
203 int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) in BN_mod_sqr()
211 int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx) in BN_mod_lshift1()
[all …]
Dbn_const.c14 BIGNUM *get_rfc2409_prime_768(BIGNUM *bn) in get_rfc2409_prime_768()
37 BIGNUM *get_rfc2409_prime_1024(BIGNUM *bn) in get_rfc2409_prime_1024()
63 BIGNUM *get_rfc3526_prime_1536(BIGNUM *bn) in get_rfc3526_prime_1536()
93 BIGNUM *get_rfc3526_prime_2048(BIGNUM *bn) in get_rfc3526_prime_2048()
129 BIGNUM *get_rfc3526_prime_3072(BIGNUM *bn) in get_rfc3526_prime_3072()
175 BIGNUM *get_rfc3526_prime_4096(BIGNUM *bn) in get_rfc3526_prime_4096()
232 BIGNUM *get_rfc3526_prime_6144(BIGNUM *bn) in get_rfc3526_prime_6144()
310 BIGNUM *get_rfc3526_prime_8192(BIGNUM *bn) in get_rfc3526_prime_8192()
Dbn_prime.c129 static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
130 const BIGNUM *a1_odd, int k, BN_CTX *ctx, BN_MONT_CTX *mont);
131 static int probable_prime(BIGNUM *rnd, int bits);
132 static int probable_prime_dh(BIGNUM *rnd, int bits,
133 const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
134 static int probable_prime_dh_safe(BIGNUM *rnd, int bits,
135 const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
159 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, in BN_generate_prime_ex()
160 const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb) in BN_generate_prime_ex()
162 BIGNUM *t; in BN_generate_prime_ex()
[all …]
Dbn_gcd.c115 static BIGNUM *euclid(BIGNUM *a, BIGNUM *b);
117 int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx) in BN_gcd()
119 BIGNUM *a,*b,*t; in BN_gcd()
147 static BIGNUM *euclid(BIGNUM *a, BIGNUM *b) in euclid()
149 BIGNUM *t; in euclid()
206 static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
207 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
208 BIGNUM *BN_mod_inverse(BIGNUM *in, in BN_mod_inverse()
209 const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx) in BN_mod_inverse()
211 BIGNUM *A,*B,*X,*Y,*M,*D,*T,*R=NULL; in BN_mod_inverse()
[all …]
Dbn_blind.c120 BIGNUM *A;
121 BIGNUM *Ai;
122 BIGNUM *e;
123 BIGNUM *mod; /* just a reference */
132 int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
133 const BIGNUM *m, BN_CTX *ctx,
137 BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod) in BN_BLINDING_new()
219 int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx) in BN_BLINDING_convert()
224 int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *ctx) in BN_BLINDING_convert_ex()
252 int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx) in BN_BLINDING_invert()
[all …]
Dbn_lib.c134 const BIGNUM *BN_value_one(void) in BN_value_one()
137 static const BIGNUM const_one={(BN_ULONG *)&data_one,1,1,0,BN_FLG_STATIC_DATA}; in BN_value_one()
229 int BN_num_bits(const BIGNUM *a) in BN_num_bits()
238 void BN_clear_free(BIGNUM *a) in BN_clear_free()
251 OPENSSL_cleanse(a,sizeof(BIGNUM)); in BN_clear_free()
256 void BN_free(BIGNUM *a) in BN_free()
273 void BN_init(BIGNUM *a) in BN_init()
275 memset(a,0,sizeof(BIGNUM)); in BN_init()
279 BIGNUM *BN_new(void) in BN_new()
281 BIGNUM *ret; in BN_new()
[all …]
Dbn_gf2m.c229 int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) in BN_GF2m_add()
232 const BIGNUM *at, *bt; in BN_GF2m_add()
267 int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]) in BN_GF2m_mod_arr()
365 int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p) in BN_GF2m_mod()
386 int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const int p[], BN_CTX *ctx) in BN_GF2m_mod_mul_arr()
389 BIGNUM *s; in BN_GF2m_mod_mul_arr()
439 int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx) in BN_GF2m_mod_mul()
463 int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[], BN_CTX *ctx) in BN_GF2m_mod_sqr_arr()
466 BIGNUM *s; in BN_GF2m_mod_sqr_arr()
495 int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) in BN_GF2m_mod_sqr()
[all …]
/external/openssl/include/openssl/
Dbn.h309 typedef struct bignum_st BIGNUM;
332 BIGNUM RR; /* used to convert to montgomery form */
333 BIGNUM N; /* The modulus */
334 BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1
346 BIGNUM N; /* the divisor */
347 BIGNUM Nr; /* the reciprocal */
415 BIGNUM *_tmp_bn = (a); \
425 const BIGNUM *BN_value_one(void);
433 BIGNUM *BN_CTX_get(BN_CTX *ctx);
435 int BN_rand(BIGNUM *rnd, int bits, int top,int bottom);
[all …]
Dsrp.h78 BIGNUM *bn;
87 BIGNUM *s;
88 BIGNUM *v;
89 const BIGNUM *g;
90 const BIGNUM *N;
102 BIGNUM *default_g;
103 BIGNUM *default_N;
111 BIGNUM *g;
112 BIGNUM *N;
123 …te_verifier_BN(const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, BIGNUM *N, BI…
[all …]
Dec.h238 …et_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofact…
252 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
260 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx);
292 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_C…
302 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
313 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_…
323 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
364 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
374 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
458 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
[all …]
Ddsa.h125 BIGNUM *r;
126 BIGNUM *s;
133 int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
134 BIGNUM **rp);
137 int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
138 BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
140 int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
141 const BIGNUM *m, BN_CTX *ctx,
163 BIGNUM *p;
164 BIGNUM *q; /* == 20 */
[all …]
/external/openssl/crypto/srp/
Dsrp.h78 BIGNUM *bn;
87 BIGNUM *s;
88 BIGNUM *v;
89 const BIGNUM *g;
90 const BIGNUM *N;
102 BIGNUM *default_g;
103 BIGNUM *default_N;
111 BIGNUM *g;
112 BIGNUM *N;
123 …te_verifier_BN(const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, BIGNUM *N, BI…
[all …]
Dsrp_lib.c78 static BIGNUM *srp_Calc_k(BIGNUM *N, BIGNUM *g) in srp_Calc_k()
108 BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N) in SRP_Calc_u()
112 BIGNUM *u; in SRP_Calc_u()
143 BIGNUM *SRP_Calc_server_key(BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b, BIGNUM *N) in SRP_Calc_server_key()
145 BIGNUM *tmp = NULL, *S = NULL; in SRP_Calc_server_key()
170 BIGNUM *SRP_Calc_B(BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v) in SRP_Calc_B()
172 BIGNUM *kv = NULL, *gb = NULL; in SRP_Calc_B()
173 BIGNUM *B = NULL, *k = NULL; in SRP_Calc_B()
203 BIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass) in SRP_Calc_x()
235 BIGNUM *SRP_Calc_A(BIGNUM *a, BIGNUM *N, BIGNUM *g) in SRP_Calc_A()
[all …]
/external/openssl/crypto/ec/
Dec_lcl.h105 int (*group_set_curve)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
106 int (*group_get_curve)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
129 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
131 BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *);
133 const BIGNUM *x, const BIGNUM *y, BN_CTX *);
135 BIGNUM *x, BIGNUM *y, BN_CTX *);
137 const BIGNUM *x, int y_bit, BN_CTX *);
161 int (*mul)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
162 size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *);
172 int (*field_mul)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
[all …]
Dec.h238 …et_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofact…
252 int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
260 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx);
292 int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_C…
302 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
313 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_…
323 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx);
364 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
374 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
458 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
[all …]
/external/openssh/
Djpake.h43 BIGNUM *s; /* Secret (salted, crypted password) */
44 BIGNUM *k; /* Derived key */
47 BIGNUM *x1; /* random in Zq */
48 BIGNUM *x2; /* random in Z*q */
51 BIGNUM *x3; /* random in Zq */
52 BIGNUM *x4; /* random in Z*q */
57 BIGNUM *g_x1; /* g^x1 */
58 BIGNUM *g_x2; /* g^x2 */
63 BIGNUM *g_x3; /* g^x3 */
64 BIGNUM *g_x4; /* g^x4 */
[all …]
Dschnorr.h26 BIGNUM *p, *q, *g;
29 BIGNUM *bn_rand_range_gt_one(const BIGNUM *high);
31 void debug3_bn(const BIGNUM *, const char *, ...)
42 schnorr_sign(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g,
43 const EVP_MD *evp_md, const BIGNUM *x, const BIGNUM *g_x,
44 const u_char *id, u_int idlen, BIGNUM **r_p, BIGNUM **e_p);
46 schnorr_sign_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g,
47 const BIGNUM *x, const BIGNUM *g_x, const u_char *id, u_int idlen,
50 schnorr_verify(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g,
51 const EVP_MD *evp_md, const BIGNUM *g_x, const u_char *id, u_int idlen,
[all …]
Dmonitor_wrap.h53 int mm_auth_rsa_key_allowed(struct passwd *, BIGNUM *, Key **);
54 int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *);
55 BIGNUM *mm_auth_rsa_generate_challenge(Key *);
87 int mm_ssh1_session_key(BIGNUM *);
107 void mm_auth2_jpake_get_pwdata(struct Authctxt *, BIGNUM **, char **, char **);
109 BIGNUM **, BIGNUM **, BIGNUM **, BIGNUM **,
111 void mm_jpake_step2(struct modp_group *, BIGNUM *,
112 BIGNUM *, BIGNUM *, BIGNUM *, BIGNUM *,
115 BIGNUM **, u_char **, u_int *);
116 void mm_jpake_key_confirm(struct modp_group *, BIGNUM *, BIGNUM *,
[all …]
Dschnorr.c63 static BIGNUM *
64 schnorr_hash(const BIGNUM *p, const BIGNUM *q, const BIGNUM *g, in schnorr_hash()
65 const EVP_MD *evp_md, const BIGNUM *g_v, const BIGNUM *g_x, in schnorr_hash()
70 BIGNUM *h; in schnorr_hash()
125 schnorr_sign(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, in schnorr_sign()
126 const EVP_MD *evp_md, const BIGNUM *x, const BIGNUM *g_x, in schnorr_sign()
127 const u_char *id, u_int idlen, BIGNUM **r_p, BIGNUM **e_p) in schnorr_sign()
130 BIGNUM *h, *tmp, *v, *g_v, *r; in schnorr_sign()
219 schnorr_sign_buf(const BIGNUM *grp_p, const BIGNUM *grp_q, const BIGNUM *grp_g, in schnorr_sign_buf()
220 const BIGNUM *x, const BIGNUM *g_x, const u_char *id, u_int idlen, in schnorr_sign_buf()
[all …]
Dkex.h148 void kex_derive_keys(Kex *, u_char *, u_int, BIGNUM *);
161 BIGNUM *, BIGNUM *, BIGNUM *, u_char **, u_int *);
164 int, u_char *, int, int, int, int, BIGNUM *, BIGNUM *, BIGNUM *,
165 BIGNUM *, BIGNUM *, u_char **, u_int *);
170 const BIGNUM *, u_char **, u_int *);
179 derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
/external/openssl/crypto/jpake/
Djpake.c17 BIGNUM *p;
18 BIGNUM *g;
19 BIGNUM *q;
20 BIGNUM *gxc; /* Alice's g^{x3} or Bob's g^{x1} */
21 BIGNUM *gxd; /* Alice's g^{x4} or Bob's g^{x2} */
27 BIGNUM *secret; /* The shared secret */
29 BIGNUM *xa; /* Alice's x1 or Bob's x3 */
30 BIGNUM *xb; /* Alice's x2 or Bob's x4 */
31 BIGNUM *key; /* The calculated (shared) key */
75 const char *peer_name, const BIGNUM *p, in JPAKE_CTX_init()
[all …]
/external/openssl/crypto/dsa/
Ddsa.h125 BIGNUM *r;
126 BIGNUM *s;
133 int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,
134 BIGNUM **rp);
137 int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
138 BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
140 int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
141 const BIGNUM *m, BN_CTX *ctx,
163 BIGNUM *p;
164 BIGNUM *q; /* == 20 */
[all …]
Ddsa_asn1.c111 ASN1_SIMPLE(DSA, p, BIGNUM),
112 ASN1_SIMPLE(DSA, q, BIGNUM),
113 ASN1_SIMPLE(DSA, g, BIGNUM),
114 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
115 ASN1_SIMPLE(DSA, priv_key, BIGNUM)
121 ASN1_SIMPLE(DSA, p, BIGNUM),
122 ASN1_SIMPLE(DSA, q, BIGNUM),
123 ASN1_SIMPLE(DSA, g, BIGNUM),
135 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
136 ASN1_SIMPLE(DSA, p, BIGNUM),
[all …]
/external/openssl/crypto/rsa/
Drsa_asn1.c84 ASN1_SIMPLE(RSA, n, BIGNUM),
85 ASN1_SIMPLE(RSA, e, BIGNUM),
86 ASN1_SIMPLE(RSA, d, BIGNUM),
87 ASN1_SIMPLE(RSA, p, BIGNUM),
88 ASN1_SIMPLE(RSA, q, BIGNUM),
89 ASN1_SIMPLE(RSA, dmp1, BIGNUM),
90 ASN1_SIMPLE(RSA, dmq1, BIGNUM),
91 ASN1_SIMPLE(RSA, iqmp, BIGNUM)
96 ASN1_SIMPLE(RSA, n, BIGNUM),
97 ASN1_SIMPLE(RSA, e, BIGNUM),

12345678