Lines Matching refs:pubkey
741 u8 *pubkey) in crypto_dh_init() argument
754 pubkey, &pubkey_len) < 0) in crypto_dh_init()
758 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init()
759 os_memset(pubkey, 0, pad); in crypto_dh_init()
769 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument
775 pub = BN_bin2bn(pubkey, pubkey_len, NULL); in crypto_dh_derive_secret()
800 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
971 struct wpabuf *pubkey = NULL, *privkey = NULL; in dh5_init() local
998 pubkey = wpabuf_alloc(publen); in dh5_init()
999 if (pubkey == NULL) in dh5_init()
1006 BN_bn2bin(dh->pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
1010 *publ = pubkey; in dh5_init()
1014 wpabuf_clear_free(pubkey); in dh5_init()
1023 struct wpabuf *pubkey = NULL, *privkey = NULL; in dh5_init()
1047 !(pubkey = wpabuf_alloc(pub_len)) || in dh5_init()
1051 wpabuf_put(pubkey, pub_len), in dh5_init()
1055 wpabuf_free(pubkey); in dh5_init()
1063 *publ = pubkey; in dh5_init()
1071 struct wpabuf *pubkey = NULL, *privkey = NULL; in dh5_init()
1099 pubkey = wpabuf_alloc(publen); in dh5_init()
1100 if (!pubkey) in dh5_init()
1107 BN_bn2bin(pub_key, wpabuf_put(pubkey, publen)); in dh5_init()
1111 *publ = pubkey; in dh5_init()
1118 wpabuf_clear_free(pubkey); in dh5_init()
2794 const EC_POINT *pubkey; in crypto_ecdh_get_pubkey()
2803 pubkey = EC_KEY_get0_public_key(eckey); in crypto_ecdh_get_pubkey()
2804 if (!pubkey) in crypto_ecdh_get_pubkey()
2817 if (EC_POINT_get_affine_coordinates(ecdh->ec->group, pubkey, in crypto_ecdh_get_pubkey()
3571 EC_COMP_PUBKEY *pubkey = NULL; in crypto_ec_key_get_subject_public_key() local
3585 pubkey = EC_COMP_PUBKEY_new(); in crypto_ec_key_get_subject_public_key()
3586 if (!pubkey || in crypto_ec_key_get_subject_public_key()
3587 X509_ALGOR_set0(pubkey->alg, OBJ_nid2obj(EVP_PKEY_EC), in crypto_ec_key_get_subject_public_key()
3602 OPENSSL_free(pubkey->pub_key->data); in crypto_ec_key_get_subject_public_key()
3603 pubkey->pub_key->data = der; in crypto_ec_key_get_subject_public_key()
3605 pubkey->pub_key->length = len; in crypto_ec_key_get_subject_public_key()
3607 pubkey->pub_key->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); in crypto_ec_key_get_subject_public_key()
3608 pubkey->pub_key->flags |= ASN1_STRING_FLAG_BITS_LEFT; in crypto_ec_key_get_subject_public_key()
3610 der_len = i2d_EC_COMP_PUBKEY(pubkey, &der); in crypto_ec_key_get_subject_public_key()
3619 EC_COMP_PUBKEY_free(pubkey); in crypto_ec_key_get_subject_public_key()