/third_party/node/deps/openssl/openssl/crypto/dsa/ |
D | dsa_key.c | 44 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dsa_generate_public_key() argument 51 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in ossl_dsa_generate_public_key() 66 BIGNUM *pub_key = NULL, *priv_key = NULL; in dsa_keygen() local 71 if (dsa->priv_key == NULL) { in dsa_keygen() 72 if ((priv_key = BN_secure_new()) == NULL) in dsa_keygen() 75 priv_key = dsa->priv_key; in dsa_keygen() 90 MIN_STRENGTH, priv_key)) in dsa_keygen() 100 if (!ossl_dsa_generate_public_key(ctx, dsa, priv_key, pub_key)) in dsa_keygen() 103 dsa->priv_key = priv_key; in dsa_keygen() 120 BN_clear_free(dsa->priv_key); in dsa_keygen() [all …]
|
D | dsa_lib.c | 49 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_dup_DH() local 64 if (r->priv_key != NULL) { in DSA_dup_DH() 65 priv_key = BN_dup(r->priv_key); in DSA_dup_DH() 66 if (priv_key == NULL) in DSA_dup_DH() 69 if (!DH_set0_key(ret, pub_key, priv_key)) in DSA_dup_DH() 71 } else if (r->priv_key != NULL) { in DSA_dup_DH() 80 BN_free(priv_key); in DSA_dup_DH() 235 BN_clear_free(r->priv_key); in DSA_free() 300 return d->priv_key; in DSA_get0_priv_key() 304 const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument [all …]
|
D | dsa_backend.c | 34 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dsa_key_fromdata() local 52 if (param_priv_key != NULL && !OSSL_PARAM_get_BN(param_priv_key, &priv_key)) in ossl_dsa_key_fromdata() 55 if (!DSA_set0_key(dsa, pub_key, priv_key)) in ossl_dsa_key_fromdata() 61 BN_clear_free(priv_key); in ossl_dsa_key_fromdata() 106 || !dsa_bn_dup_check(&dupkey->priv_key, dsa->priv_key))) in ossl_dsa_dup()
|
D | dsa_check.c | 55 int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) in ossl_dsa_check_priv_key() argument 60 && ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret)); in ossl_dsa_check_priv_key() 75 || dsa->priv_key == NULL in ossl_dsa_check_pairwise() 87 if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key)) in ossl_dsa_check_pairwise()
|
/third_party/openssl/crypto/dsa/ |
D | dsa_key.c | 44 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dsa_generate_public_key() argument 51 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in ossl_dsa_generate_public_key() 66 BIGNUM *pub_key = NULL, *priv_key = NULL; in dsa_keygen() local 71 if (dsa->priv_key == NULL) { in dsa_keygen() 72 if ((priv_key = BN_secure_new()) == NULL) in dsa_keygen() 75 priv_key = dsa->priv_key; in dsa_keygen() 90 MIN_STRENGTH, priv_key)) in dsa_keygen() 100 if (!ossl_dsa_generate_public_key(ctx, dsa, priv_key, pub_key)) in dsa_keygen() 103 dsa->priv_key = priv_key; in dsa_keygen() 120 BN_clear_free(dsa->priv_key); in dsa_keygen() [all …]
|
D | dsa_lib.c | 49 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_dup_DH() local 64 if (r->priv_key != NULL) { in DSA_dup_DH() 65 priv_key = BN_dup(r->priv_key); in DSA_dup_DH() 66 if (priv_key == NULL) in DSA_dup_DH() 69 if (!DH_set0_key(ret, pub_key, priv_key)) in DSA_dup_DH() 71 } else if (r->priv_key != NULL) { in DSA_dup_DH() 80 BN_free(priv_key); in DSA_dup_DH() 235 BN_clear_free(r->priv_key); in DSA_free() 300 return d->priv_key; in DSA_get0_priv_key() 304 const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument [all …]
|
D | dsa_backend.c | 34 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dsa_key_fromdata() local 52 if (param_priv_key != NULL && !OSSL_PARAM_get_BN(param_priv_key, &priv_key)) in ossl_dsa_key_fromdata() 55 if (!DSA_set0_key(dsa, pub_key, priv_key)) in ossl_dsa_key_fromdata() 61 BN_clear_free(priv_key); in ossl_dsa_key_fromdata() 106 || !dsa_bn_dup_check(&dupkey->priv_key, dsa->priv_key))) in ossl_dsa_dup()
|
D | dsa_check.c | 55 int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) in ossl_dsa_check_priv_key() argument 60 && ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret)); in ossl_dsa_check_priv_key() 75 || dsa->priv_key == NULL in ossl_dsa_check_pairwise() 87 if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key)) in ossl_dsa_check_pairwise()
|
/third_party/node/deps/openssl/openssl/crypto/ec/ |
D | ec_key.c | 99 BN_clear_free(r->priv_key); in EC_KEY_free() 144 if (src->priv_key != NULL) { in EC_KEY_copy() 145 if (dest->priv_key == NULL) { in EC_KEY_copy() 146 dest->priv_key = BN_new(); in EC_KEY_copy() 147 if (dest->priv_key == NULL) in EC_KEY_copy() 150 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy() 254 BIGNUM *priv_key = NULL; in ec_generate_key() local 265 if (eckey->priv_key == NULL) { in ec_generate_key() 266 priv_key = BN_secure_new(); in ec_generate_key() 267 if (priv_key == NULL) in ec_generate_key() [all …]
|
D | ecdh_ossl.c | 55 const BIGNUM *priv_key; in ossl_ecdh_simple_compute_key() local 70 priv_key = EC_KEY_get0_private_key(ecdh); in ossl_ecdh_simple_compute_key() 71 if (priv_key == NULL) { in ossl_ecdh_simple_compute_key() 84 !BN_mul(x, x, priv_key, ctx)) { in ossl_ecdh_simple_compute_key() 88 priv_key = x; in ossl_ecdh_simple_compute_key() 96 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) { in ossl_ecdh_simple_compute_key()
|
D | ec_asn1.c | 940 EC_PRIVATEKEY *priv_key = NULL; in d2i_ECPrivateKey() local 943 if ((priv_key = d2i_EC_PRIVATEKEY(NULL, &p, len)) == NULL) in d2i_ECPrivateKey() 954 if (priv_key->parameters) { in d2i_ECPrivateKey() 956 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters); in d2i_ECPrivateKey() 958 && priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT) in d2i_ECPrivateKey() 967 ret->version = priv_key->version; in d2i_ECPrivateKey() 969 if (priv_key->privateKey) { in d2i_ECPrivateKey() 970 ASN1_OCTET_STRING *pkey = priv_key->privateKey; in d2i_ECPrivateKey() 989 if (priv_key->publicKey) { in d2i_ECPrivateKey() 993 pub_oct = ASN1_STRING_get0_data(priv_key->publicKey); in d2i_ECPrivateKey() [all …]
|
/third_party/openssl/crypto/ec/ |
D | ec_key.c | 99 BN_clear_free(r->priv_key); in EC_KEY_free() 144 if (src->priv_key != NULL) { in EC_KEY_copy() 145 if (dest->priv_key == NULL) { in EC_KEY_copy() 146 dest->priv_key = BN_new(); in EC_KEY_copy() 147 if (dest->priv_key == NULL) in EC_KEY_copy() 150 if (!BN_copy(dest->priv_key, src->priv_key)) in EC_KEY_copy() 254 BIGNUM *priv_key = NULL; in ec_generate_key() local 265 if (eckey->priv_key == NULL) { in ec_generate_key() 266 priv_key = BN_secure_new(); in ec_generate_key() 267 if (priv_key == NULL) in ec_generate_key() [all …]
|
D | ecdh_ossl.c | 55 const BIGNUM *priv_key; in ossl_ecdh_simple_compute_key() local 70 priv_key = EC_KEY_get0_private_key(ecdh); in ossl_ecdh_simple_compute_key() 71 if (priv_key == NULL) { in ossl_ecdh_simple_compute_key() 84 !BN_mul(x, x, priv_key, ctx)) { in ossl_ecdh_simple_compute_key() 88 priv_key = x; in ossl_ecdh_simple_compute_key() 96 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) { in ossl_ecdh_simple_compute_key()
|
D | ec_asn1.c | 940 EC_PRIVATEKEY *priv_key = NULL; in d2i_ECPrivateKey() local 943 if ((priv_key = d2i_EC_PRIVATEKEY(NULL, &p, len)) == NULL) in d2i_ECPrivateKey() 954 if (priv_key->parameters) { in d2i_ECPrivateKey() 956 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters); in d2i_ECPrivateKey() 958 && priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT) in d2i_ECPrivateKey() 967 ret->version = priv_key->version; in d2i_ECPrivateKey() 969 if (priv_key->privateKey) { in d2i_ECPrivateKey() 970 ASN1_OCTET_STRING *pkey = priv_key->privateKey; in d2i_ECPrivateKey() 989 if (priv_key->publicKey) { in d2i_ECPrivateKey() 993 pub_oct = ASN1_STRING_get0_data(priv_key->publicKey); in d2i_ECPrivateKey() [all …]
|
/third_party/node/deps/openssl/openssl/providers/implementations/keymgmt/ |
D | mac_legacy_kmgmt.c | 59 unsigned char *priv_key; member 98 OPENSSL_secure_clear_free(mackey->priv_key, mackey->priv_key_len); in ossl_mac_key_free() 152 ok = key->priv_key != NULL; in mac_has() 167 if ((key1->priv_key == NULL && key2->priv_key != NULL) in mac_match() 168 || (key1->priv_key != NULL && key2->priv_key == NULL) in mac_match() 174 ok = ok && (key1->priv_key == NULL /* implies key2->privkey == NULL */ in mac_match() 175 || CRYPTO_memcmp(key1->priv_key, key2->priv_key, in mac_match() 194 OPENSSL_secure_clear_free(key->priv_key, key->priv_key_len); in mac_key_fromdata() 196 key->priv_key = OPENSSL_secure_malloc(p->data_size > 0 ? p->data_size : 1); in mac_key_fromdata() 197 if (key->priv_key == NULL) { in mac_key_fromdata() [all …]
|
/third_party/openssl/providers/implementations/keymgmt/ |
D | mac_legacy_kmgmt.c | 59 unsigned char *priv_key; member 98 OPENSSL_secure_clear_free(mackey->priv_key, mackey->priv_key_len); in ossl_mac_key_free() 152 ok = key->priv_key != NULL; in mac_has() 167 if ((key1->priv_key == NULL && key2->priv_key != NULL) in mac_match() 168 || (key1->priv_key != NULL && key2->priv_key == NULL) in mac_match() 174 ok = ok && (key1->priv_key == NULL /* implies key2->privkey == NULL */ in mac_match() 175 || CRYPTO_memcmp(key1->priv_key, key2->priv_key, in mac_match() 194 OPENSSL_secure_clear_free(key->priv_key, key->priv_key_len); in mac_key_fromdata() 196 key->priv_key = OPENSSL_secure_malloc(p->data_size > 0 ? p->data_size : 1); in mac_key_fromdata() 197 if (key->priv_key == NULL) { in mac_key_fromdata() [all …]
|
/third_party/openssl/crypto/dh/ |
D | dh_key.c | 72 if (dh->priv_key == NULL) { in ossl_dh_compute_key() 80 BN_set_flags(dh->priv_key, BN_FLG_CONSTTIME); in ossl_dh_compute_key() 86 if (!dh->meth->bn_mod_exp(dh, z, pub_key, dh->priv_key, dh->params.p, ctx, in ossl_dh_compute_key() 227 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dh_generate_public_key() argument 250 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in ossl_dh_generate_public_key() 270 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local 292 if (dh->priv_key == NULL) { in generate_key() 293 priv_key = BN_secure_new(); in generate_key() 294 if (priv_key == NULL) in generate_key() 298 priv_key = dh->priv_key; in generate_key() [all …]
|
D | dh_lib.c | 157 BN_clear_free(r->priv_key); in DH_free() 253 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument 257 if (priv_key != NULL) in DH_get0_key() 258 *priv_key = dh->priv_key; in DH_get0_key() 261 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument 267 if (priv_key != NULL) { in DH_set0_key() 268 BN_clear_free(dh->priv_key); in DH_set0_key() 269 dh->priv_key = priv_key; in DH_set0_key() 293 return dh->priv_key; in DH_get0_priv_key()
|
/third_party/node/deps/openssl/openssl/crypto/dh/ |
D | dh_key.c | 66 if (dh->priv_key == NULL) { in ossl_dh_compute_key() 74 BN_set_flags(dh->priv_key, BN_FLG_CONSTTIME); in ossl_dh_compute_key() 80 if (!dh->meth->bn_mod_exp(dh, z, pub_key, dh->priv_key, dh->params.p, ctx, in ossl_dh_compute_key() 221 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dh_generate_public_key() argument 244 BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME); in ossl_dh_generate_public_key() 264 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local 280 if (dh->priv_key == NULL) { in generate_key() 281 priv_key = BN_secure_new(); in generate_key() 282 if (priv_key == NULL) in generate_key() 286 priv_key = dh->priv_key; in generate_key() [all …]
|
D | dh_lib.c | 157 BN_clear_free(r->priv_key); in DH_free() 253 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument 257 if (priv_key != NULL) in DH_get0_key() 258 *priv_key = dh->priv_key; in DH_get0_key() 261 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument 267 if (priv_key != NULL) { in DH_set0_key() 268 BN_clear_free(dh->priv_key); in DH_set0_key() 269 dh->priv_key = priv_key; in DH_set0_key() 293 return dh->priv_key; in DH_get0_priv_key()
|
/third_party/rust/crates/rust-openssl/openssl/src/ |
D | dsa.rs | 140 pub fn priv_key(&self) -> &BigNumRef { in priv_key() function 142 let mut priv_key = ptr::null(); in priv_key() localVariable 143 DSA_get0_key(self.as_ptr(), ptr::null_mut(), &mut priv_key); in priv_key() 144 BigNumRef::from_const_ptr(priv_key) in priv_key() 255 priv_key: BigNum, in from_private_components() 263 cvt(DSA_set0_key(dsa.0, pub_key.as_ptr(), priv_key.as_ptr()))?; in from_private_components() 264 mem::forget((pub_key, priv_key)); in from_private_components() 343 priv_key: *mut *const ffi::BIGNUM) 348 if !priv_key.is_null() { 349 *priv_key = (*d).priv_key; [all …]
|
D | dh.rs | 90 pub fn set_private_key(self, priv_key: BigNum) -> Result<Dh<Private>, ErrorStack> { in set_private_key() 93 cvt(DH_set0_key(dh_ptr, ptr::null_mut(), priv_key.as_ptr()))?; in set_private_key() 94 mem::forget(priv_key); in set_private_key() 103 pub fn set_key(self, pub_key: BigNum, priv_key: BigNum) -> Result<Dh<Private>, ErrorStack> { in set_key() 106 cvt(DH_set0_key(dh_ptr, pub_key.as_ptr(), priv_key.as_ptr()))?; in set_key() 107 mem::forget((self, pub_key, priv_key)); in set_key() 263 let mut priv_key = ptr::null(); in private_key() localVariable 265 DH_get0_key(self.as_ptr(), ptr::null_mut(), &mut priv_key); in private_key() 266 BigNumRef::from_ptr(priv_key as *mut _) in private_key() 310 priv_key: *mut ffi::BIGNUM, [all …]
|
/third_party/openssl/crypto/sm2/ |
D | sm2_key.c | 27 const BIGNUM *priv_key = NULL, *order = NULL; in ossl_sm2_key_private_check() local 31 || (priv_key = EC_KEY_get0_private_key(eckey)) == NULL in ossl_sm2_key_private_check() 41 if (BN_cmp(priv_key, BN_value_one()) < 0 in ossl_sm2_key_private_check() 42 || BN_cmp(priv_key, max) >= 0) { in ossl_sm2_key_private_check()
|
/third_party/node/deps/openssl/openssl/crypto/sm2/ |
D | sm2_key.c | 27 const BIGNUM *priv_key = NULL, *order = NULL; in ossl_sm2_key_private_check() local 31 || (priv_key = EC_KEY_get0_private_key(eckey)) == NULL in ossl_sm2_key_private_check() 41 if (BN_cmp(priv_key, BN_value_one()) < 0 in ossl_sm2_key_private_check() 42 || BN_cmp(priv_key, max) >= 0) { in ossl_sm2_key_private_check()
|
/third_party/node/deps/openssl/openssl/apps/ |
D | testdsa.h | 219 BIGNUM *priv_key, *pub_key, *p, *q, *g; in get_dsa() local 242 priv_key = BN_bin2bn(dsa_t.priv, dsa_t.priv_l, NULL); in get_dsa() 247 if (priv_key == NULL || pub_key == NULL || p == NULL || q == NULL in get_dsa() 259 priv_key) in get_dsa() 272 BN_free(priv_key); in get_dsa()
|