Home
last modified time | relevance | path

Searched refs:ecdh (Results 1 – 25 of 55) sorted by relevance

123

/freebsd/crypto/openssl/crypto/ec/
H A Decdh_ossl.c29 const EC_POINT *pub_key, const EC_KEY *ecdh) in ossl_ecdh_compute_key() argument
31 if (ecdh->group->meth->ecdh_compute_key == NULL) { in ossl_ecdh_compute_key()
36 return ecdh->group->meth->ecdh_compute_key(psec, pseclen, pub_key, ecdh); in ossl_ecdh_compute_key()
50 const EC_POINT *pub_key, const EC_KEY *ecdh) in ossl_ecdh_simple_compute_key() argument
61 if ((ctx = BN_CTX_new_ex(ecdh->libctx)) == NULL) in ossl_ecdh_simple_compute_key()
70 priv_key = EC_KEY_get0_private_key(ecdh); in ossl_ecdh_simple_compute_key()
76 group = EC_KEY_get0_group(ecdh); in ossl_ecdh_simple_compute_key()
82 if (EC_KEY_get_flags(ecdh) & EC_FLAG_COFACTOR_ECDH) { in ossl_ecdh_simple_compute_key()
H A Dec_kmeth.c228 const EC_KEY *ecdh)) in EC_KEY_METHOD_set_compute_key() argument
302 const EC_KEY *ecdh)) in EC_KEY_METHOD_get_compute_key() argument
H A Dec_local.h177 const EC_POINT *pub_key, const EC_KEY *ecdh);
647 const EC_POINT *pub_key, const EC_KEY *ecdh);
670 const EC_POINT *pub_key, const EC_KEY *ecdh);
672 const EC_POINT *pub_key, const EC_KEY *ecdh);
/freebsd/contrib/libfido2/src/
H A Dpin.c150 ctap20_uv_token_tx(fido_dev_t *dev, const char *pin, const fido_blob_t *ecdh, in ctap20_uv_token_tx() argument
175 if ((r = pin_sha256_enc(dev, ecdh, p, &phe)) != FIDO_OK) { in ctap20_uv_token_tx()
207 ctap21_uv_token_tx(fido_dev_t *dev, const char *pin, const fido_blob_t *ecdh, in ctap21_uv_token_tx() argument
227 if ((r = pin_sha256_enc(dev, ecdh, p, &phe)) != FIDO_OK) { in ctap21_uv_token_tx()
285 uv_token_rx(fido_dev_t *dev, const fido_blob_t *ecdh, fido_blob_t *token, in uv_token_rx() argument
315 if (aes256_cbc_dec(dev, ecdh, aes_token, token) < 0) { in uv_token_rx()
331 const fido_blob_t *ecdh, const es256_pk_t *pk, const char *rpid, in uv_token_wait() argument
336 if (ecdh == NULL || pk == NULL) in uv_token_wait()
339 r = ctap21_uv_token_tx(dev, pin, ecdh, pk, cmd, rpid, ms); in uv_token_wait()
341 r = ctap20_uv_token_tx(dev, pin, ecdh, pk, ms); in uv_token_wait()
[all …]
H A Decdh.c117 fido_blob_t **ecdh) in do_ecdh() argument
125 *ecdh = NULL; in do_ecdh()
127 (*ecdh = fido_blob_new()) == NULL) in do_ecdh()
146 if (kdf(fido_dev_get_pin_protocol(dev), *ecdh, secret) < 0) { in do_ecdh()
160 fido_blob_free(ecdh); in do_ecdh()
168 fido_do_ecdh(fido_dev_t *dev, es256_pk_t **pk, fido_blob_t **ecdh, int *ms) in fido_do_ecdh() argument
175 *ecdh = NULL; in fido_do_ecdh()
191 if (do_ecdh(dev, sk, ak, ecdh) < 0) { in fido_do_ecdh()
204 fido_blob_free(ecdh); in fido_do_ecdh()
H A Dconfig.c49 fido_blob_t *ecdh = NULL, f, hmac; in config_tx() local
77 if ((r = fido_do_ecdh(dev, &pk, &ecdh, ms)) != FIDO_OK) { in config_tx()
81 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in config_tx()
100 fido_blob_free(&ecdh); in config_tx()
H A Dbio.c66 fido_blob_t *ecdh = NULL; in bio_tx() local
94 if ((r = fido_do_ecdh(dev, &pk, &ecdh, ms)) != FIDO_OK) { in bio_tx()
98 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in bio_tx()
123 fido_blob_free(&ecdh); in bio_tx()
470 fido_blob_t *ecdh = NULL; in fido_bio_dev_enroll_begin() local
483 if ((r = fido_do_ecdh(dev, &pk, &ecdh, &ms)) != FIDO_OK) { in fido_bio_dev_enroll_begin()
488 if ((r = fido_dev_get_uv_token(dev, CTAP_CBOR_BIO_ENROLL_PRE, pin, ecdh, in fido_bio_dev_enroll_begin()
498 fido_blob_free(&ecdh); in fido_bio_dev_enroll_begin()
H A Dassert.c86 const es256_pk_t *pk, const fido_blob_t *ecdh, const char *pin, int *ms) in fido_dev_get_assert_tx()
123 if ((argv[3] = cbor_encode_assert_ext(dev, &assert->ext, ecdh, in fido_dev_get_assert_tx()
133 if ((r = cbor_add_uv_params(dev, cmd, &assert->cdh, pk, ecdh, in fido_dev_get_assert_tx()
269 const es256_pk_t *pk, const fido_blob_t *ecdh, const char *pin, int *ms) in fido_dev_get_assert_wait()
273 if ((r = fido_dev_get_assert_tx(dev, assert, pk, ecdh, pin, in fido_dev_get_assert_wait()
311 fido_blob_t *ecdh = NULL; in fido_dev_get_assert()
336 if ((r = fido_do_ecdh(dev, &pk, &ecdh, &ms)) != FIDO_OK) { in fido_dev_get_assert()
342 r = fido_dev_get_assert_wait(dev, assert, pk, ecdh, pin, &ms); in fido_dev_get_assert()
344 if (decrypt_hmac_secrets(dev, assert, ecdh) < 0) { in fido_dev_get_assert()
352 fido_blob_free(&ecdh);
82 fido_dev_get_assert_tx(fido_dev_t * dev,fido_assert_t * assert,const es256_pk_t * pk,const fido_blob_t * ecdh,const char * pin,int * ms) fido_dev_get_assert_tx() argument
265 fido_dev_get_assert_wait(fido_dev_t * dev,fido_assert_t * assert,const es256_pk_t * pk,const fido_blob_t * ecdh,const char * pin,int * ms) fido_dev_get_assert_wait() argument
307 fido_blob_t *ecdh = NULL; fido_dev_get_assert() local
[all...]
H A Dcredman.c119 fido_blob_t *ecdh = NULL; in credman_tx() local
148 if ((r = fido_do_ecdh(dev, &pk, &ecdh, ms)) != FIDO_OK) { in credman_tx()
152 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in credman_tx()
170 fido_blob_free(&ecdh); in credman_tx()
H A Dcbor.c785 const fido_blob_t *ecdh, const es256_pk_t *pk, const fido_blob_t *salt) in cbor_encode_hmac_secret_param() argument
797 if (item == NULL || ecdh == NULL || pk == NULL || salt->ptr == NULL) { in cbor_encode_hmac_secret_param()
799 (const void *)ecdh, (const void *)pk, in cbor_encode_hmac_secret_param()
812 aes256_cbc_enc(dev, ecdh, salt, enc) < 0) { in cbor_encode_hmac_secret_param()
827 (argv[2] = cbor_encode_pin_auth(dev, ecdh, enc)) == NULL || in cbor_encode_hmac_secret_param()
871 const fido_blob_t *ecdh, const es256_pk_t *pk) in cbor_encode_assert_ext() argument
892 if (cbor_encode_hmac_secret_param(dev, item, ecdh, pk, in cbor_encode_assert_ext()
H A Dlargeblob.c553 fido_blob_t *ecdh = NULL; in largeblob_get_uv_token() local
558 if ((r = fido_do_ecdh(dev, &pk, &ecdh, ms)) != FIDO_OK) { in largeblob_get_uv_token()
562 if ((r = fido_dev_get_uv_token(dev, CTAP_CBOR_LARGEBLOB, pin, ecdh, pk, in largeblob_get_uv_token()
573 fido_blob_free(&ecdh); in largeblob_get_uv_token()
/freebsd/contrib/wpa/src/crypto/
H A Dcrypto_openssl.c2637 struct crypto_ecdh *ecdh; in crypto_ecdh_init() local
2640 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
2641 if (!ecdh) in crypto_ecdh_init()
2644 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
2645 if (!ecdh->ec) in crypto_ecdh_init()
2648 name = OSSL_EC_curve_nid2name(ecdh->ec->nid); in crypto_ecdh_init()
2652 ecdh->pkey = EVP_EC_gen(name); in crypto_ecdh_init()
2653 if (!ecdh->pkey) in crypto_ecdh_init()
2657 return ecdh; in crypto_ecdh_init()
2659 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
[all …]
H A Dcrypto_wolfssl.c2091 struct crypto_ecdh *ecdh = NULL; in _crypto_ecdh_init() local
2096 ecdh = os_zalloc(sizeof(*ecdh)); in _crypto_ecdh_init()
2097 if (!ecdh) { in _crypto_ecdh_init()
2102 ecdh->rng = wc_rng_init(); in _crypto_ecdh_init()
2103 if (!ecdh->rng) { in _crypto_ecdh_init()
2108 ecdh->ec = crypto_ec_init(group); in _crypto_ecdh_init()
2109 if (!ecdh->ec) { in _crypto_ecdh_init()
2115 ret = wc_ecc_set_rng(ecdh->ec->key, ecdh->rng); in _crypto_ecdh_init()
2122 return ecdh; in _crypto_ecdh_init()
2124 crypto_ecdh_deinit(ecdh); in _crypto_ecdh_init()
[all …]
H A Dcrypto.h980 struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y);
991 struct wpabuf * crypto_ecdh_set_peerkey(struct crypto_ecdh *ecdh, int inc_y,
998 void crypto_ecdh_deinit(struct crypto_ecdh *ecdh);
1005 size_t crypto_ecdh_prime_len(struct crypto_ecdh *ecdh);
/freebsd/crypto/openssl/doc/man3/
H A DSSL_CTX_set_tmp_ecdh.pod12 long SSL_CTX_set_tmp_ecdh(SSL_CTX *ctx, const EC_KEY *ecdh);
13 long SSL_set_tmp_ecdh(SSL *ssl, const EC_KEY *ecdh);
20 SSL_CTX_set_tmp_ecdh() sets ECDH parameters to be used to be B<ecdh>.
/freebsd/contrib/netbsd-tests/crypto/libcrypto/
H A Dt_pubkey.sh70 atf_test_case ecdh
107 atf_add_test_case ecdh
/freebsd/crypto/libecc/include/libecc/
H A Dmeson.build125 'ecdh/ecdh.h',
126 'ecdh/ecccdh.h',
127 'ecdh/x25519_448.h',
/freebsd/crypto/heimdal/kdc/
H A Dpkinit.c60 } ecdh; member
186 if (cp->u.ecdh.key) in _kdc_pk_free_client_param()
187 EC_KEY_free(cp->u.ecdh.key); in _kdc_pk_free_client_param()
188 if (cp->u.ecdh.public_key) in _kdc_pk_free_client_param()
189 EC_KEY_free(cp->u.ecdh.public_key); in _kdc_pk_free_client_param()
255 if (client_params->u.ecdh.public_key == NULL) { in generate_dh_keyblock()
261 client_params->u.ecdh.key = EC_KEY_new(); in generate_dh_keyblock()
262 if (client_params->u.ecdh.key == NULL) { in generate_dh_keyblock()
266 EC_KEY_set_group(client_params->u.ecdh.key, in generate_dh_keyblock()
267 EC_KEY_get0_group(client_params->u.ecdh.public_key)); in generate_dh_keyblock()
[all …]
/freebsd/crypto/heimdal/include/hcrypto/
H A DMakefile.am13 ecdh.h \
/freebsd/contrib/wpa/src/pasn/
H A Dpasn_initiator.c540 pubkey = crypto_ecdh_get_pubkey(pasn->ecdh, 0); in wpas_pasn_build_auth_1()
541 pubkey = wpabuf_zeropad(pubkey, crypto_ecdh_prime_len(pasn->ecdh)); in wpas_pasn_build_auth_1()
701 crypto_ecdh_deinit(pasn->ecdh); in wpa_pasn_reset()
702 pasn->ecdh = NULL; in wpa_pasn_reset()
884 pasn->ecdh = crypto_ecdh_init(group); in wpas_pasn_send_auth_1()
885 if (!pasn->ecdh) { in wpas_pasn_send_auth_1()
1206 secret = crypto_ecdh_set_peerkey(pasn->ecdh, inc_y, in wpa_pasn_auth_rx()
H A Dpasn_responder.c480 pubkey = crypto_ecdh_get_pubkey(pasn->ecdh, 0); in handle_auth_pasn_resp()
482 crypto_ecdh_prime_len(pasn->ecdh)); in handle_auth_pasn_resp()
726 pasn->ecdh = crypto_ecdh_init(pasn_params.group); in handle_auth_pasn_1()
727 if (!pasn->ecdh) { in handle_auth_pasn_1()
748 secret = crypto_ecdh_set_peerkey(pasn->ecdh, inc_y, in handle_auth_pasn_1()
/freebsd/contrib/wpa/src/common/
H A Ddpp_crypto.c505 struct crypto_ecdh *ecdh; in dpp_ecdh() local
511 ecdh = crypto_ecdh_init2(crypto_ec_key_group(own), own); in dpp_ecdh()
512 if (!ecdh) { in dpp_ecdh()
524 secret_buf = crypto_ecdh_set_peerkey(ecdh, 1, wpabuf_head(peer_pub), in dpp_ecdh()
543 crypto_ecdh_deinit(ecdh); in dpp_ecdh()
2020 pfs->ecdh = crypto_ecdh_init(pfs->curve->ike_group); in dpp_pfs_init()
2021 if (!pfs->ecdh) in dpp_pfs_init()
2024 pub = crypto_ecdh_get_pubkey(pfs->ecdh, 0); in dpp_pfs_init()
2058 pfs->secret = crypto_ecdh_set_peerkey(pfs->ecdh, 0, peer_ie + 2, in dpp_pfs_process()
2074 crypto_ecdh_deinit(pfs->ecdh); in dpp_pfs_free()
/freebsd/lib/libfido2/
H A DMakefile20 SRCS+= ecdh.c
/freebsd/contrib/libfido2/fuzz/
H A Dsummary.txt25 src/ecdh.c 117 2 98.29% 4 0 100.00% 146 5 96.58%
/freebsd/secure/lib/libpkgecc/
H A DMakefile116 .PATH: $(SRCTOP)/crypto/libecc/src/ecdh

123