Home
last modified time | relevance | path

Searched refs:pub_key (Results 1 – 25 of 131) sorted by relevance

123456

/third_party/node/deps/openssl/openssl/crypto/dsa/
Ddsa_check.c40 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()
51 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) in ossl_dsa_check_pub_key_partial() argument
53 return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) in ossl_dsa_check_pub_key_partial()
73 BIGNUM *pub_key = NULL; in ossl_dsa_check_pairwise() local
78 || dsa->pub_key == NULL) in ossl_dsa_check_pairwise()
84 pub_key = BN_new(); in ossl_dsa_check_pairwise()
85 if (pub_key == NULL) in ossl_dsa_check_pairwise()
89 if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key)) in ossl_dsa_check_pairwise()
92 ret = BN_cmp(pub_key, dsa->pub_key) == 0; in ossl_dsa_check_pairwise()
[all …]
Ddsa_key.c44 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 …]
Ddsa_lib.c49 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()
236 BN_clear_free(r->pub_key); in DSA_free()
297 return d->pub_key; in DSA_get0_pub_key()
306 const BIGNUM **pub_key, const BIGNUM **priv_key) in DSA_get0_key() argument
308 if (pub_key != NULL) in DSA_get0_key()
[all …]
/third_party/openssl/crypto/dsa/
Ddsa_check.c40 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 …]
Ddsa_key.c44 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 …]
Ddsa_lib.c49 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 …]
/third_party/rust/crates/rust-openssl/openssl/src/
Ddsa.rs104 pub fn pub_key(&self) -> &BigNumRef { in pub_key() function
106 let mut pub_key = ptr::null(); in pub_key() localVariable
107 DSA_get0_key(self.as_ptr(), &mut pub_key, ptr::null_mut()); in pub_key()
108 BigNumRef::from_const_ptr(pub_key) in pub_key()
256 pub_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()
297 pub_key: BigNum, in from_public_components()
304 cvt(DSA_set0_key(dsa.0, pub_key.as_ptr(), ptr::null_mut()))?; in from_public_components()
305 mem::forget(pub_key); in from_public_components()
[all …]
Ddh.rs80 pub fn set_public_key(self, pub_key: BigNum) -> Result<Dh<Public>, ErrorStack> { in set_public_key()
83 cvt(DH_set0_key(dh_ptr, pub_key.as_ptr(), ptr::null_mut()))?; in set_public_key()
84 mem::forget((self, pub_key)); in set_public_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()
233 let mut pub_key = ptr::null(); in public_key() localVariable
235 DH_get0_key(self.as_ptr(), &mut pub_key, ptr::null_mut()); in public_key()
236 BigNumRef::from_ptr(pub_key as *mut _) in public_key()
309 pub_key: *mut ffi::BIGNUM,
[all …]
/third_party/openssl/crypto/ec/
Dec_key.c98 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 …]
/third_party/node/deps/openssl/openssl/crypto/ec/
Dec_key.c98 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 …]
/third_party/openssl/crypto/dh/
Ddh_key.c40 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 …]
Ddh_check.c229 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 …]
Ddh_ameth.c96 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 …]
Ddh_lib.c156 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()
/third_party/node/deps/openssl/openssl/crypto/dh/
Ddh_key.c40 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()
226 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dh_generate_public_key() argument
252 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p, in ossl_dh_generate_public_key()
[all …]
Ddh_check.c230 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) in DH_check_pub_key_ex() argument
234 if (!DH_check_pub_key(dh, pub_key, &errflags)) in DH_check_pub_key_ex()
250 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument
264 return ossl_ffc_validate_public_key(&dh->params, pub_key, ret); in DH_check_pub_key()
272 int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) in ossl_dh_check_pub_key_partial() argument
274 return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret) in ossl_dh_check_pub_key_partial()
336 BIGNUM *pub_key = NULL; in ossl_dh_check_pairwise() local
341 || dh->pub_key == NULL) in ossl_dh_check_pairwise()
347 pub_key = BN_new(); in ossl_dh_check_pairwise()
348 if (pub_key == NULL) in ossl_dh_check_pairwise()
[all …]
Ddh_ameth.c96 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 …]
Ddh_lib.c158 BN_clear_free(r->pub_key); in DH_free()
255 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
257 if (pub_key != NULL) in DH_get0_key()
258 *pub_key = dh->pub_key; in DH_get0_key()
263 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
265 if (pub_key != NULL) { in DH_set0_key()
266 BN_clear_free(dh->pub_key); in DH_set0_key()
267 dh->pub_key = pub_key; in DH_set0_key()
300 return dh->pub_key; in DH_get0_pub_key()
/third_party/openssl/util/perl/TLSProxy/
DServerKeyExchange.pm35 $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/node/deps/openssl/openssl/util/perl/TLSProxy/
DServerKeyExchange.pm35 $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/
Dffc_key_validate.c20 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/node/deps/openssl/openssl/crypto/ffc/
Dffc_key_validate.c20 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()
48 if (BN_cmp(pub_key, tmp) >= 0) in ossl_ffc_validate_public_key_partial()
63 const BIGNUM *pub_key, int *ret) in ossl_ffc_validate_public_key() argument
69 if (!ossl_ffc_validate_public_key_partial(params, pub_key, ret)) in ossl_ffc_validate_public_key()
81 || !BN_mod_exp(tmp, pub_key, params->q, params->p, ctx)) in ossl_ffc_validate_public_key()
/third_party/ffmpeg/libavformat/
Drtmpdh.c236 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 …]
/third_party/mbedtls/tests/suites/
Dtest_suite_lms.function78 void lms_verify_test(data_t *msg, data_t *sig, data_t *pub_key,
87 TEST_EQUAL(mbedtls_lms_import_public_key(&ctx, pub_key->x, pub_key->len), 0);
146 void lms_import_export_test(data_t *pub_key, int expected_import_rc)
154 TEST_EQUAL(mbedtls_lms_import_public_key(&ctx, pub_key->x, pub_key->len),
167 ASSERT_COMPARE(pub_key->x, pub_key->len,
188 ASSERT_COMPARE(pub_key->x, pub_key->len,
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant_lib/
Dwpa_evp_key.c143 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()

123456