Home
last modified time | relevance | path

Searched refs:dh (Results 1 – 25 of 290) sorted by relevance

12345678910>>...12

/external/openssl/crypto/dh/
Ddh_key.c65 static int generate_key(DH *dh);
66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
67 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
71 static int dh_init(DH *dh);
72 static int dh_finish(DH *dh);
74 int DH_generate_key(DH *dh) in DH_generate_key() argument
77 if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD) in DH_generate_key()
78 && !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) in DH_generate_key()
84 return dh->meth->generate_key(dh); in DH_generate_key()
87 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument
[all …]
Ddh_ameth.c68 DH_free(pkey->pkey.dh); in int_dh_free()
81 DH *dh = NULL; in dh_pub_decode() local
97 if (!(dh = d2i_DHparams(NULL, &pm, pmlen))) in dh_pub_decode()
110 if (!(dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) in dh_pub_decode()
117 EVP_PKEY_assign_DH(pkey, dh); in dh_pub_decode()
123 if (dh) in dh_pub_decode()
124 DH_free(dh); in dh_pub_decode()
131 DH *dh; in dh_pub_encode() local
139 dh=pkey->pkey.dh; in dh_pub_encode()
142 str->length = i2d_DHparams(dh, &str->data); in dh_pub_encode()
[all …]
Ddh_check.c73 int DH_check(const DH *dh, int *ret) in DH_check() argument
86 if (BN_is_word(dh->g,DH_GENERATOR_2)) in DH_check()
88 l=BN_mod_word(dh->p,24); in DH_check()
92 else if (BN_is_word(dh->g,DH_GENERATOR_3)) in DH_check()
94 l=BN_mod_word(dh->p,12); in DH_check()
98 else if (BN_is_word(dh->g,DH_GENERATOR_5)) in DH_check()
100 l=BN_mod_word(dh->p,10); in DH_check()
107 if (!BN_is_prime_ex(dh->p,BN_prime_checks,ctx,NULL)) in DH_check()
111 if (!BN_rshift1(q,dh->p)) goto err; in DH_check()
122 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument
[all …]
Ddh.h116 int (*generate_key)(DH *dh);
117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
118 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
122 int (*init)(DH *dh);
123 int (*finish)(DH *dh);
127 int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
188 int DH_set_method(DH *dh, const DH_METHOD *meth);
192 void DH_free(DH *dh);
193 int DH_up_ref(DH *dh);
194 int DH_size(const DH *dh);
[all …]
Ddh_pmeth.c163 DH *dh = NULL; in pkey_dh_paramgen() local
174 dh = DH_new(); in pkey_dh_paramgen()
175 if (!dh) in pkey_dh_paramgen()
177 ret = DH_generate_parameters_ex(dh, in pkey_dh_paramgen()
180 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_paramgen()
182 DH_free(dh); in pkey_dh_paramgen()
188 DH *dh = NULL; in pkey_dh_keygen() local
194 dh = DH_new(); in pkey_dh_keygen()
195 if (!dh) in pkey_dh_keygen()
197 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_keygen()
[all …]
Dp512.c78 DH *dh; in main() local
80 dh=DH_new(); in main()
81 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
82 dh->g=BN_new(); in main()
83 BN_set_word(dh->g,2); in main()
84 PEM_write_DHparams(stdout,dh); in main()
Dp1024.c85 DH *dh; in main() local
87 dh=DH_new(); in main()
88 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
89 dh->g=BN_new(); in main()
90 BN_set_word(dh->g,2); in main()
91 PEM_write_DHparams(stdout,dh); in main()
Dp192.c73 DH *dh; in main() local
75 dh=DH_new(); in main()
76 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
77 dh->g=BN_new(); in main()
78 BN_set_word(dh->g,3); in main()
79 PEM_write_DHparams(stdout,dh); in main()
/external/chromium_org/third_party/openssl/openssl/crypto/dh/
Ddh_key.c65 static int generate_key(DH *dh);
66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
67 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
71 static int dh_init(DH *dh);
72 static int dh_finish(DH *dh);
74 int DH_generate_key(DH *dh) in DH_generate_key() argument
77 if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD) in DH_generate_key()
78 && !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) in DH_generate_key()
84 return dh->meth->generate_key(dh); in DH_generate_key()
87 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument
[all …]
Ddh_ameth.c68 DH_free(pkey->pkey.dh); in int_dh_free()
81 DH *dh = NULL; in dh_pub_decode() local
97 if (!(dh = d2i_DHparams(NULL, &pm, pmlen))) in dh_pub_decode()
110 if (!(dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) in dh_pub_decode()
117 EVP_PKEY_assign_DH(pkey, dh); in dh_pub_decode()
123 if (dh) in dh_pub_decode()
124 DH_free(dh); in dh_pub_decode()
131 DH *dh; in dh_pub_encode() local
139 dh=pkey->pkey.dh; in dh_pub_encode()
142 str->length = i2d_DHparams(dh, &str->data); in dh_pub_encode()
[all …]
Ddh_check.c73 int DH_check(const DH *dh, int *ret) in DH_check() argument
86 if (BN_is_word(dh->g,DH_GENERATOR_2)) in DH_check()
88 l=BN_mod_word(dh->p,24); in DH_check()
92 else if (BN_is_word(dh->g,DH_GENERATOR_3)) in DH_check()
94 l=BN_mod_word(dh->p,12); in DH_check()
98 else if (BN_is_word(dh->g,DH_GENERATOR_5)) in DH_check()
100 l=BN_mod_word(dh->p,10); in DH_check()
107 if (!BN_is_prime_ex(dh->p,BN_prime_checks,ctx,NULL)) in DH_check()
111 if (!BN_rshift1(q,dh->p)) goto err; in DH_check()
122 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument
[all …]
Ddh.h116 int (*generate_key)(DH *dh);
117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
118 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
122 int (*init)(DH *dh);
123 int (*finish)(DH *dh);
127 int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
188 int DH_set_method(DH *dh, const DH_METHOD *meth);
192 void DH_free(DH *dh);
193 int DH_up_ref(DH *dh);
194 int DH_size(const DH *dh);
[all …]
Ddh_pmeth.c163 DH *dh = NULL; in pkey_dh_paramgen() local
174 dh = DH_new(); in pkey_dh_paramgen()
175 if (!dh) in pkey_dh_paramgen()
177 ret = DH_generate_parameters_ex(dh, in pkey_dh_paramgen()
180 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_paramgen()
182 DH_free(dh); in pkey_dh_paramgen()
188 DH *dh = NULL; in pkey_dh_keygen() local
194 dh = DH_new(); in pkey_dh_keygen()
195 if (!dh) in pkey_dh_keygen()
197 EVP_PKEY_assign_DH(pkey, dh); in pkey_dh_keygen()
[all …]
Dp512.c78 DH *dh; in main() local
80 dh=DH_new(); in main()
81 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
82 dh->g=BN_new(); in main()
83 BN_set_word(dh->g,2); in main()
84 PEM_write_DHparams(stdout,dh); in main()
Dp192.c73 DH *dh; in main() local
75 dh=DH_new(); in main()
76 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
77 dh->g=BN_new(); in main()
78 BN_set_word(dh->g,3); in main()
79 PEM_write_DHparams(stdout,dh); in main()
Dp1024.c85 DH *dh; in main() local
87 dh=DH_new(); in main()
88 dh->p=BN_bin2bn(data,sizeof(data),NULL); in main()
89 dh->g=BN_new(); in main()
90 BN_set_word(dh->g,2); in main()
91 PEM_write_DHparams(stdout,dh); in main()
/external/tcpdump/
Dprint-dccp.c63 static inline u_int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len) in dccp_csum_coverage() argument
67 if (DCCPH_CSCOV(dh) == 0) in dccp_csum_coverage()
69 cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(u_int32_t); in dccp_csum_coverage()
74 const struct dccp_hdr *dh, u_int len) in dccp_cksum() argument
76 return nextproto4_cksum(ip, (const u_int8_t *)(void *)dh, in dccp_cksum()
77 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp_cksum()
81 static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len) in dccp6_cksum() argument
83 return nextproto6_cksum(ip6, (const u_int8_t *)(void *)dh, in dccp6_cksum()
84 dccp_csum_coverage(dh, len), IPPROTO_DCCP); in dccp6_cksum()
95 static u_int64_t dccp_seqno(const struct dccp_hdr *dh) in dccp_seqno() argument
[all …]
Ddccp.h39 #define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF) argument
40 #define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF) argument
42 #define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1) argument
43 #define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF) argument
44 #define DCCPH_SEQ(dh) (((dh)->dccph_xtrs.dccph_seq) >> 8) argument
/external/wpa_supplicant_8/src/crypto/
Ddh_groups.c1193 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv) in dh_init() argument
1198 if (dh == NULL) in dh_init()
1202 *priv = wpabuf_alloc(dh->prime_len); in dh_init()
1206 if (random_get_bytes(wpabuf_put(*priv, dh->prime_len), dh->prime_len)) in dh_init()
1213 if (os_memcmp(wpabuf_head(*priv), dh->prime, dh->prime_len) > 0) { in dh_init()
1219 pv_len = dh->prime_len; in dh_init()
1223 if (crypto_mod_exp(dh->generator, dh->generator_len, in dh_init()
1225 dh->prime, dh->prime_len, wpabuf_mhead(pv), in dh_init()
1247 const struct dh_group *dh) in dh_derive_shared() argument
1252 if (dh == NULL || peer_public == NULL || own_private == NULL) in dh_derive_shared()
[all …]
/external/openssl/apps/
Ddh.c91 DH *dh=NULL; in MAIN() local
230 dh=d2i_DHparams_bio(in,NULL); in MAIN()
232 dh=PEM_read_bio_DHparams(in,NULL,NULL,NULL); in MAIN()
238 if (dh == NULL) in MAIN()
249 DHparams_print(out,dh); in MAIN()
252 BN_print(stdout,dh->p); in MAIN()
254 BN_print(stdout,dh->g); in MAIN()
256 if (dh->length != 0) in MAIN()
257 printf("recommended private length=%ld\n",dh->length); in MAIN()
263 if (!DH_check(dh,&i)) in MAIN()
[all …]
Ddhparam.c152 DH *dh=NULL; in MAIN() local
319 dh = DSA_dup_DH(dsa); in MAIN()
321 if (dh == NULL) in MAIN()
330 dh = DH_new(); in MAIN()
333 if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb)) in MAIN()
383 dh = DSA_dup_DH(dsa); in MAIN()
385 if (dh == NULL) in MAIN()
395 dh=d2i_DHparams_bio(in,NULL); in MAIN()
397 dh=PEM_read_bio_DHparams(in,NULL,NULL,NULL); in MAIN()
399 if (dh == NULL) in MAIN()
[all …]
/external/chromium_org/third_party/openssl/openssl/apps/
Ddh.c91 DH *dh=NULL; in MAIN() local
230 dh=d2i_DHparams_bio(in,NULL); in MAIN()
232 dh=PEM_read_bio_DHparams(in,NULL,NULL,NULL); in MAIN()
238 if (dh == NULL) in MAIN()
249 DHparams_print(out,dh); in MAIN()
252 BN_print(stdout,dh->p); in MAIN()
254 BN_print(stdout,dh->g); in MAIN()
256 if (dh->length != 0) in MAIN()
257 printf("recommended private length=%ld\n",dh->length); in MAIN()
263 if (!DH_check(dh,&i)) in MAIN()
[all …]
Ddhparam.c152 DH *dh=NULL; in MAIN() local
319 dh = DSA_dup_DH(dsa); in MAIN()
321 if (dh == NULL) in MAIN()
330 dh = DH_new(); in MAIN()
333 if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb)) in MAIN()
383 dh = DSA_dup_DH(dsa); in MAIN()
385 if (dh == NULL) in MAIN()
395 dh=d2i_DHparams_bio(in,NULL); in MAIN()
397 dh=PEM_read_bio_DHparams(in,NULL,NULL,NULL); in MAIN()
399 if (dh == NULL) in MAIN()
[all …]
/external/openssl/include/openssl/
Ddh.h116 int (*generate_key)(DH *dh);
117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
118 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
122 int (*init)(DH *dh);
123 int (*finish)(DH *dh);
127 int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
188 int DH_set_method(DH *dh, const DH_METHOD *meth);
192 void DH_free(DH *dh);
193 int DH_up_ref(DH *dh);
194 int DH_size(const DH *dh);
[all …]
/external/chromium_org/third_party/openssl/openssl/include/openssl/
Ddh.h116 int (*generate_key)(DH *dh);
117 int (*compute_key)(unsigned char *key,const BIGNUM *pub_key,DH *dh);
118 int (*bn_mod_exp)(const DH *dh, BIGNUM *r, const BIGNUM *a,
122 int (*init)(DH *dh);
123 int (*finish)(DH *dh);
127 int (*generate_params)(DH *dh, int prime_len, int generator, BN_GENCB *cb);
188 int DH_set_method(DH *dh, const DH_METHOD *meth);
192 void DH_free(DH *dh);
193 int DH_up_ref(DH *dh);
194 int DH_size(const DH *dh);
[all …]

12345678910>>...12