Lines Matching refs:ecdh
1721 struct crypto_ecdh *ecdh = NULL; in crypto_ecdh_init() local
1728 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
1729 if (!ecdh) in crypto_ecdh_init()
1732 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
1733 if (!ecdh->ec) in crypto_ecdh_init()
1736 ret = wc_ecc_make_key_ex(&rng, ecdh->ec->key.dp->size, &ecdh->ec->key, in crypto_ecdh_init()
1737 ecdh->ec->key.dp->id); in crypto_ecdh_init()
1744 return ecdh; in crypto_ecdh_init()
1746 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
1747 ecdh = NULL; in crypto_ecdh_init()
1752 void crypto_ecdh_deinit(struct crypto_ecdh *ecdh) in crypto_ecdh_deinit() argument
1754 if (ecdh) { in crypto_ecdh_deinit()
1755 crypto_ec_deinit(ecdh->ec); in crypto_ecdh_deinit()
1756 os_free(ecdh); in crypto_ecdh_deinit()
1761 struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y) in crypto_ecdh_get_pubkey() argument
1765 int len = ecdh->ec->key.dp->size; in crypto_ecdh_get_pubkey()
1772 ecdh->ec->key.pubkey.x, wpabuf_put(buf, len), in crypto_ecdh_get_pubkey()
1778 ecdh->ec->key.pubkey.y, in crypto_ecdh_get_pubkey()
1793 struct wpabuf * crypto_ecdh_set_peerkey(struct crypto_ecdh *ecdh, int inc_y, in crypto_ecdh_set_peerkey() argument
1799 word32 key_len = ecdh->ec->key.dp->size; in crypto_ecdh_set_peerkey()
1816 ecdh->ec->key.idx, point); in crypto_ecdh_set_peerkey()
1824 ret = wc_ecc_shared_secret_ex(&ecdh->ec->key, point, in crypto_ecdh_set_peerkey()
1840 size_t crypto_ecdh_prime_len(struct crypto_ecdh *ecdh) in crypto_ecdh_prime_len() argument
1842 return crypto_ec_prime_len(ecdh->ec); in crypto_ecdh_prime_len()