Home
last modified time | relevance | path

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

123456

/third_party/mbedtls/programs/test/
Dbenchmark.c515 rsa, dhm, ecdsa, ecdh; member
593 todo.ecdh = 1; in main()
1089 if (todo.ecdh) { in main()
1090 mbedtls_ecdh_context ecdh; in main() local
1127 mbedtls_ecdh_init(&ecdh); in main()
1129 CHECK_AND_CONTINUE(mbedtls_ecp_group_load(&ecdh.grp, curve_info->grp_id)); in main()
1130 CHECK_AND_CONTINUE(mbedtls_ecdh_make_public(&ecdh, &olen, buf, sizeof(buf), in main()
1132 CHECK_AND_CONTINUE(mbedtls_ecp_copy(&ecdh.Qp, &ecdh.Q)); in main()
1137 CHECK_AND_CONTINUE(mbedtls_ecdh_make_public(&ecdh, &olen, buf, sizeof(buf), in main()
1139 CHECK_AND_CONTINUE(mbedtls_ecdh_calc_secret(&ecdh, &olen, buf, sizeof(buf), in main()
[all …]
/third_party/node/deps/openssl/openssl/crypto/ec/
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()
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
/third_party/openssl/crypto/ec/
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()
/third_party/node/src/crypto/
Dcrypto_ec.cc160 ECDH* ecdh; in GenerateKeys() local
161 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder()); in GenerateKeys()
163 if (!EC_KEY_generate_key(ecdh->key_.get())) in GenerateKeys()
201 ECDH* ecdh; in ComputeSecret() local
202 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder()); in ComputeSecret()
206 if (!ecdh->IsKeyPairValid()) in ComputeSecret()
211 ecdh->group_, in ComputeSecret()
224 int field_size = EC_GROUP_get_degree(ecdh->group_); in ComputeSecret()
230 bs->Data(), bs->ByteLength(), pub.get(), ecdh->key_.get(), nullptr)) in ComputeSecret()
245 ECDH* ecdh; in GetPublicKey() local
[all …]
/third_party/mbedtls/tests/suites/
Dtest_suite_ecdh.function2 #include "mbedtls/ecdh.h"
376 mbedtls_ecdh_context ecdh;
381 mbedtls_ecdh_init(&ecdh);
395 &ecdh, &our_key, MBEDTLS_ECDH_OURS) == 0);
397 &ecdh, &their_key, MBEDTLS_ECDH_THEIRS) == 0);
400 &ecdh, &their_key, MBEDTLS_ECDH_THEIRS) == 0);
402 &ecdh, &our_key, MBEDTLS_ECDH_OURS) == 0);
407 &ecdh,
416 mbedtls_ecdh_free(&ecdh);
433 mbedtls_ecdh_context ecdh;
[all …]
Dtest_suite_ecdh.data84 ecdh calc_secret: ours first (Alice), curve25519 (rfc 7748)
88 ecdh calc_secret: theirs first (Alice), curve25519 (rfc 7748)
92 ecdh calc_secret: ours first (Bob), curve25519 (rfc 7748)
Dtest_suite_ecp.data60 # see https://cr.yp.to/ecdh.html#validate
65 # see https://cr.yp.to/ecdh.html#validate
70 # see https://cr.yp.to/ecdh.html#validate
75 # see https://cr.yp.to/ecdh.html#validate
80 # see https://cr.yp.to/ecdh.html#validate
85 # see https://cr.yp.to/ecdh.html#validate
90 # see https://cr.yp.to/ecdh.html#validate
95 # see https://cr.yp.to/ecdh.html#validate
100 # see https://cr.yp.to/ecdh.html#validate
105 # see https://cr.yp.to/ecdh.html#validate
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dcrypto_wolfssl.c1710 struct crypto_ecdh *ecdh = NULL; in crypto_ecdh_init() local
1717 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
1718 if (!ecdh) in crypto_ecdh_init()
1721 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
1722 if (!ecdh->ec) in crypto_ecdh_init()
1725 ret = wc_ecc_make_key_ex(&rng, ecdh->ec->key.dp->size, &ecdh->ec->key, in crypto_ecdh_init()
1726 ecdh->ec->key.dp->id); in crypto_ecdh_init()
1733 return ecdh; in crypto_ecdh_init()
1735 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
1736 ecdh = NULL; in crypto_ecdh_init()
[all …]
Dcrypto_openssl.c2059 struct crypto_ecdh *ecdh; in crypto_ecdh_init() local
2064 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
2065 if (!ecdh) in crypto_ecdh_init()
2068 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
2069 if (!ecdh->ec) in crypto_ecdh_init()
2072 ec_params = EC_KEY_new_by_curve_name(ecdh->ec->nid); in crypto_ecdh_init()
2097 if (EVP_PKEY_keygen(kctx, &ecdh->pkey) != 1) { in crypto_ecdh_init()
2108 return ecdh; in crypto_ecdh_init()
2110 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
2111 ecdh = NULL; in crypto_ecdh_init()
[all …]
Dcrypto.h992 struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y);
1003 struct wpabuf * crypto_ecdh_set_peerkey(struct crypto_ecdh *ecdh, int inc_y,
1010 void crypto_ecdh_deinit(struct crypto_ecdh *ecdh);
1017 size_t crypto_ecdh_prime_len(struct crypto_ecdh *ecdh);
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
Dcrypto_openssl.c1971 struct crypto_ecdh *ecdh; in crypto_ecdh_init() local
1976 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
1977 if (!ecdh) in crypto_ecdh_init()
1980 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
1981 if (!ecdh->ec) in crypto_ecdh_init()
1984 ec_params = EC_KEY_new_by_curve_name(ecdh->ec->nid); in crypto_ecdh_init()
2009 if (EVP_PKEY_keygen(kctx, &ecdh->pkey) != 1) { in crypto_ecdh_init()
2020 return ecdh; in crypto_ecdh_init()
2022 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
2023 ecdh = NULL; in crypto_ecdh_init()
[all …]
Dcrypto_wolfssl.c1728 struct crypto_ecdh *ecdh = NULL; in crypto_ecdh_init() local
1735 ecdh = os_zalloc(sizeof(*ecdh)); in crypto_ecdh_init()
1736 if (!ecdh) in crypto_ecdh_init()
1739 ecdh->ec = crypto_ec_init(group); in crypto_ecdh_init()
1740 if (!ecdh->ec) in crypto_ecdh_init()
1743 ret = wc_ecc_make_key_ex(&rng, ecdh->ec->key.dp->size, &ecdh->ec->key, in crypto_ecdh_init()
1744 ecdh->ec->key.dp->id); in crypto_ecdh_init()
1751 return ecdh; in crypto_ecdh_init()
1753 crypto_ecdh_deinit(ecdh); in crypto_ecdh_init()
1754 ecdh = NULL; in crypto_ecdh_init()
[all …]
Dcrypto.h926 struct wpabuf * crypto_ecdh_get_pubkey(struct crypto_ecdh *ecdh, int inc_y);
927 struct wpabuf * crypto_ecdh_set_peerkey(struct crypto_ecdh *ecdh, int inc_y,
929 void crypto_ecdh_deinit(struct crypto_ecdh *ecdh);
/third_party/mbedtls/library/
Ddebug.c345 const mbedtls_ecdh_context *ecdh, in mbedtls_debug_printf_ecdh_internal() argument
349 const mbedtls_ecdh_context *ctx = ecdh; in mbedtls_debug_printf_ecdh_internal()
351 const mbedtls_ecdh_context_mbed *ctx = &ecdh->ctx.mbed_ecdh; in mbedtls_debug_printf_ecdh_internal()
374 const mbedtls_ecdh_context *ecdh, in mbedtls_debug_printf_ecdh() argument
378 mbedtls_debug_printf_ecdh_internal(ssl, level, file, line, ecdh, attr); in mbedtls_debug_printf_ecdh()
380 switch (ecdh->var) { in mbedtls_debug_printf_ecdh()
382 mbedtls_debug_printf_ecdh_internal(ssl, level, file, line, ecdh, in mbedtls_debug_printf_ecdh()
Dpsa_crypto_ecp.c515 mbedtls_ecdh_context ecdh; in mbedtls_psa_key_agreement_ecdh() local
518 mbedtls_ecdh_init(&ecdh); in mbedtls_psa_key_agreement_ecdh()
531 mbedtls_ecdh_get_params(&ecdh, their_key, MBEDTLS_ECDH_THEIRS)); in mbedtls_psa_key_agreement_ecdh()
536 mbedtls_ecdh_get_params(&ecdh, ecp, MBEDTLS_ECDH_OURS)); in mbedtls_psa_key_agreement_ecdh()
542 mbedtls_ecdh_calc_secret(&ecdh, in mbedtls_psa_key_agreement_ecdh()
557 mbedtls_ecdh_free(&ecdh); in mbedtls_psa_key_agreement_ecdh()
/third_party/mbedtls/include/mbedtls/
Ddebug.h67 #define MBEDTLS_SSL_DEBUG_ECDH(level, ecdh, attr) \ argument
68 mbedtls_debug_printf_ecdh(ssl, level, __FILE__, __LINE__, ecdh, attr)
79 #define MBEDTLS_SSL_DEBUG_ECDH(level, ecdh, attr) do { } while (0) argument
304 const mbedtls_ecdh_context *ecdh,
/third_party/openssl/doc/man3/
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>.
/third_party/node/test/parallel/
Dtest-crypto-dh-constructor.js31 const ecdh = ECDH('prime256v1'); constant
32 assert(ecdh instanceof ECDH, 'ECDH is expected to return a new instance ' +
/third_party/nghttp2/examples/
Dlibevent-server.c162 EC_KEY *ecdh; in create_ssl_ctx() local
163 ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); in create_ssl_ctx()
164 if (!ecdh) { in create_ssl_ctx()
168 SSL_CTX_set_tmp_ecdh(ssl_ctx, ecdh); in create_ssl_ctx()
169 EC_KEY_free(ecdh); in create_ssl_ctx()
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jws/
DREADME.md33 $ lws-crypto-jwk -t EC -v P-256 --public key-ecdh-p-256.pub >key-ecdh-p-256.private
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jwe/
DREADME.md33 $ lws-crypto-jwk -t EC -v P-256 --public key-ecdh-p-256.pub >key-ecdh-p-256.private
/third_party/mbedtls/scripts/
Decc-heap.sh92 programs/test/benchmark ecdh ecdsa
/third_party/libwebsockets/lib/tls/openssl/
Dopenssl-server.c165 EC_KEY *ecdh, *EC_key = NULL; local
436 ecdh = EC_KEY_new_by_curve_name(ecdh_nid);
437 if (NULL == ecdh) {
441 SSL_CTX_set_tmp_ecdh(vhost->tls.ssl_ctx, ecdh);
442 EC_KEY_free(ecdh);
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant/
Dpasn_supplicant.c683 pubkey = crypto_ecdh_get_pubkey(pasn->ecdh, 0); in wpas_pasn_build_auth_1()
684 pubkey = wpabuf_zeropad(pubkey, crypto_ecdh_prime_len(pasn->ecdh)); in wpas_pasn_build_auth_1()
858 crypto_ecdh_deinit(pasn->ecdh); in wpas_pasn_reset()
859 pasn->ecdh = NULL; in wpas_pasn_reset()
1064 pasn->ecdh = crypto_ecdh_init(group); in wpas_pasn_start()
1065 if (!pasn->ecdh) { in wpas_pasn_start()
1303 if (!wpa_s->pasn.ecdh) in wpas_pasn_auth_stop()
1493 secret = crypto_ecdh_set_peerkey(pasn->ecdh, inc_y, in wpas_pasn_auth_rx()

123456