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()
230 const BIGNUM *priv_key, BIGNUM *pub_key) in ossl_dh_generate_public_key() argument
256 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->params.g, prk, dh->params.p, in ossl_dh_generate_public_key()
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()
369 if (!ossl_dh_generate_public_key(ctx, dh, priv_key, pub_key)) in generate_key()
372 dh->pub_key = pub_key; in generate_key()
380 if (pub_key != dh->pub_key) in generate_key()
381 BN_free(pub_key); in generate_key()