Home | History | Annotate | Download | only in dh

Lines Matching refs:pub_key

66 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
87 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
97 return dh->meth->compute_key(key, pub_key, dh);
124 BIGNUM *pub_key=NULL,*priv_key=NULL;
138 if (dh->pub_key == NULL)
140 pub_key=BN_new();
141 if (pub_key == NULL) goto err;
144 pub_key=dh->pub_key;
187 if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, prk, dh->p, ctx, mont)) goto err;
190 dh->pub_key=pub_key;
197 if ((pub_key != NULL) && (dh->pub_key == NULL)) BN_free(pub_key);
203 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
241 if (!DH_check_pub_key(dh, pub_key, &check_result) || check_result)
247 if (!dh->meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key,dh->p,ctx,mont))