/third_party/node/deps/openssl/openssl/crypto/dh/ |
H A D | dh_check.c | 20 #include "crypto/dh.h" 28 int DH_check_params_ex(const DH *dh) in DH_check_params_ex() argument 32 if (!DH_check_params(dh, &errflags)) in DH_check_params_ex() 48 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument 57 nid = DH_get_nid((DH *)dh); in DH_check_params() 65 return ossl_ffc_params_FIPS186_4_validate(dh->libctx, &dh->params, in DH_check_params() 69 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument 76 ctx = BN_CTX_new_ex(dh->libctx); in DH_check_params() 84 if (!BN_is_odd(dh in DH_check_params() 111 DH_check_ex(const DH *dh) DH_check_ex() argument 141 DH_check(const DH *dh, int *ret) DH_check() argument 230 DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) DH_check_pub_key_ex() argument 250 DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) DH_check_pub_key() argument 272 ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) ossl_dh_check_pub_key_partial() argument 278 ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) ossl_dh_check_priv_key() argument 332 ossl_dh_check_pairwise(const DH *dh) ossl_dh_check_pairwise() argument [all...] |
H A D | dh_key.c | 20 #include "crypto/dh.h" 29 static int generate_key(DH *dh); 30 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 33 static int dh_init(DH *dh); 34 static int dh_finish(DH *dh); 40 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in ossl_dh_compute_key() argument 47 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key() 52 if (dh->params.q != NULL in ossl_dh_compute_key() 53 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key() 58 if (BN_num_bits(dh in ossl_dh_compute_key() 114 DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) DH_compute_key() argument 144 DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) DH_compute_key_padded() argument 189 dh_bn_mod_exp(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) dh_bn_mod_exp() argument 196 dh_init(DH *dh) dh_init() argument 203 dh_finish(DH *dh) dh_finish() argument 216 DH_generate_key(DH *dh) DH_generate_key() argument 225 ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, const BIGNUM *priv_key, BIGNUM *pub_key) ossl_dh_generate_public_key() argument 261 generate_key(DH *dh) generate_key() argument 384 ossl_dh_buf2key(DH *dh, const unsigned char *buf, size_t len) ossl_dh_buf2key() argument 412 ossl_dh_key2buf(const DH *dh, unsigned char **pbuf_out, size_t size, int alloc) ossl_dh_key2buf() argument [all...] |
H A D | dh_lib.c | 26 #include "crypto/dh.h" 32 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument 39 mtmp = dh->meth; in DH_set_method() 41 mtmp->finish(dh); in DH_set_method() 43 ENGINE_finish(dh->engine); in DH_set_method() 44 dh->engine = NULL; in DH_set_method() 46 dh->meth = meth; in DH_set_method() 48 meth->init(dh); in DH_set_method() 52 const DH_METHOD *ossl_dh_get_method(const DH *dh) in ossl_dh_get_method() argument 54 return dh in ossl_dh_get_method() 192 DH_bits(const DH *dh) DH_bits() argument 199 DH_size(const DH *dh) DH_size() argument 206 DH_security_bits(const DH *dh) DH_security_bits() argument 221 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) DH_get0_pqg() argument 227 DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) DH_set0_pqg() argument 243 DH_get_length(const DH *dh) DH_get_length() argument 248 DH_set_length(DH *dh, long length) DH_set_length() argument 255 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) DH_get0_key() argument 263 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) DH_set0_key() argument 278 DH_get0_p(const DH *dh) DH_get0_p() argument 283 DH_get0_q(const DH *dh) DH_get0_q() argument 288 DH_get0_g(const DH *dh) DH_get0_g() argument 293 DH_get0_priv_key(const DH *dh) DH_get0_priv_key() argument 298 DH_get0_pub_key(const DH *dh) DH_get0_pub_key() argument 303 DH_clear_flags(DH *dh, int flags) DH_clear_flags() argument 308 DH_test_flags(const DH *dh, int flags) DH_test_flags() argument 313 DH_set_flags(DH *dh, int flags) DH_set_flags() argument 319 DH_get0_engine(DH *dh) DH_get0_engine() argument 325 ossl_dh_get0_params(DH *dh) ossl_dh_get0_params() argument 329 ossl_dh_get0_nid(const DH *dh) ossl_dh_get0_nid() argument [all...] |
H A D | dh_ameth.c | 25 #include "crypto/dh.h" 37 DH *dh = NULL; in d2i_dhp() local 41 dh = d2i_DHxparams(NULL, pp, length); in d2i_dhp() 43 dh = d2i_DHparams(NULL, pp, length); in d2i_dhp() 45 return dh; in d2i_dhp() 57 DH_free(pkey->pkey.dh); in int_dh_free() 70 DH *dh = NULL; in dh_pub_decode() local 85 if ((dh = d2i_dhp(pkey, &pm, pmlen)) == NULL) { in dh_pub_decode() 96 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dh_pub_decode() 102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode() 113 DH *dh; dh_pub_encode() local 167 DH *dh = ossl_dh_key_from_pkcs8(p8, NULL, NULL); dh_priv_decode() local 230 DH *dh; dh_param_decode() local 333 DHparams_dup(const DH *dh) DHparams_dup() argument 399 DH *dh; dh_pkey_ctrl() local 430 DH *dh = pkey->pkey.dh; dh_pkey_public_check() local 442 DH *dh = pkey->pkey.dh; dh_pkey_param_check() local 456 DH *dh = from->pkey.dh; dh_pkey_export_to() local 514 DH *dh = ossl_dh_new_ex(pctx->libctx); dh_pkey_import_from_type() local 544 DH *dh = from->pkey.dh; dh_pkey_copy() local [all...] |
H A D | dh_group_params.c | 25 #include "crypto/dh.h" 29 DH *dh = ossl_dh_new_ex(libctx); in dh_param_init() local 31 if (dh == NULL) in dh_param_init() 34 ossl_ffc_named_group_set(&dh->params, group); in dh_param_init() 35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init() 36 dh->dirty_cnt++; in dh_param_init() 37 return dh; in dh_param_init() 56 void ossl_dh_cache_named_group(DH *dh) in ossl_dh_cache_named_group() argument 60 if (dh == NULL) in ossl_dh_cache_named_group() 63 dh in ossl_dh_cache_named_group() 82 ossl_dh_is_named_safe_prime_group(const DH *dh) ossl_dh_is_named_safe_prime_group() argument 93 DH_get_nid(const DH *dh) DH_get_nid() argument [all...] |
H A D | dh_backend.c | 22 #include "crypto/dh.h" 31 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[]) in dh_ffc_params_fromdata() argument 36 if (dh == NULL) in dh_ffc_params_fromdata() 38 ffc = ossl_dh_get0_params(dh); in dh_ffc_params_fromdata() 44 ossl_dh_cache_named_group(dh); /* This increments dh->dirty_cnt */ in dh_ffc_params_fromdata() 48 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]) in ossl_dh_params_fromdata() argument 53 if (!dh_ffc_params_fromdata(dh, params)) in ossl_dh_params_fromdata() 60 || !DH_set_length(dh, priv_len))) in ossl_dh_params_fromdata() 66 int ossl_dh_key_fromdata(DH *dh, cons argument 97 ossl_dh_params_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[]) ossl_dh_params_todata() argument 109 ossl_dh_key_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[], int include_private) ossl_dh_key_todata() argument 129 ossl_dh_is_foreign(const DH *dh) ossl_dh_is_foreign() argument 145 ossl_dh_dup(const DH *dh, int selection) ossl_dh_dup() argument 198 DH *dh = NULL; ossl_dh_key_from_pkcs8() local [all...] |
H A D | dh_rfc5114.c | 31 DH *dh = DH_new(); \ 33 if (dh == NULL) \ 35 dh->params.p = BN_dup(&ossl_bignum_dh##x##_p); \ 36 dh->params.g = BN_dup(&ossl_bignum_dh##x##_g); \ 37 dh->params.q = BN_dup(&ossl_bignum_dh##x##_q); \ 38 if (dh->params.p == NULL || dh->params.q == NULL || dh->params.g == NULL) {\ 39 DH_free(dh); \ 42 return dh; \ [all...] |
H A D | dh_asn1.c | 22 #include "crypto/dh.h" 38 DH *dh = (DH *)*pval; in dh_cb() local 40 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_cb() 41 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_cb() 42 ossl_dh_cache_named_group(dh); in dh_cb() 43 dh->dirty_cnt++; in dh_cb() 97 DH *dh = NULL; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local 99 dh = DH_new(); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 100 if (dh == NULL) in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 104 DH_free(dh); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 135 i2d_DHxparams(const DH *dh, unsigned char **pp) i2d_DHxparams() argument [all...] |
/third_party/openssl/crypto/dh/ |
H A D | dh_check.c | 20 #include "crypto/dh.h" 28 int DH_check_params_ex(const DH *dh) in DH_check_params_ex() argument 32 if (!DH_check_params(dh, &errflags)) in DH_check_params_ex() 48 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument 57 nid = DH_get_nid((DH *)dh); in DH_check_params() 65 return ossl_ffc_params_FIPS186_4_validate(dh->libctx, &dh->params, in DH_check_params() 69 int DH_check_params(const DH *dh, int *ret) in DH_check_params() argument 76 ctx = BN_CTX_new_ex(dh->libctx); in DH_check_params() 84 if (!BN_is_odd(dh in DH_check_params() 111 DH_check_ex(const DH *dh) DH_check_ex() argument 141 DH_check(const DH *dh, int *ret) DH_check() argument 229 DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) DH_check_pub_key_ex() argument 249 DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) DH_check_pub_key() argument 271 ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) ossl_dh_check_pub_key_partial() argument 276 ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) ossl_dh_check_priv_key() argument 330 ossl_dh_check_pairwise(const DH *dh) ossl_dh_check_pairwise() argument [all...] |
H A D | dh_key.c | 20 #include "crypto/dh.h" 29 static int generate_key(DH *dh); 30 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 33 static int dh_init(DH *dh); 34 static int dh_finish(DH *dh); 40 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in ossl_dh_compute_key() argument 47 if (BN_num_bits(dh->params.p) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key() 52 if (dh->params.q != NULL in ossl_dh_compute_key() 53 && BN_num_bits(dh->params.q) > OPENSSL_DH_MAX_MODULUS_BITS) { in ossl_dh_compute_key() 58 if (BN_num_bits(dh in ossl_dh_compute_key() 114 DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) DH_compute_key() argument 144 DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) DH_compute_key_padded() argument 189 dh_bn_mod_exp(const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx) dh_bn_mod_exp() argument 196 dh_init(DH *dh) dh_init() argument 204 dh_finish(DH *dh) dh_finish() argument 217 DH_generate_key(DH *dh) DH_generate_key() argument 226 ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, const BIGNUM *priv_key, BIGNUM *pub_key) ossl_dh_generate_public_key() argument 262 generate_key(DH *dh) generate_key() argument 385 ossl_dh_buf2key(DH *dh, const unsigned char *buf, size_t len) ossl_dh_buf2key() argument 413 ossl_dh_key2buf(const DH *dh, unsigned char **pbuf_out, size_t size, int alloc) ossl_dh_key2buf() argument [all...] |
H A D | dh_lib.c | 26 #include "crypto/dh.h" 32 int DH_set_method(DH *dh, const DH_METHOD *meth) in DH_set_method() argument 39 mtmp = dh->meth; in DH_set_method() 41 mtmp->finish(dh); in DH_set_method() 43 ENGINE_finish(dh->engine); in DH_set_method() 44 dh->engine = NULL; in DH_set_method() 46 dh->meth = meth; in DH_set_method() 48 meth->init(dh); in DH_set_method() 52 const DH_METHOD *ossl_dh_get_method(const DH *dh) in ossl_dh_get_method() argument 54 return dh in ossl_dh_get_method() 190 DH_bits(const DH *dh) DH_bits() argument 197 DH_size(const DH *dh) DH_size() argument 204 DH_security_bits(const DH *dh) DH_security_bits() argument 219 DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) DH_get0_pqg() argument 225 DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) DH_set0_pqg() argument 241 DH_get_length(const DH *dh) DH_get_length() argument 246 DH_set_length(DH *dh, long length) DH_set_length() argument 253 DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) DH_get0_key() argument 261 DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) DH_set0_key() argument 276 DH_get0_p(const DH *dh) DH_get0_p() argument 281 DH_get0_q(const DH *dh) DH_get0_q() argument 286 DH_get0_g(const DH *dh) DH_get0_g() argument 291 DH_get0_priv_key(const DH *dh) DH_get0_priv_key() argument 296 DH_get0_pub_key(const DH *dh) DH_get0_pub_key() argument 301 DH_clear_flags(DH *dh, int flags) DH_clear_flags() argument 306 DH_test_flags(const DH *dh, int flags) DH_test_flags() argument 311 DH_set_flags(DH *dh, int flags) DH_set_flags() argument 317 DH_get0_engine(DH *dh) DH_get0_engine() argument 323 ossl_dh_get0_params(DH *dh) ossl_dh_get0_params() argument 327 ossl_dh_get0_nid(const DH *dh) ossl_dh_get0_nid() argument [all...] |
H A D | dh_ameth.c | 25 #include "crypto/dh.h" 37 DH *dh = NULL; in d2i_dhp() local 41 dh = d2i_DHxparams(NULL, pp, length); in d2i_dhp() 43 dh = d2i_DHparams(NULL, pp, length); in d2i_dhp() 45 return dh; in d2i_dhp() 57 DH_free(pkey->pkey.dh); in int_dh_free() 70 DH *dh = NULL; in dh_pub_decode() local 85 if ((dh = d2i_dhp(pkey, &pm, pmlen)) == NULL) { in dh_pub_decode() 96 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dh_pub_decode() 102 EVP_PKEY_assign(pkey, pkey->ameth->pkey_id, dh); in dh_pub_decode() 113 DH *dh; dh_pub_encode() local 167 DH *dh = ossl_dh_key_from_pkcs8(p8, NULL, NULL); dh_priv_decode() local 230 DH *dh; dh_param_decode() local 333 DHparams_dup(const DH *dh) DHparams_dup() argument 399 DH *dh; dh_pkey_ctrl() local 430 DH *dh = pkey->pkey.dh; dh_pkey_public_check() local 442 DH *dh = pkey->pkey.dh; dh_pkey_param_check() local 456 DH *dh = from->pkey.dh; dh_pkey_export_to() local 514 DH *dh = ossl_dh_new_ex(pctx->libctx); dh_pkey_import_from_type() local 544 DH *dh = from->pkey.dh; dh_pkey_copy() local [all...] |
H A D | dh_group_params.c | 25 #include "crypto/dh.h" 29 DH *dh = ossl_dh_new_ex(libctx); in dh_param_init() local 31 if (dh == NULL) in dh_param_init() 34 ossl_ffc_named_group_set(&dh->params, group); in dh_param_init() 35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init() 36 dh->dirty_cnt++; in dh_param_init() 37 return dh; in dh_param_init() 56 void ossl_dh_cache_named_group(DH *dh) in ossl_dh_cache_named_group() argument 60 if (dh == NULL) in ossl_dh_cache_named_group() 63 dh in ossl_dh_cache_named_group() 82 ossl_dh_is_named_safe_prime_group(const DH *dh) ossl_dh_is_named_safe_prime_group() argument 93 DH_get_nid(const DH *dh) DH_get_nid() argument [all...] |
H A D | dh_backend.c | 22 #include "crypto/dh.h" 31 static int dh_ffc_params_fromdata(DH *dh, const OSSL_PARAM params[]) in dh_ffc_params_fromdata() argument 36 if (dh == NULL) in dh_ffc_params_fromdata() 38 ffc = ossl_dh_get0_params(dh); in dh_ffc_params_fromdata() 44 ossl_dh_cache_named_group(dh); /* This increments dh->dirty_cnt */ in dh_ffc_params_fromdata() 48 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]) in ossl_dh_params_fromdata() argument 53 if (!dh_ffc_params_fromdata(dh, params)) in ossl_dh_params_fromdata() 60 || !DH_set_length(dh, priv_len))) in ossl_dh_params_fromdata() 66 int ossl_dh_key_fromdata(DH *dh, cons argument 97 ossl_dh_params_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[]) ossl_dh_params_todata() argument 109 ossl_dh_key_todata(DH *dh, OSSL_PARAM_BLD *bld, OSSL_PARAM params[], int include_private) ossl_dh_key_todata() argument 129 ossl_dh_is_foreign(const DH *dh) ossl_dh_is_foreign() argument 145 ossl_dh_dup(const DH *dh, int selection) ossl_dh_dup() argument 198 DH *dh = NULL; ossl_dh_key_from_pkcs8() local [all...] |
H A D | dh_rfc5114.c | 31 DH *dh = DH_new(); \ 33 if (dh == NULL) \ 35 dh->params.p = BN_dup(&ossl_bignum_dh##x##_p); \ 36 dh->params.g = BN_dup(&ossl_bignum_dh##x##_g); \ 37 dh->params.q = BN_dup(&ossl_bignum_dh##x##_q); \ 38 if (dh->params.p == NULL || dh->params.q == NULL || dh->params.g == NULL) {\ 39 DH_free(dh); \ 42 return dh; \ [all...] |
H A D | dh_asn1.c | 22 #include "crypto/dh.h" 38 DH *dh = (DH *)*pval; in dh_cb() local 40 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_cb() 41 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_cb() 42 ossl_dh_cache_named_group(dh); in dh_cb() 43 dh->dirty_cnt++; in dh_cb() 97 DH *dh = NULL; in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() local 99 dh = DH_new(); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 100 if (dh == NULL) in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 104 DH_free(dh); in IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname() 135 i2d_DHxparams(const DH *dh, unsigned char **pp) i2d_DHxparams() argument [all...] |
/third_party/node/deps/openssl/openssl/include/crypto/ |
H A D | dh.h | 16 # include <openssl/dh.h> 22 int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits, 24 int ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, 29 void ossl_dh_cache_named_group(DH *dh); 30 int ossl_dh_is_named_safe_prime_group(const DH *dh); 32 FFC_PARAMS *ossl_dh_get0_params(DH *dh); 33 int ossl_dh_get0_nid(const DH *dh); 34 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]); 35 int ossl_dh_key_fromdata(DH *dh, const OSSL_PARAM params[], int include_private); 36 int ossl_dh_params_todata(DH *dh, OSSL_PARAM_BL [all...] |
/third_party/openssl/include/crypto/ |
H A D | dh.h | 16 # include <openssl/dh.h> 22 int ossl_dh_generate_ffc_parameters(DH *dh, int type, int pbits, int qbits, 24 int ossl_dh_generate_public_key(BN_CTX *ctx, const DH *dh, 29 void ossl_dh_cache_named_group(DH *dh); 30 int ossl_dh_is_named_safe_prime_group(const DH *dh); 32 FFC_PARAMS *ossl_dh_get0_params(DH *dh); 33 int ossl_dh_get0_nid(const DH *dh); 34 int ossl_dh_params_fromdata(DH *dh, const OSSL_PARAM params[]); 35 int ossl_dh_key_fromdata(DH *dh, const OSSL_PARAM params[], int include_private); 36 int ossl_dh_params_todata(DH *dh, OSSL_PARAM_BL [all...] |
/third_party/node/test/parallel/ |
H A D | test-crypto-dh-generate-keys.js | 24 const dh = crypto.createDiffieHellman(size); 25 setup(dh); 26 const firstPublicKey = unlessInvalidState(() => dh.getPublicKey()); 27 const firstPrivateKey = unlessInvalidState(() => dh.getPrivateKey()); 28 dh.generateKeys(); 29 const secondPublicKey = dh.getPublicKey(); 30 const secondPrivateKey = dh.getPrivateKey(); 48 testGenerateKeysChangesKeys((dh) => { 49 dh.generateKeys(); 53 testGenerateKeysChangesKeys((dh) [all...] |
/third_party/node/deps/openssl/openssl/providers/implementations/keymgmt/ |
H A D | dh_kmgmt.c | 24 #include "crypto/dh.h" 100 DH *dh = NULL; in dh_newdata() local 103 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dh_newdata() 104 if (dh != NULL) { in dh_newdata() 105 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_newdata() 106 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_newdata() 109 return dh; in dh_newdata() 114 DH *dh = NULL; in dhx_newdata() local 116 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dhx_newdata() 117 if (dh ! in dhx_newdata() 131 const DH *dh = keydata; dh_has() local 192 DH *dh = keydata; dh_import() local 217 DH *dh = keydata; dh_export() local 316 DH *dh = key; dh_get_params() local 369 DH *dh = key; dh_set_params() local 381 dh_validate_public(const DH *dh, int checktype) dh_validate_public() argument 398 dh_validate_private(const DH *dh) dh_validate_private() argument 411 const DH *dh = keydata; dh_validate() local 500 DH *dh = templ; dh_gen_set_template() local 694 DH *dh = NULL; dh_gen() local 807 DH *dh = NULL; dh_load() local [all...] |
/third_party/openssl/providers/implementations/keymgmt/ |
H A D | dh_kmgmt.c | 24 #include "crypto/dh.h" 100 DH *dh = NULL; in dh_newdata() local 103 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dh_newdata() 104 if (dh != NULL) { in dh_newdata() 105 DH_clear_flags(dh, DH_FLAG_TYPE_MASK); in dh_newdata() 106 DH_set_flags(dh, DH_FLAG_TYPE_DH); in dh_newdata() 109 return dh; in dh_newdata() 114 DH *dh = NULL; in dhx_newdata() local 116 dh = ossl_dh_new_ex(PROV_LIBCTX_OF(provctx)); in dhx_newdata() 117 if (dh ! in dhx_newdata() 131 const DH *dh = keydata; dh_has() local 192 DH *dh = keydata; dh_import() local 217 DH *dh = keydata; dh_export() local 313 DH *dh = key; dh_get_params() local 366 DH *dh = key; dh_set_params() local 378 dh_validate_public(const DH *dh, int checktype) dh_validate_public() argument 395 dh_validate_private(const DH *dh) dh_validate_private() argument 408 const DH *dh = keydata; dh_validate() local 497 DH *dh = templ; dh_gen_set_template() local 691 DH *dh = NULL; dh_gen() local 804 DH *dh = NULL; dh_load() local [all...] |
/third_party/ffmpeg/libavformat/ |
H A D | rtmpdh.c | 223 static FFBigNum dh_generate_key(FF_DH *dh) in dh_generate_key() argument 227 num_bytes = bn_num_bytes(dh->p) - 1; in dh_generate_key() 231 bn_new(dh->priv_key); in dh_generate_key() 232 if (!dh->priv_key) in dh_generate_key() 234 bn_random(dh->priv_key, 8 * num_bytes); in dh_generate_key() 236 bn_new(dh->pub_key); in dh_generate_key() 237 if (!dh->pub_key) { in dh_generate_key() 238 bn_free(dh->priv_key); in dh_generate_key() 242 if (bn_modexp(dh->pub_key, dh in dh_generate_key() 248 dh_compute_key(FF_DH *dh, FFBigNum pub_key_bn, uint32_t secret_key_len, uint8_t *secret_key) dh_compute_key() argument 269 ff_dh_free(FF_DH *dh) ff_dh_free() argument 323 FF_DH *dh; ff_dh_init() local 348 ff_dh_generate_public_key(FF_DH *dh) ff_dh_generate_public_key() argument 374 ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len) ff_dh_write_public_key() argument 390 ff_dh_compute_shared_secret_key(FF_DH *dh, const uint8_t *pub_key, int pub_key_len, uint8_t *secret_key, int secret_key_len) ff_dh_compute_shared_secret_key() argument [all...] |
/third_party/node/deps/openssl/openssl/include/openssl/ |
H A D | dh.h | 200 OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth); 204 OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh); 205 OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh); 206 OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh); 207 OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh); 208 OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh); 216 OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len, 220 OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh); 221 OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh); 222 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, cons [all...] |
/third_party/openssl/include/openssl/ |
H A D | dh.h | 200 OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth); 204 OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh); 205 OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh); 206 OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh); 207 OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh); 208 OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh); 216 OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len, 220 OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh); 221 OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh); 222 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, cons [all...] |
/third_party/openssl/ohos_lite/include/openssl/ |
H A D | dh.h | 121 int DH_set_method(DH *dh, const DH_METHOD *meth); 125 void DH_free(DH *dh); 126 int DH_up_ref(DH *dh); 127 int DH_bits(const DH *dh); 128 int DH_size(const DH *dh); 129 int DH_security_bits(const DH *dh); 142 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, 145 int DH_check_params_ex(const DH *dh); 146 int DH_check_ex(const DH *dh); 147 int DH_check_pub_key_ex(const DH *dh, cons [all...] |