Lines Matching refs:pub_key
40 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()
270 BIGNUM *pub_key = NULL, *priv_key = NULL; in generate_key() local
301 if (dh->pub_key == NULL) { in generate_key()
302 pub_key = BN_new(); in generate_key()
303 if (pub_key == NULL) in generate_key()
306 pub_key = dh->pub_key; in generate_key()
366 if (!ossl_dh_generate_public_key(ctx, dh, priv_key, pub_key)) in generate_key()
369 dh->pub_key = pub_key; in generate_key()
377 if (pub_key != dh->pub_key) in generate_key()
378 BN_free(pub_key); in generate_key()