Lines Matching defs:dh
40 #include <dh.h>
60 dh_generate_key(DH *dh)
63 struct dh_cdsa *cdsa = DH_get_ex_data(dh, 0);
72 if (dh->p == NULL || dh->g == NULL)
80 ret = _hc_BN_to_integer(dh->p, &dp.prime);
82 ret = _hc_BN_to_integer(dh->g, &dp.base);
99 BN_num_bits(dh->p) - 1,
127 dh->pub_key = BN_bin2bn(cdsa->pub_key.KeyData.Data, cdsa->pub_key.KeyData.Length, NULL);
128 if (dh->pub_key == NULL)
135 dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh)
138 struct dh_cdsa *cdsa = DH_get_ex_data(dh, 0);
152 DH_size(dh) * 8,
183 if (size > DH_size(dh)) {
198 dh_generate_params(DH *dh, int a, int b, BN_GENCB *callback)
205 dh_init(DH *dh)
213 DH_set_ex_data(dh, 0, cdsa);
219 dh_finish(DH *dh)
221 struct dh_cdsa *cdsa = DH_get_ex_data(dh, 0);