From 44243278a59fdb6e12daa3f75d5c4c18064f4089 Mon Sep 17 00:00:00 2001 From: Elms Date: Mon, 7 Dec 2020 13:41:35 -0800 Subject: [PATCH] SiLabs: renable ecc_ssh_test and disable AES non-12Byte IV --- wolfcrypt/src/ecc.c | 8 +++++--- wolfcrypt/src/port/silabs/README.md | 11 ----------- wolfcrypt/test/test.c | 2 -- wolfssl/wolfcrypt/ecc.h | 3 +-- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index bf1d6b7cb..81314c85d 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -4184,7 +4184,8 @@ static int ecc_make_pub_ex(ecc_key* key, ecc_curve_spec* curveIn, ecc_point* pubOut, WC_RNG* rng) { int err = MP_OKAY; -#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) +#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) \ + && !defined(WOLFSSL_SILABS_SE_ACCEL) #if !defined(WOLFSSL_SP_MATH) ecc_point* base = NULL; #endif @@ -4198,7 +4199,8 @@ static int ecc_make_pub_ex(ecc_key* key, ecc_curve_spec* curveIn, return BAD_FUNC_ARG; } -#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) +#if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_ATECC608A) \ + && !defined(WOLFSSL_SILABS_SE_ACCEL) /* if ecc_point passed in then use it as output for public key point */ if (pubOut != NULL) { @@ -4321,7 +4323,7 @@ static int ecc_make_pub_ex(ecc_key* key, ecc_curve_spec* curveIn, #else (void)curveIn; err = NOT_COMPILED_IN; -#endif /* WOLFSSL_ATECC508A */ +#endif /* WOLFSSL_ATECC508A || WOLFSSL_SILABS_SE_ACCEL */ /* change key state if public part is cached */ if (key->type == ECC_PRIVATEKEY_ONLY && pubOut == NULL) { diff --git a/wolfcrypt/src/port/silabs/README.md b/wolfcrypt/src/port/silabs/README.md index 101d77025..bd952ba37 100644 --- a/wolfcrypt/src/port/silabs/README.md +++ b/wolfcrypt/src/port/silabs/README.md @@ -63,18 +63,7 @@ ECDSA 256 verify 148 ops took 1.001 sec, avg 6.764 ms, 147.852 ops/sec ### Benchmarks and Memory Use -Software only implementation (SILABS_SE_ACCEL, Fast Math): -``` -``` - -Memory Use: - -``` -Peak Stack: -Peak Heap: -Total: -``` # Support diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 6e6a15e8d..00f5ce35b 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -20796,7 +20796,6 @@ static int ecc_ssh_test(ecc_key* key, WC_RNG* rng) (void)rng; #endif -#if !defined(WOLFSSL_SILABS_SE_ACCEL) /* Use API. */ ret = 0; do { @@ -20808,7 +20807,6 @@ static int ecc_ssh_test(ecc_key* key, WC_RNG* rng) } while (ret == WC_PENDING_E); if (ret != 0) return -10085; -#endif TEST_SLEEP(); return 0; diff --git a/wolfssl/wolfcrypt/ecc.h b/wolfssl/wolfcrypt/ecc.h index fec3bdd82..97b070ea2 100644 --- a/wolfssl/wolfcrypt/ecc.h +++ b/wolfssl/wolfcrypt/ecc.h @@ -522,8 +522,7 @@ int wc_ecc_shared_secret_ex(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) || \ - defined(WOLFSSL_SILABS_SE_ACCEL) + defined(PLUTON_CRYPTO_ECC) || defined(WOLFSSL_CRYPTOCELL) #define wc_ecc_shared_secret_ssh wc_ecc_shared_secret #else #define wc_ecc_shared_secret_ssh wc_ecc_shared_secret_ex /* For backwards compat */