/third_party/rust/crates/rust-openssl/openssl/src/ |
D | dsa.rs | 103 pub fn pub_key(&self) -> &BigNumRef { in pub_key() function 105 let mut pub_key = ptr::null(); in pub_key() localVariable 106 DSA_get0_key(self.as_ptr(), &mut pub_key, ptr::null_mut()); in pub_key() 107 BigNumRef::from_const_ptr(pub_key) in pub_key() 224 pub_key: BigNum, in from_private_components() 231 cvt(DSA_set0_key(dsa.0, pub_key.as_ptr(), priv_key.as_ptr()))?; in from_private_components() 232 mem::forget((pub_key, priv_key)); in from_private_components() 265 pub_key: BigNum, in from_public_components() 272 cvt(DSA_set0_key(dsa.0, pub_key.as_ptr(), ptr::null_mut()))?; in from_public_components() 273 mem::forget(pub_key); in from_public_components() [all …]
|
D | dh.rs | 203 let mut pub_key = ptr::null(); in public_key() localVariable 205 DH_get0_key(self.as_ptr(), &mut pub_key, ptr::null_mut()); in public_key() 206 BigNumRef::from_ptr(pub_key as *mut _) in public_key() 279 pub_key: *mut ffi::BIGNUM, 282 (*dh).pub_key = pub_key; 290 pub_key: *mut *const ffi::BIGNUM, 293 if !pub_key.is_null() { 294 *pub_key = (*dh).pub_key;
|
/third_party/openssl/crypto/dsa/ |
D | dsa_check.c | 40 int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) in ossl_dsa_check_pub_key() argument 42 return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret); in ossl_dsa_check_pub_key() 50 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) in ossl_dsa_check_pub_key_partial() argument 52 return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret); in ossl_dsa_check_pub_key_partial() 71 BIGNUM *pub_key = NULL; in ossl_dsa_check_pairwise() local 76 || dsa->pub_key == NULL) in ossl_dsa_check_pairwise() 82 pub_key = BN_new(); in ossl_dsa_check_pairwise() 83 if (pub_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() 90 ret = BN_cmp(pub_key, dsa->pub_key) == 0; in ossl_dsa_check_pairwise() [all …]
|
D | dsa_key.c | 44 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dsa_generate_public_key() argument 54 if (!BN_mod_exp(pub_key, dsa->params.g, prk, dsa->params.p, ctx)) in ossl_dsa_generate_public_key() 66 BIGNUM *pub_key = NULL, *priv_key = NULL; in dsa_keygen() local 93 if (dsa->pub_key == NULL) { in dsa_keygen() 94 if ((pub_key = BN_new()) == NULL) in dsa_keygen() 97 pub_key = dsa->pub_key; in dsa_keygen() 100 if (!ossl_dsa_generate_public_key(ctx, dsa, priv_key, pub_key)) in dsa_keygen() 104 dsa->pub_key = pub_key; in dsa_keygen() 119 BN_free(dsa->pub_key); in dsa_keygen() 121 dsa->pub_key = NULL; in dsa_keygen() [all …]
|
D | dsa_lib.c | 49 BIGNUM *pub_key = NULL, *priv_key = NULL; in DSA_dup_DH() local 60 if (r->pub_key != NULL) { in DSA_dup_DH() 61 pub_key = BN_dup(r->pub_key); in DSA_dup_DH() 62 if (pub_key == NULL) in DSA_dup_DH() 69 if (!DH_set0_key(ret, pub_key, priv_key)) in DSA_dup_DH() 79 BN_free(pub_key); in DSA_dup_DH() 234 BN_clear_free(r->pub_key); in DSA_free() 295 return d->pub_key; in DSA_get0_pub_key() 304 const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument 306 if (pub_key != NULL) in DSA_get0_key() [all …]
|
D | dsa_backend.c | 34 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dsa_key_fromdata() local 50 if (param_pub_key != NULL && !OSSL_PARAM_get_BN(param_pub_key, &pub_key)) in ossl_dsa_key_fromdata() 55 if (!DSA_set0_key(dsa, pub_key, priv_key)) in ossl_dsa_key_fromdata() 62 BN_free(pub_key); in ossl_dsa_key_fromdata() 101 || !dsa_bn_dup_check(&dupkey->pub_key, dsa->pub_key))) in ossl_dsa_dup()
|
D | dsa_ameth.c | 70 if ((dsa->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dsa_pub_decode() 116 pubint = BN_to_ASN1_INTEGER(dsa->pub_key, NULL); in dsa_pub_encode() 264 return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0; in dsa_pub_cmp() 276 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local 288 pub_key = x->pub_key; in do_dsa_print() 290 pub_key = NULL; in do_dsa_print() 311 if (!ASN1_bn_print(bp, "pub: ", pub_key, NULL, off)) in do_dsa_print() 436 const BIGNUM *q = DSA_get0_q(dsa), *pub_key = DSA_get0_pub_key(dsa); in dsa_pkey_export_to() local 454 if (pub_key != NULL) { in dsa_pkey_export_to() 456 pub_key)) in dsa_pkey_export_to()
|
/third_party/openssl/crypto/ec/ |
D | ec_key.c | 98 EC_POINT_free(r->pub_key); in EC_KEY_free() 135 if (src->pub_key != NULL) { in EC_KEY_copy() 136 EC_POINT_free(dest->pub_key); in EC_KEY_copy() 137 dest->pub_key = EC_POINT_new(src->group); in EC_KEY_copy() 138 if (dest->pub_key == NULL) in EC_KEY_copy() 140 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy() 257 EC_POINT *pub_key = NULL; in ec_generate_key() local 307 if (eckey->pub_key == NULL) { in ec_generate_key() 308 pub_key = EC_POINT_new(group); in ec_generate_key() 309 if (pub_key == NULL) in ec_generate_key() [all …]
|
D | ecdh_ossl.c | 29 const EC_POINT *pub_key, const EC_KEY *ecdh) in ossl_ecdh_compute_key() argument 36 return ecdh->group->meth->ecdh_compute_key(psec, pseclen, pub_key, ecdh); in ossl_ecdh_compute_key() 50 const EC_POINT *pub_key, const EC_KEY *ecdh) in ossl_ecdh_simple_compute_key() argument 96 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) { in ossl_ecdh_simple_compute_key()
|
D | ec_kmeth.c | 154 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument 169 if (!eckey->meth->compute_key(&sec, &seclen, pub_key, eckey)) in ECDH_compute_key() 208 const EC_POINT *pub_key)) in EC_KEY_METHOD_set_init() argument 227 const EC_POINT *pub_key, in EC_KEY_METHOD_set_compute_key() argument 275 const EC_POINT *pub_key)) in EC_KEY_METHOD_get_init() argument 301 const EC_POINT *pub_key, in EC_KEY_METHOD_get_compute_key() argument
|
/third_party/openssl/crypto/dh/ |
D | dh_key.c | 40 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in ossl_dh_compute_key() argument 86 if (!dh->meth->bn_mod_exp(dh, z, pub_key, dh->priv_key, dh->params.p, ctx, in ossl_dh_compute_key() 114 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key() argument 121 ret = ossl_dh_compute_key(key, pub_key, dh); in DH_compute_key() 123 ret = dh->meth->compute_key(key, pub_key, dh); in DH_compute_key() 144 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) in DH_compute_key_padded() argument 150 rv = ossl_dh_compute_key(key, pub_key, dh); in DH_compute_key_padded() 152 rv = dh->meth->compute_key(key, pub_key, dh); in DH_compute_key_padded() 227 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dh_generate_public_key() argument 253 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p, in ossl_dh_generate_public_key() [all …]
|
D | dh_check.c | 229 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) in DH_check_pub_key_ex() argument 233 if (!DH_check_pub_key(dh, pub_key, &errflags)) in DH_check_pub_key_ex() 249 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument 263 return ossl_ffc_validate_public_key(&dh->params, pub_key, ret); in DH_check_pub_key() 271 int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) in ossl_dh_check_pub_key_partial() argument 273 return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret); in ossl_dh_check_pub_key_partial() 334 BIGNUM *pub_key = NULL; in ossl_dh_check_pairwise() local 339 || dh->pub_key == NULL) in ossl_dh_check_pairwise() 345 pub_key = BN_new(); in ossl_dh_check_pairwise() 346 if (pub_key == NULL) in ossl_dh_check_pairwise() [all …]
|
D | dh_ameth.c | 96 if ((dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL)) == NULL) { in dh_pub_decode() 118 ASN1_INTEGER *pub_key = NULL; in dh_pub_encode() local 134 pub_key = BN_to_ASN1_INTEGER(dh->pub_key, NULL); in dh_pub_encode() 135 if (pub_key == NULL) in dh_pub_encode() 138 penclen = i2d_ASN1_INTEGER(pub_key, &penc); in dh_pub_encode() 140 ASN1_INTEGER_free(pub_key); in dh_pub_encode() 248 BIGNUM *priv_key, *pub_key; in do_dh_print() local 256 pub_key = x->pub_key; in do_dh_print() 258 pub_key = NULL; in do_dh_print() 261 || (ptype > 0 && pub_key == NULL)) { in do_dh_print() [all …]
|
D | dh_lib.c | 156 BN_clear_free(r->pub_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 255 if (pub_key != NULL) in DH_get0_key() 256 *pub_key = dh->pub_key; in DH_get0_key() 261 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument 263 if (pub_key != NULL) { in DH_set0_key() 264 BN_clear_free(dh->pub_key); in DH_set0_key() 265 dh->pub_key = pub_key; in DH_set0_key() 298 return dh->pub_key; in DH_get0_pub_key()
|
D | dh_backend.c | 69 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dh_key_fromdata() local 83 && !OSSL_PARAM_get_BN(param_pub_key, &pub_key)) in ossl_dh_key_fromdata() 86 if (!DH_set0_key(dh, pub_key, priv_key)) in ossl_dh_key_fromdata() 93 BN_free(pub_key); in ossl_dh_key_fromdata() 165 || !dh_bn_dup_check(&dupkey->pub_key, dh->pub_key))) in ossl_dh_dup()
|
/third_party/openssl/util/perl/TLSProxy/ |
D | ServerKeyExchange.pm | 35 $self->{pub_key} = ""; 65 my $pub_key = substr($self->data, $ptr, $pub_key_len); 88 $self->pub_key($pub_key); 104 $data .= pack('n', length($self->pub_key)); 105 $data .= $self->pub_key; 133 sub pub_key subroutine 137 $self->{pub_key} = shift; 139 return $self->{pub_key};
|
/third_party/openssl/crypto/ffc/ |
D | ffc_key_validate.c | 20 const BIGNUM *pub_key, int *ret) in ossl_ffc_validate_public_key_partial() argument 27 if (params == NULL || pub_key == NULL || params->p == NULL) { in ossl_ffc_validate_public_key_partial() 42 if (BN_cmp(pub_key, tmp) <= 0) { in ossl_ffc_validate_public_key_partial() 50 if (BN_cmp(pub_key, tmp) >= 0) { in ossl_ffc_validate_public_key_partial() 67 const BIGNUM *pub_key, int *ret) in ossl_ffc_validate_public_key() argument 73 if (!ossl_ffc_validate_public_key_partial(params, pub_key, ret)) in ossl_ffc_validate_public_key() 85 || !BN_mod_exp(tmp, pub_key, params->q, params->p, ctx)) in ossl_ffc_validate_public_key()
|
/third_party/ffmpeg/libavformat/ |
D | rtmpdh.c | 236 bn_new(dh->pub_key); in dh_generate_key() 237 if (!dh->pub_key) { in dh_generate_key() 242 if (bn_modexp(dh->pub_key, dh->g, dh->priv_key, dh->p) < 0) in dh_generate_key() 245 return dh->pub_key; in dh_generate_key() 275 bn_free(dh->pub_key); in ff_dh_free() 362 ret = dh_is_valid_public_key(dh->pub_key, dh->p, q1); in ff_dh_generate_public_key() 374 int ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len) in ff_dh_write_public_key() argument 379 len = bn_num_bytes(dh->pub_key); in ff_dh_write_public_key() 384 memset(pub_key, 0, pub_key_len); in ff_dh_write_public_key() 385 bn_bn2bin(dh->pub_key, pub_key + pub_key_len - len, len); in ff_dh_write_public_key() [all …]
|
D | rtmpdh.h | 53 FFBigNum pub_key; member 90 int ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len); 103 int ff_dh_compute_shared_secret_key(FF_DH *dh, const uint8_t *pub_key,
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant_lib/ |
D | wpa_evp_key.c | 143 EVP_PKEY *pub_key = NULL; in GET_EVP_PKEY() local 149 pub_key = get_pubkey(key_id); in GET_EVP_PKEY() 150 if (pub_key == NULL) { in GET_EVP_PKEY() 155 key_type = EVP_PKEY_type(pub_key->type); in GET_EVP_PKEY() 158 EVP_PKEY_free(pub_key); in GET_EVP_PKEY() 162 const RSA *public_rsa = EVP_PKEY_get0_RSA(pub_key); in GET_EVP_PKEY() 165 EVP_PKEY_free(pub_key); in GET_EVP_PKEY() 170 EVP_PKEY_free(pub_key); in GET_EVP_PKEY()
|
/third_party/openssl/apps/ |
D | testdsa.h | 219 BIGNUM *priv_key, *pub_key, *p, *q, *g; in get_dsa() local 243 pub_key = BN_bin2bn(dsa_t.pub, dsa_t.pub_l, NULL); in get_dsa() 247 if (priv_key == NULL || pub_key == NULL || p == NULL || q == NULL in get_dsa() 261 pub_key) in get_dsa() 273 BN_free(pub_key); in get_dsa()
|
/third_party/openssl/ohos_lite/include/openssl/ |
D | dh.h | 147 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); 150 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); 152 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 153 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); 184 const BIGNUM **pub_key, const BIGNUM **priv_key); 185 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 210 (unsigned char *key, const BIGNUM *pub_key, DH *dh); 212 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh));
|
/third_party/openssl/include/openssl/ |
D | dh.h | 222 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); 225 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, 229 const BIGNUM *pub_key, DH *dh); 231 const BIGNUM *pub_key, DH *dh); 260 OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, 262 OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 289 const BIGNUM *pub_key, 294 const BIGNUM *pub_key,
|
/third_party/openssl/demos/signature/ |
D | EVP_Signature_demo.c | 156 EVP_PKEY *pub_key = NULL; in demo_verify() local 168 pub_key = get_key(libctx, propq, public); in demo_verify() 169 if (pub_key == NULL) { in demo_verify() 175 libctx, NULL, pub_key, NULL)) { in demo_verify() 200 EVP_PKEY_free(pub_key); in demo_verify()
|
/third_party/openssl/include/crypto/ |
D | dsa.h | 39 const BIGNUM *priv_key, BIGNUM *pub_key); 41 int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret); 42 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key,
|