Lines Matching refs:priv_key
111 BN_clear_free(dh->priv_key); in DH_free()
123 *out_priv_key = dh->priv_key; in DH_get0_key()
127 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { in DH_set0_key() argument
133 if (priv_key != NULL) { in DH_set0_key()
134 BN_free(dh->priv_key); in DH_set0_key()
135 dh->priv_key = priv_key; in DH_set0_key()
296 BIGNUM *pub_key = NULL, *priv_key = NULL; in DH_generate_key() local
308 if (dh->priv_key == NULL) { in DH_generate_key()
309 priv_key = BN_new(); in DH_generate_key()
310 if (priv_key == NULL) { in DH_generate_key()
315 priv_key = dh->priv_key; in DH_generate_key()
334 if (!BN_rand_range_ex(priv_key, 2, dh->q)) { in DH_generate_key()
349 if (!BN_rand(priv_key, priv_bits, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY)) { in DH_generate_key()
355 if (!BN_mod_exp_mont_consttime(pub_key, dh->g, priv_key, dh->p, ctx, in DH_generate_key()
361 dh->priv_key = priv_key; in DH_generate_key()
372 if (dh->priv_key == NULL) { in DH_generate_key()
373 BN_free(priv_key); in DH_generate_key()
400 if (dh->priv_key == NULL) { in DH_compute_key()
415 if (!BN_mod_exp_mont_consttime(shared_key, peers_key, dh->priv_key, dh->p, in DH_compute_key()