/freebsd-11-stable/crypto/openssl/crypto/dsa/ |
H A D | dsa_key.c | 95 BIGNUM *pub_key = NULL, *priv_key = NULL; local 111 if (dsa->pub_key == NULL) { 112 if ((pub_key = BN_new()) == NULL) 115 pub_key = dsa->pub_key; 128 if (!BN_mod_exp(pub_key, dsa->g, prk, dsa->p, ctx)) 133 dsa->pub_key = pub_key; 137 if ((pub_key != NULL) && (dsa->pub_key [all...] |
H A D | dsa_lib.c | 166 ret->pub_key = NULL; 224 if (r->pub_key != NULL) 225 BN_clear_free(r->pub_key); 293 * DSA has p, q, g, optional pub_key, optional priv_key. DH has p, 294 * optional length, g, optional pub_key, optional priv_key, optional q. 315 if (r->pub_key != NULL) 316 if ((ret->pub_key = BN_dup(r->pub_key)) == NULL)
|
H A D | dsa_asn1.c | 115 ASN1_SIMPLE(DSA, pub_key, BIGNUM), 136 ASN1_SIMPLE(DSA, pub_key, BIGNUM), 143 ASN1_SIMPLE(DSA, pub_key, BIGNUM),
|
H A D | dsa_ameth.c | 111 if (!(dsa->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) { 214 * SEQUENCE {pub_key, priv_key} 256 if (!(dsa->pub_key = BN_new())) { 266 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) { 399 if (BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) != 0) 426 const BIGNUM *priv_key, *pub_key; local 434 pub_key = x->pub_key; 436 pub_key [all...] |
/freebsd-11-stable/crypto/openssl/crypto/ecdh/ |
H A D | ech_key.c | 72 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, argument 80 return ecdh->meth->compute_key(out, outlen, pub_key, eckey, KDF);
|
H A D | ech_locl.h | 67 int (*compute_key) (void *key, size_t outlen, const EC_POINT *pub_key,
|
H A D | ech_ossl.c | 81 static int ecdh_compute_key(void *out, size_t len, const EC_POINT *pub_key, 108 static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, argument 156 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) {
|
H A D | ecdh.h | 96 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
/freebsd-11-stable/crypto/openssl/crypto/dh/ |
H A D | dh_key.c | 66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 85 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument 94 return dh->meth->compute_key(key, pub_key, dh); 97 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument 100 rv = dh->meth->compute_key(key, pub_key, dh); 135 BIGNUM *pub_key = NULL, *priv_key = NULL; local 154 if (dh->pub_key == NULL) { 155 pub_key = BN_new(); 156 if (pub_key == NULL) 159 pub_key 213 compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument [all...] |
H A D | dh_check.c | 151 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) argument 165 if (BN_cmp(pub_key, tmp) <= 0) 169 if (BN_cmp(pub_key, tmp) >= 0) 173 /* Check pub_key^q == 1 mod p */ 174 if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx))
|
H A D | dh_ameth.c | 133 if (!(dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) { 158 ASN1_INTEGER *pub_key = NULL; local 174 pub_key = BN_to_ASN1_INTEGER(dh->pub_key, NULL); 175 if (!pub_key) 178 penclen = i2d_ASN1_INTEGER(pub_key, &penc); 180 ASN1_INTEGER_free(pub_key); 342 BIGNUM *priv_key, *pub_key; local 350 pub_key = x->pub_key; [all...] |
H A D | dh.h | 121 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh); 145 BIGNUM *pub_key; /* g^x % p */ member in struct:dh_st 238 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); 240 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 241 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
H A D | dh_lib.c | 159 ret->pub_key = NULL; 221 if (r->pub_key != NULL) 222 BN_clear_free(r->pub_key);
|
/freebsd-11-stable/crypto/openssl/crypto/ec/ |
H A D | ec_key.c | 84 ret->pub_key = NULL; 128 if (r->pub_key != NULL) 129 EC_POINT_free(r->pub_key); 161 if (src->pub_key && src->group) { 162 if (dest->pub_key) 163 EC_POINT_free(dest->pub_key); 164 dest->pub_key = EC_POINT_new(src->group); 165 if (dest->pub_key == NULL) 167 if (!EC_POINT_copy(dest->pub_key, src->pub_key)) 235 EC_POINT *pub_key = NULL; local 473 EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) argument [all...] |
H A D | ec_ameth.c | 264 EC_POINT *pub_key; local 270 pub_key = EC_POINT_new(group); 271 if (pub_key == NULL) { 275 if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) { 276 EC_POINT_free(pub_key); 281 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) { 282 EC_POINT_free(pub_key); 286 if (EC_KEY_set_public_key(eckey, pub_key) == 0) { 287 EC_POINT_free(pub_key); 291 EC_POINT_free(pub_key); 420 BIGNUM *pub_key = NULL, *order = NULL; local [all...] |
/freebsd-11-stable/crypto/openssl/engines/ccgost/ |
H A D | gost2001.c | 270 const EC_POINT *pub_key = NULL; local 292 pub_key = EC_KEY_get0_public_key(ec); 293 if(!pub_key || !EC_GROUP_get_order(group, order, ctx)) { 342 if (!EC_POINT_mul(group, C, z1, pub_key, z2, ctx)) { 384 EC_POINT *pub_key = NULL; local 405 pub_key = EC_POINT_new(group); 406 if(!pub_key) { 410 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) { 414 if (!EC_KEY_set_public_key(ec, pub_key)) { 420 if (pub_key) EC_POINT_fre [all...] |
H A D | gost_ameth.c | 385 pubkey = ((DSA *)EVP_PKEY_get0((EVP_PKEY *)pkey))->pub_key; 628 dsa->pub_key = BN_bin2bn(databuf, octet->length, NULL); 651 data_len = BN_num_bytes(dsa->pub_key); 655 BN_bn2bin(dsa->pub_key, databuf); 677 EC_POINT *pub_key; local 708 pub_key = EC_POINT_new(group); 709 if (!EC_POINT_set_affine_coordinates_GFp(group, pub_key, X, Y, NULL)) { 711 EC_POINT_free(pub_key); 718 if (!EC_KEY_set_public_key(EVP_PKEY_get0(pk), pub_key)) { 720 EC_POINT_free(pub_key); 735 const EC_POINT *pub_key; local [all...] |
H A D | gost_pmeth.c | 363 EVP_PKEY *pub_key = EVP_PKEY_CTX_get0_pkey(ctx); local 367 if (pub_key) 368 ok = gost_do_verify(tbs, tbs_len, s, EVP_PKEY_get0(pub_key)); 378 EVP_PKEY *pub_key = EVP_PKEY_CTX_get0_pkey(ctx); local 389 if (pub_key) 390 ok = gost2001_do_verify(tbs, tbs_len, s, EVP_PKEY_get0(pub_key));
|
H A D | gost_sign.c | 207 BN_mod_exp(tmp2, dsa->pub_key, z2, dsa->p, ctx); 242 dsa->pub_key = BN_new(); 243 if(!dsa->pub_key) { 249 BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx);
|
/freebsd-11-stable/contrib/ntp/libntp/ |
H A D | libssl_compat.c | 303 *ppub_key = pdsa->pub_key; 311 BIGNUM * pub_key, 316 if (!(pdsa->pub_key || pub_key)) 319 replace_bn_nn(&pdsa->pub_key, pub_key); 309 sslshim_DSA_set0_key( DSA * pdsa, BIGNUM * pub_key, BIGNUM * priv_key ) argument
|
/freebsd-11-stable/crypto/openssl/engines/ |
H A D | e_ubsec.c | 126 static int ubsec_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, 873 (unsigned char *)dsa->pub_key->d, 874 BN_num_bits(dsa->pub_key), 900 static int ubsec_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, argument 911 ret = meth->compute_key(key, pub_key, dh); 918 (unsigned char *)pub_key->d, 919 BN_num_bits(pub_key), 929 ret = meth->compute_key(key, pub_key, dh); 944 BIGNUM *pub_key = NULL; local 968 if (dh->pub_key [all...] |
/freebsd-11-stable/crypto/openssh/ |
H A D | kexgexs.c | 168 BN_print_fp(stderr, kex->dh->pub_key); 206 kex->dh->pub_key, 232 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */
|
H A D | kexgexc.c | 124 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || 131 BN_print_fp(stderr, kex->dh->pub_key); 232 kex->dh->pub_key,
|
H A D | kexdhs.c | 139 BN_print_fp(stderr, kex->dh->pub_key); 175 kex->dh->pub_key, 201 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || /* f */
|
H A D | kexdhc.c | 86 (r = sshpkt_put_bignum2(ssh, kex->dh->pub_key)) != 0 || 92 BN_print_fp(stderr, kex->dh->pub_key); 180 kex->dh->pub_key,
|