/freebsd-10.1-release/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))) { 210 * SEQUENCE {pub_key, priv_key} 252 if (!(dsa->pub_key = BN_new())) { 261 if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) { 393 if (BN_cmp(b->pkey.dsa->pub_key, a->pkey.dsa->pub_key) != 0) 420 const BIGNUM *priv_key, *pub_key; local 428 pub_key = x->pub_key; 430 pub_key [all...] |
/freebsd-10.1-release/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 146 if (!EC_POINT_mul(group, tmp, NULL, pub_key, priv_key, ctx)) {
|
H A D | ecdh.h | 94 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
/freebsd-10.1-release/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 468 EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) argument [all...] |
H A D | ec_ameth.c | 255 EC_POINT *pub_key; local 261 pub_key = EC_POINT_new(group); 262 if (pub_key == NULL) { 266 if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) { 267 EC_POINT_free(pub_key); 272 if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) { 273 EC_POINT_free(pub_key); 277 if (EC_KEY_set_public_key(eckey, pub_key) == 0) { 278 EC_POINT_free(pub_key); 282 EC_POINT_free(pub_key); 414 BIGNUM *pub_key = NULL, *order = NULL; local [all...] |
/freebsd-10.1-release/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); 121 BIGNUM *pub_key = NULL, *priv_key = NULL; local 135 if (dh->pub_key == NULL) { 136 pub_key = BN_new(); 137 if (pub_key == NULL) 140 pub_key = dh->pub_key; 175 if (!dh->meth->bn_mod_exp(dh, pub_key, d 194 compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) argument [all...] |
H A D | dh_check.c | 125 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) argument 135 if (BN_cmp(pub_key, q) <= 0) 139 if (BN_cmp(pub_key, q) >= 0)
|
H A D | dh_ameth.c | 108 if (!(dh->pub_key = ASN1_INTEGER_to_BN(public_key, NULL))) { 133 ASN1_INTEGER *pub_key = NULL; local 149 pub_key = BN_to_ASN1_INTEGER(dh->pub_key, NULL); 150 if (!pub_key) 153 penclen = i2d_ASN1_INTEGER(pub_key, &penc); 155 ASN1_INTEGER_free(pub_key); 317 BIGNUM *priv_key, *pub_key; local 325 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 */ member in struct:dh_st 217 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); 219 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
|
H A D | dhtest.c | 165 BN_print(out, a->pub_key); 173 BN_print(out, b->pub_key); 178 aout = DH_compute_key(abuf, b->pub_key, a); 189 bout = DH_compute_key(bbuf, a->pub_key, b);
|
/freebsd-10.1-release/crypto/openssh/ |
H A D | kexdhc.c | 71 packet_put_bignum2(dh->pub_key); 78 BN_print_fp(stderr, dh->pub_key); 137 dh->pub_key,
|
H A D | kexdhs.c | 96 BN_print_fp(stderr, dh->pub_key); 126 dh->pub_key, 148 packet_put_bignum2(dh->pub_key); /* f */
|
H A D | kexgexc.c | 110 BN_print_fp(stderr, dh->pub_key); 117 packet_put_bignum2(dh->pub_key); 181 dh->pub_key,
|
H A D | kexgexs.c | 136 BN_print_fp(stderr, dh->pub_key); 172 dh->pub_key, 195 packet_put_bignum2(dh->pub_key); /* f */
|
/freebsd-10.1-release/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; 624 dsa->pub_key = BN_bin2bn(databuf, octet->length, NULL); 647 data_len = BN_num_bytes(dsa->pub_key); 649 BN_bn2bin(dsa->pub_key, databuf); 671 EC_POINT *pub_key; local 698 pub_key = EC_POINT_new(group); 699 if (!EC_POINT_set_affine_coordinates_GFp(group, pub_key, X, Y, NULL)) { 701 EC_POINT_free(pub_key); 708 if (!EC_KEY_set_public_key(EVP_PKEY_get0(pk), pub_key)) { 710 EC_POINT_free(pub_key); 725 const EC_POINT *pub_key; local [all...] |
H A D | gost_pmeth.c | 357 EVP_PKEY *pub_key = EVP_PKEY_CTX_get0_pkey(ctx); local 361 if (pub_key) 362 ok = gost_do_verify(tbs, tbs_len, s, EVP_PKEY_get0(pub_key)); 372 EVP_PKEY *pub_key = EVP_PKEY_CTX_get0_pkey(ctx); local 383 if (pub_key) 384 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-10.1-release/contrib/ntp/libntp/ |
H A D | libssl_compat.c | 297 *ppub_key = pdsa->pub_key; 305 BIGNUM * pub_key, 310 if (!(pdsa->pub_key || pub_key)) 313 replace_bn_nn(&pdsa->pub_key, pub_key); 303 sslshim_DSA_set0_key( DSA * pdsa, BIGNUM * pub_key, BIGNUM * priv_key ) argument
|
/freebsd-10.1-release/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...] |