/openssl-master/crypto/dsa/ |
A 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 …]
|
A D | dsa_key.c | 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() 130 if (pub_key != dsa->pub_key) in dsa_keygen() [all …]
|
A D | dsa_lib.c | 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() 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() 306 if (pub_key != NULL) in DSA_get0_key() 307 *pub_key = d->pub_key; in DSA_get0_key() 314 if (pub_key != NULL) { in DSA_set0_key() 315 BN_free(d->pub_key); in DSA_set0_key() [all …]
|
A D | dsa_backend.c | 33 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dsa_key_fromdata() local 47 if (param_pub_key != NULL && !OSSL_PARAM_get_BN(param_pub_key, &pub_key)) in ossl_dsa_key_fromdata() 52 if (!DSA_set0_key(dsa, pub_key, priv_key)) in ossl_dsa_key_fromdata() 59 BN_free(pub_key); in ossl_dsa_key_fromdata() 98 || !dsa_bn_dup_check(&dupkey->pub_key, dsa->pub_key))) in ossl_dsa_dup()
|
A 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() 261 return BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) == 0; in dsa_pub_cmp() 273 const BIGNUM *priv_key, *pub_key; in do_dsa_print() local 285 pub_key = x->pub_key; in do_dsa_print() 287 pub_key = NULL; in do_dsa_print() 308 if (!ASN1_bn_print(bp, "pub: ", pub_key, NULL, off)) in do_dsa_print() 433 const BIGNUM *q = DSA_get0_q(dsa), *pub_key = DSA_get0_pub_key(dsa); in dsa_pkey_export_to() local 451 if (pub_key != NULL) { in dsa_pkey_export_to() 453 pub_key)) in dsa_pkey_export_to()
|
/openssl-master/crypto/ec/ |
A D | ec_key.c | 98 EC_POINT_free(r->pub_key); in EC_KEY_free() 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 309 if (pub_key == NULL) in ec_generate_key() 312 pub_key = eckey->pub_key; in ec_generate_key() 319 eckey->pub_key = pub_key; in ec_generate_key() 321 pub_key = NULL; in ec_generate_key() 346 EC_POINT_free(pub_key); in ec_generate_key() 782 return key->pub_key; in EC_KEY_get0_public_key() 791 key->pub_key = EC_POINT_dup(pub_key, key->group); in EC_KEY_set_public_key() [all …]
|
A 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()
|
A 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
|
/openssl-master/crypto/dh/ |
A D | dh_key.c | 115 ret = ossl_dh_compute_key(key, pub_key, dh); in DH_compute_key() 144 rv = ossl_dh_compute_key(key, pub_key, dh); in DH_compute_key_padded() 146 rv = dh->meth->compute_key(key, pub_key, dh); in DH_compute_key_padded() 264 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local 289 if (dh->pub_key == NULL) { in generate_key() 290 pub_key = BN_new(); in generate_key() 291 if (pub_key == NULL) in generate_key() 294 pub_key = dh->pub_key; in generate_key() 357 dh->pub_key = pub_key; in generate_key() 365 if (pub_key != dh->pub_key) in generate_key() [all …]
|
A D | dh_check.c | 216 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key) in DH_check_pub_key_ex() argument 220 if (!DH_check_pub_key(dh, pub_key, &errflags)) in DH_check_pub_key_ex() 236 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) in DH_check_pub_key() argument 238 return ossl_ffc_validate_public_key(&dh->params, pub_key, ret); in DH_check_pub_key() 288 BIGNUM *pub_key = NULL; in ossl_dh_check_pairwise() local 293 || dh->pub_key == NULL) in ossl_dh_check_pairwise() 299 pub_key = BN_new(); in ossl_dh_check_pairwise() 300 if (pub_key == NULL) in ossl_dh_check_pairwise() 304 if (!ossl_dh_generate_public_key(ctx, dh, dh->priv_key, pub_key)) in ossl_dh_check_pairwise() 307 ret = BN_cmp(pub_key, dh->pub_key) == 0; in ossl_dh_check_pairwise() [all …]
|
A D | dh_ameth.c | 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() 245 BIGNUM *priv_key, *pub_key; in do_dh_print() local 253 pub_key = x->pub_key; in do_dh_print() 255 pub_key = NULL; in do_dh_print() 365 if (BN_cmp(b->pkey.dh->pub_key, a->pkey.dh->pub_key) != 0) in dh_pub_cmp() 422 if (dh->pub_key == NULL) { in dh_pkey_public_check() [all …]
|
A 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()
|
A D | dh_backend.c | 69 BIGNUM *priv_key = NULL, *pub_key = NULL; in ossl_dh_key_fromdata() local 80 && !OSSL_PARAM_get_BN(param_pub_key, &pub_key))) in ossl_dh_key_fromdata() 83 if (!DH_set0_key(dh, pub_key, priv_key)) in ossl_dh_key_fromdata() 90 BN_free(pub_key); in ossl_dh_key_fromdata() 160 || !dh_bn_dup_check(&dupkey->pub_key, dh->pub_key))) in ossl_dh_dup()
|
A D | dh_local.h | 26 BIGNUM *pub_key; /* g^x % p */ member 47 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
/openssl-master/util/perl/TLSProxy/ |
A 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};
|
/openssl-master/crypto/ffc/ |
A D | ffc_key_validate.c | 20 const BIGNUM *pub_key, int *ret) in ossl_ffc_validate_public_key_partial() argument 37 if (BN_cmp(pub_key, tmp) <= 0) { in ossl_ffc_validate_public_key_partial() 45 if (BN_cmp(pub_key, tmp) >= 0) { in ossl_ffc_validate_public_key_partial() 62 const BIGNUM *pub_key, int *ret) in ossl_ffc_validate_public_key() argument 68 if (!ossl_ffc_validate_public_key_partial(params, pub_key, ret)) in ossl_ffc_validate_public_key() 80 || !BN_mod_exp(tmp, pub_key, params->q, params->p, ctx)) in ossl_ffc_validate_public_key()
|
/openssl-master/apps/ |
A 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()
|
A D | dsa.c | 212 BIGNUM *pub_key = NULL; in dsa_main() local 214 if (!EVP_PKEY_get_bn_param(pkey, "pub", &pub_key)) { in dsa_main() 219 BN_print(out, pub_key); in dsa_main() 221 BN_free(pub_key); in dsa_main()
|
/openssl-master/demos/signature/ |
A 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()
|
/openssl-master/include/crypto/ |
A D | dsa.h | 38 const BIGNUM *priv_key, BIGNUM *pub_key); 40 int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret); 41 int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key,
|
A D | dh.h | 25 const BIGNUM *priv_key, BIGNUM *pub_key); 40 int ossl_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 42 int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret);
|
/openssl-master/include/openssl/ |
A D | dh.h | 218 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); 221 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, 225 const BIGNUM *pub_key, DH *dh); 227 const BIGNUM *pub_key, DH *dh); 256 OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, 258 OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 285 const BIGNUM *pub_key, 290 const BIGNUM *pub_key,
|
/openssl-master/crypto/pem/ |
A D | pvkfmt.c | 382 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() 436 BN_free(pub_key); in ossl_b2i_DSA_after_header() 696 DSA_get0_key(dsa, &pub_key, &priv_key); in check_bitlen_dsa() 702 if (BN_num_bits(pub_key) > bitlen) in check_bitlen_dsa() 724 DSA_get0_key(dsa, &pub_key, &priv_key); in write_dsa() [all …]
|
/openssl-master/providers/implementations/encode_decode/ |
A D | encode_key2text.c | 217 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dh_to_text() local 241 pub_key = DH_get0_pub_key(dh); in dh_to_text() 242 if (pub_key == NULL) { in dh_to_text() 266 if (pub_key != NULL in dh_to_text() 267 && !print_labeled_bignum(out, "public-key:", pub_key)) in dh_to_text() 287 const BIGNUM *priv_key = NULL, *pub_key = NULL; in dsa_to_text() local 311 pub_key = DSA_get0_pub_key(dsa); in dsa_to_text() 312 if (pub_key == NULL) { in dsa_to_text() 336 if (pub_key != NULL in dsa_to_text() 337 && !print_labeled_bignum(out, "pub: ", pub_key)) in dsa_to_text()
|
/openssl-master/doc/man3/ |
A D | DH_generate_key.pod | 18 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 20 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); 36 corresponding public value B<dh-E<gt>pub_key>, which can then be 40 in B<dh> and the other party's public value in B<pub_key> and stores
|