Home
last modified time | relevance | path

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

123

/third_party/mbedtls/programs/test/
Dbenchmark.c543 rsa, dhm, ecdsa, ecdh; member
625 todo.ecdh = 1; in main()
1123 if( todo.ecdh ) in main()
1125 mbedtls_ecdh_context ecdh; in main() local
1161 mbedtls_ecdh_init( &ecdh ); in main()
1163 CHECK_AND_CONTINUE( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) ); in main()
1164 CHECK_AND_CONTINUE( mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in main()
1166 CHECK_AND_CONTINUE( mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) ); in main()
1167 ecp_clear_precomputed( &ecdh.grp ); in main()
1172 CHECK_AND_CONTINUE( mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in main()
[all …]
/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()
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
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);
/third_party/mbedtls/tests/suites/
Dtest_suite_ecdh.function2 #include "mbedtls/ecdh.h"
374 mbedtls_ecdh_context ecdh;
379 mbedtls_ecdh_init( &ecdh );
392 &ecdh, &our_key, MBEDTLS_ECDH_OURS ) == 0 );
394 &ecdh, &their_key, MBEDTLS_ECDH_THEIRS ) == 0 );
399 &ecdh, &their_key, MBEDTLS_ECDH_THEIRS ) == 0 );
401 &ecdh, &our_key, MBEDTLS_ECDH_OURS ) == 0 );
406 &ecdh,
415 mbedtls_ecdh_free( &ecdh );
432 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.c376 const mbedtls_ecdh_context *ecdh, in mbedtls_debug_printf_ecdh_internal() argument
380 const mbedtls_ecdh_context* ctx = ecdh; in mbedtls_debug_printf_ecdh_internal()
382 const mbedtls_ecdh_context_mbed* ctx = &ecdh->ctx.mbed_ecdh; in mbedtls_debug_printf_ecdh_internal()
406 const mbedtls_ecdh_context *ecdh, in mbedtls_debug_printf_ecdh() argument
410 mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh, attr ); in mbedtls_debug_printf_ecdh()
412 switch( ecdh->var ) in mbedtls_debug_printf_ecdh()
415 mbedtls_debug_printf_ecdh_internal( ssl, level, file, line, ecdh, in mbedtls_debug_printf_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
303 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/deps/npm/node_modules/sshpk/lib/
Ddhe.js21 var ecdh, ec, jsbn; variable
46 if (ecdh === undefined)
47 ecdh = require('ecc-jsbn');
377 if (ecdh === undefined)
378 ecdh = require('ecc-jsbn');
/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/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.c678 pubkey = crypto_ecdh_get_pubkey(pasn->ecdh, 0); in wpas_pasn_build_auth_1()
679 pubkey = wpabuf_zeropad(pubkey, crypto_ecdh_prime_len(pasn->ecdh)); in wpas_pasn_build_auth_1()
853 crypto_ecdh_deinit(pasn->ecdh); in wpas_pasn_reset()
854 pasn->ecdh = NULL; in wpas_pasn_reset()
1059 pasn->ecdh = crypto_ecdh_init(group); in wpas_pasn_start()
1060 if (!pasn->ecdh) { in wpas_pasn_start()
1298 if (!wpa_s->pasn.ecdh) in wpas_pasn_auth_stop()
1488 secret = crypto_ecdh_set_peerkey(pasn->ecdh, inc_y, in wpas_pasn_auth_rx()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Ddpp_crypto.c484 struct crypto_ecdh *ecdh; in dpp_ecdh() local
490 ecdh = crypto_ecdh_init2(crypto_ec_key_group(own), own); in dpp_ecdh()
491 if (!ecdh) { in dpp_ecdh()
503 secret_buf = crypto_ecdh_set_peerkey(ecdh, 1, wpabuf_head(peer_pub), in dpp_ecdh()
522 crypto_ecdh_deinit(ecdh); in dpp_ecdh()
1992 pfs->ecdh = crypto_ecdh_init(pfs->curve->ike_group); in dpp_pfs_init()
1993 if (!pfs->ecdh) in dpp_pfs_init()
1996 pub = crypto_ecdh_get_pubkey(pfs->ecdh, 0); in dpp_pfs_init()
2030 pfs->secret = crypto_ecdh_set_peerkey(pfs->ecdh, 0, peer_ie + 2, in dpp_pfs_process()
2046 crypto_ecdh_deinit(pfs->ecdh); in dpp_pfs_free()
/third_party/openssl/ohos_lite/crypto/ec/
Dec_local.h181 const EC_POINT *pub_key, const EC_KEY *ecdh);
615 const EC_POINT *pub_key, const EC_KEY *ecdh);
635 const EC_POINT *pub_key, const EC_KEY *ecdh);
637 const EC_POINT *pub_key, const EC_KEY *ecdh);
/third_party/node/src/
Dnode_crypto.cc5593 ECDH* ecdh; in GenerateKeys() local
5594 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder()); in GenerateKeys()
5596 if (!EC_KEY_generate_key(ecdh->key_.get())) in GenerateKeys()
5631 ECDH* ecdh; in ComputeSecret() local
5632 ASSIGN_OR_RETURN_UNWRAP(&ecdh, args.Holder()); in ComputeSecret()
5636 if (!ecdh->IsKeyPairValid()) in ComputeSecret()
5641 ecdh->group_, in ComputeSecret()
5651 int field_size = EC_GROUP_get_degree(ecdh->group_); in ComputeSecret()
5656 out.data(), out_len, pub.get(), ecdh->key_.get(), nullptr); in ComputeSecret()
5671 ECDH* ecdh; in GetPublicKey() local
[all …]

123