Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -25052,14 +25052,15 @@ static int test_wc_ecc_pointFns(void)


/*
* Testing wc_ecc_sahred_secret_ssh()
* Testing wc_ecc_shared_secret_ssh()
*/
static int test_wc_ecc_shared_secret_ssh(void)
{
EXPECT_DECLS;
#if defined(HAVE_ECC) && defined(HAVE_ECC_DHE) && \
!defined(WC_NO_RNG) && !defined(WOLFSSL_ATECC508A) && \
!defined(WOLFSSL_ATECC608A)
!defined(WOLFSSL_ATECC608A) && !defined(PLUTON_CRYPTO_ECC) && \
!defined(WOLFSSL_CRYPTOCELL)
ecc_key key;
ecc_key key2;
WC_RNG rng;
Expand Down
6 changes: 3 additions & 3 deletions wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2497,9 +2497,9 @@ int wolfSSL_EVP_PKEY_derive(WOLFSSL_EVP_PKEY_CTX *ctx, unsigned char *key, size_
#endif
return WOLFSSL_FAILURE;
}
if (wc_ecc_shared_secret_ssh((ecc_key*)ctx->pkey->ecc->internal,
(ecc_point*)ctx->peerKey->ecc->pub_key->internal,
key, &len32) != MP_OKAY) {
if (wc_ecc_shared_secret((ecc_key*)ctx->pkey->ecc->internal,
(ecc_key*)ctx->peerKey->ecc->internal, key, &len32)
!= MP_OKAY) {
WOLFSSL_MSG("wc_ecc_shared_secret failed");
#if defined(ECC_TIMING_RESISTANT) && !defined(HAVE_SELFTEST) \
&& (!defined(HAVE_FIPS) || \
Expand Down
4 changes: 3 additions & 1 deletion wolfcrypt/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28310,7 +28310,9 @@ static wc_test_ret_t ecc_mulmod_test(ecc_key* key1)
#endif

#if defined(HAVE_ECC_DHE) && !defined(WC_NO_RNG) && \
!defined(WOLF_CRYPTO_CB_ONLY_ECC)
!defined(WOLF_CRYPTO_CB_ONLY_ECC) && !defined(WOLFSSL_ATECC508A) && \
!defined(WOLFSSL_ATECC608A) && !defined(PLUTON_CRYPTO_ECC) && \
!defined(WOLFSSL_CRYPTOCELL)
static wc_test_ret_t ecc_ssh_test(ecc_key* key, WC_RNG* rng)
{
wc_test_ret_t ret;
Expand Down
6 changes: 2 additions & 4 deletions wolfssl/wolfcrypt/ecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,8 @@ WOLFSSL_LOCAL
int wc_ecc_shared_secret_gen_sync(ecc_key* private_key,
ecc_point* point, byte* out, word32* outlen);

#if defined(WOLFSSL_ATECC508A) || defined(WOLFSSL_ATECC608A) || \
defined(PLUTON_CRYPTO_ECC) || defined(WOLFSSL_CRYPTOCELL)
#define wc_ecc_shared_secret_ssh wc_ecc_shared_secret
#else
#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) && \
!defined(PLUTON_CRYPTO_ECC) && !defined(WOLFSSL_CRYPTOCELL)
#define wc_ecc_shared_secret_ssh wc_ecc_shared_secret_ex /* For backwards compat */
#endif

Expand Down