Lines Matching refs:dh
1193 struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv) in dh_init() argument
1198 if (dh == NULL) in dh_init()
1202 *priv = wpabuf_alloc(dh->prime_len); in dh_init()
1206 if (random_get_bytes(wpabuf_put(*priv, dh->prime_len), dh->prime_len)) in dh_init()
1213 if (os_memcmp(wpabuf_head(*priv), dh->prime, dh->prime_len) > 0) { in dh_init()
1219 pv_len = dh->prime_len; in dh_init()
1226 if (crypto_mod_exp(dh->generator, dh->generator_len, in dh_init()
1228 dh->prime, dh->prime_len, wpabuf_mhead(pv), in dh_init()
1252 const struct dh_group *dh) in dh_derive_shared() argument
1257 if (dh == NULL || peer_public == NULL || own_private == NULL) in dh_derive_shared()
1260 shared_len = dh->prime_len; in dh_derive_shared()
1266 dh->prime, dh->prime_len, in dh_derive_shared()