Lines Matching defs:ecdh
1662 struct crypto_ecdh *ecdh = NULL;
1669 ecdh = os_zalloc(sizeof(*ecdh));
1670 if (!ecdh)
1673 ecdh->ec = crypto_ec_init(group);
1674 if (!ecdh->ec)
1677 ret = wc_ecc_make_key_ex(&rng, ecdh->ec->key.dp->size, &ecdh->ec->key,
1678 ecdh->ec->key.dp->id);
1685 return ecdh;
1687 crypto_ecdh_deinit(ecdh);
1688 ecdh = NULL;
1693 void crypto_ecdh_deinit(struct crypto_ecdh *ecdh)
1695 if (ecdh) {
1696 crypto_ec_deinit(ecdh->ec);
1697 os_free(ecdh);
1702 struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y)
1706 int len = ecdh->ec->key.dp->size;
1713 ecdh->ec->key.pubkey.x, wpabuf_put(buf, len),
1719 ecdh->ec->key.pubkey.y,
1734 struct wpabuf * crypto_ecdh_set_peerkey(struct crypto_ecdh *ecdh, int inc_y,
1740 word32 key_len = ecdh->ec->key.dp->size;
1757 ecdh->ec->key.idx, point);
1765 ret = wc_ecc_shared_secret_ex(&ecdh->ec->key, point,