Lines Matching refs:pub_key
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)
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)
100 rv = dh->meth->compute_key(key, pub_key, dh);
135 BIGNUM *pub_key = NULL, *priv_key = NULL;
149 if (dh->pub_key == NULL) {
150 pub_key = BN_new();
151 if (pub_key == NULL)
154 pub_key = dh->pub_key;
189 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, prk, dh->p, ctx, mont))
193 dh->pub_key = pub_key;
200 if ((pub_key != NULL) && (dh->pub_key == NULL))
201 BN_free(pub_key);
208 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
243 if (!DH_check_pub_key(dh, pub_key, &check_result) || check_result) {
249 meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key, dh->p, ctx, mont)) {