Home
last modified time | relevance | path

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

123

/openssl/crypto/dsa/
H A Ddsa_check.c66 int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) in ossl_dsa_check_pub_key() argument
71 return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret) in ossl_dsa_check_pub_key()
80 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) in ossl_dsa_check_pub_key_partial() argument
85 return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) in ossl_dsa_check_pub_key_partial()
107 BIGNUM *pub_key = NULL; in ossl_dsa_check_pairwise() local
114 || dsa->pub_key == NULL) in ossl_dsa_check_pairwise()
120 pub_key = BN_new(); in ossl_dsa_check_pairwise()
121 if (pub_key == NULL) in ossl_dsa_check_pairwise()
125 if (!ossl_dsa_generate_public_key(ctx, dsa, dsa->priv_key, pub_key)) in ossl_dsa_check_pairwise()
128 ret = BN_cmp(pub_key, dsa->pub_key) == 0; in ossl_dsa_check_pairwise()
[all …]
H A Ddsa_key.c53 if (!BN_mod_exp(pub_key, dsa->params.g, prk, dsa->params.p, ctx)) in ossl_dsa_generate_public_key()
101 ret = !BN_cmp(dsa->pub_key, pub_key2); in dsa_keygen_knownanswer_test()
151 BIGNUM *pub_key = NULL, *priv_key = NULL; in dsa_keygen() local
178 if (dsa->pub_key == NULL) { in dsa_keygen()
179 if ((pub_key = BN_new()) == NULL) in dsa_keygen()
182 pub_key = dsa->pub_key; in dsa_keygen()
189 dsa->pub_key = pub_key; in dsa_keygen()
202 BN_free(dsa->pub_key); in dsa_keygen()
204 dsa->pub_key = NULL; in dsa_keygen()
214 if (pub_key != dsa->pub_key) in dsa_keygen()
[all …]
H A Ddsa_lib.c60 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()
79 BN_free(pub_key); in DSA_dup_DH()
240 BN_clear_free(r->pub_key); in DSA_free()
301 return d->pub_key; in DSA_get0_pub_key()
312 if (pub_key != NULL) in DSA_get0_key()
313 *pub_key = d->pub_key; in DSA_get0_key()
320 if (pub_key != NULL) { in DSA_set0_key()
321 BN_free(d->pub_key); in DSA_set0_key()
[all …]
H A Ddsa_backend.c34 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()
H A Ddsa_ameth.c70 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()
/openssl/crypto/ec/
H A Dec_key.c99 EC_POINT_free(r->pub_key); in EC_KEY_free()
141 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) in EC_KEY_copy()
308 EC_POINT *pub_key = NULL; in ec_generate_key() local
360 if (pub_key == NULL) in ec_generate_key()
363 pub_key = eckey->pub_key; in ec_generate_key()
370 eckey->pub_key = pub_key; in ec_generate_key()
372 pub_key = NULL; in ec_generate_key()
398 EC_POINT_free(pub_key); in ec_generate_key()
887 return key->pub_key; in EC_KEY_get0_public_key()
896 key->pub_key = EC_POINT_dup(pub_key, key->group); in EC_KEY_set_public_key()
[all …]
H A Decdh_ossl.c29 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
99 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) { in ossl_ecdh_simple_compute_key()
H A Dec_kmeth.c149 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument
164 if (!eckey->meth->compute_key(&sec, &seclen, pub_key, eckey)) in ECDH_compute_key()
203 const EC_POINT *pub_key)) in EC_KEY_METHOD_set_init() argument
222 const EC_POINT *pub_key, in EC_KEY_METHOD_set_compute_key() argument
270 const EC_POINT *pub_key)) in EC_KEY_METHOD_get_init() argument
296 const EC_POINT *pub_key, in EC_KEY_METHOD_get_compute_key() argument
/openssl/crypto/dh/
H A Ddh_key.c121 ret = ossl_dh_compute_key(key, pub_key, dh); in DH_compute_key()
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()
273 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local
304 if (dh->pub_key == NULL) { in generate_key()
305 pub_key = BN_new(); in generate_key()
306 if (pub_key == NULL) in generate_key()
309 pub_key = dh->pub_key; in generate_key()
372 dh->pub_key = pub_key; in generate_key()
380 if (pub_key != dh->pub_key) in generate_key()
[all …]
H A 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()
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()
352 if (!ossl_dh_generate_public_key(ctx, dh, dh->priv_key, pub_key)) in ossl_dh_check_pairwise()
355 ret = BN_cmp(pub_key, dh->pub_key) == 0; in ossl_dh_check_pairwise()
[all …]
H A Ddh_ameth.c118 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()
368 if (BN_cmp(b->pkey.dh->pub_key, a->pkey.dh->pub_key) != 0) in dh_pub_cmp()
432 if (dh->pub_key == NULL) { in dh_pkey_public_check()
[all …]
H A Ddh_lib.c162 BN_clear_free(r->pub_key); in DH_free()
259 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) in DH_get0_key() argument
261 if (pub_key != NULL) in DH_get0_key()
262 *pub_key = dh->pub_key; in DH_get0_key()
267 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) in DH_set0_key() argument
269 if (pub_key != NULL) { in DH_set0_key()
270 BN_clear_free(dh->pub_key); in DH_set0_key()
271 dh->pub_key = pub_key; in DH_set0_key()
304 return dh->pub_key; in DH_get0_pub_key()
H A Ddh_backend.c63 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dh_key_fromdata() local
77 && !OSSL_PARAM_get_BN(param_pub_key, &pub_key)) in ossl_dh_key_fromdata()
80 if (!DH_set0_key(dh, pub_key, priv_key)) in ossl_dh_key_fromdata()
87 BN_free(pub_key); in ossl_dh_key_fromdata()
159 || !dh_bn_dup_check(&dupkey->pub_key, dh->pub_key))) in ossl_dh_dup()
H A Ddh_local.h26 BIGNUM *pub_key; /* g^x % p */ member
47 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
/openssl/util/perl/TLSProxy/
H A DServerKeyExchange.pm43 $self->{pub_key} = "";
73 my $pub_key = substr($self->data, $ptr, $pub_key_len);
96 $self->pub_key($pub_key);
112 $data .= pack('n', length($self->pub_key));
113 $data .= $self->pub_key;
141 sub pub_key subroutine
145 $self->{pub_key} = shift;
147 return $self->{pub_key};
/openssl/crypto/ffc/
H A 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()
/openssl/apps/
H A Dtestdsa.h219 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()
H A Ddsa.c208 BIGNUM *pub_key = NULL; in dsa_main() local
210 if (!EVP_PKEY_get_bn_param(pkey, "pub", &pub_key)) { in dsa_main()
215 BN_print(out, pub_key); in dsa_main()
217 BN_free(pub_key); in dsa_main()
/openssl/demos/signature/
H A DEVP_EC_Signature_demo.c156 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()
/openssl/include/openssl/
H A Ddh.h229 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
232 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
236 const BIGNUM *pub_key, DH *dh);
238 const BIGNUM *pub_key, DH *dh);
267 OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
269 OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
296 const BIGNUM *pub_key,
301 const BIGNUM *pub_key,
/openssl/include/crypto/
H A Ddsa.h46 const BIGNUM *priv_key, BIGNUM *pub_key);
48 int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret);
49 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key,
H A Ddh.h25 const BIGNUM *priv_key, BIGNUM *pub_key);
41 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
43 int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret);
/openssl/demos/encrypt/
H A Drsa_encrypt.c105 EVP_PKEY *pub_key = NULL; in do_encrypt() local
109 pub_key = get_key(libctx, propq, public); in do_encrypt()
110 if (pub_key == NULL) { in do_encrypt()
114 ctx = EVP_PKEY_CTX_new_from_pkey(libctx, pub_key, propq); in do_encrypt()
149 EVP_PKEY_free(pub_key); in do_encrypt()
/openssl/crypto/pem/
H A Dpvkfmt.c382 BIGNUM *pub_key = NULL; in ossl_b2i_DSA_after_header() local
398 if (!read_lebn(&p, nbyte, &pub_key)) in ossl_b2i_DSA_after_header()
408 pub_key = BN_new(); in ossl_b2i_DSA_after_header()
409 if (pub_key == NULL) in ossl_b2i_DSA_after_header()
423 if (!DSA_set0_key(dsa, pub_key, priv_key)) in ossl_b2i_DSA_after_header()
425 pub_key = priv_key = NULL; in ossl_b2i_DSA_after_header()
441 BN_free(pub_key); in ossl_b2i_DSA_after_header()
706 DSA_get0_key(dsa, &pub_key, &priv_key); in check_bitlen_dsa()
712 if (BN_num_bits(pub_key) > bitlen) in check_bitlen_dsa()
734 DSA_get0_key(dsa, &pub_key, &priv_key); in write_dsa()
[all …]
/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c221 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dh_to_text() local
246 pub_key = DH_get0_pub_key(dh); in dh_to_text()
247 if (pub_key == NULL) { in dh_to_text()
271 if (pub_key != NULL in dh_to_text()
272 && !print_labeled_bignum(out, "public-key:", pub_key)) in dh_to_text()
297 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dsa_to_text() local
321 pub_key = DSA_get0_pub_key(dsa); in dsa_to_text()
322 if (pub_key == NULL) { in dsa_to_text()
346 if (pub_key != NULL in dsa_to_text()
347 && !print_labeled_bignum(out, "pub: ", pub_key)) in dsa_to_text()

Completed in 49 milliseconds

123