From a858f1683d94322affec76c85acdaea2d7d92cc3 Mon Sep 17 00:00:00 2001 From: Ashish Sharma Date: Thu, 2 Apr 2026 16:21:58 +0800 Subject: [PATCH] fix(mbedtls): reenable RSA 4096 bit key performance test --- components/mbedtls/test_apps/include/crypto_performance.h | 4 ++-- components/mbedtls/test_apps/main/test_psa_rsa.c | 2 +- components/mbedtls/test_apps/sdkconfig.ci.aes_no_hw | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/mbedtls/test_apps/include/crypto_performance.h b/components/mbedtls/test_apps/include/crypto_performance.h index ffef876ffc..302b92eab9 100644 --- a/components/mbedtls/test_apps/include/crypto_performance.h +++ b/components/mbedtls/test_apps/include/crypto_performance.h @@ -44,7 +44,7 @@ #define IDF_PERFORMANCE_MAX_RSA_2048KEY_PRIVATE_OP 650000 #define IDF_PERFORMANCE_MAX_RSA_3072KEY_PUBLIC_OP 36000 #define IDF_PERFORMANCE_MAX_RSA_3072KEY_PRIVATE_OP 960000 -#define IDF_PERFORMANCE_MAX_RSA_4096KEY_PUBLIC_OP 62000 +#define IDF_PERFORMANCE_MAX_RSA_4096KEY_PUBLIC_OP 70000 #define IDF_PERFORMANCE_MAX_RSA_4096KEY_PRIVATE_OP 2850000 #elif CONFIG_IDF_TARGET_ESP32S3 @@ -58,7 +58,7 @@ #define IDF_PERFORMANCE_MAX_RSA_2048KEY_PRIVATE_OP 700000 #define IDF_PERFORMANCE_MAX_RSA_3072KEY_PUBLIC_OP 45000 #define IDF_PERFORMANCE_MAX_RSA_3072KEY_PRIVATE_OP 1300000 -#define IDF_PERFORMANCE_MAX_RSA_4096KEY_PUBLIC_OP 80000 +#define IDF_PERFORMANCE_MAX_RSA_4096KEY_PUBLIC_OP 90000 #define IDF_PERFORMANCE_MAX_RSA_4096KEY_PRIVATE_OP 3500000 #elif CONFIG_IDF_TARGET_ESP32C2 diff --git a/components/mbedtls/test_apps/main/test_psa_rsa.c b/components/mbedtls/test_apps/main/test_psa_rsa.c index b9db2df261..1330a5a152 100644 --- a/components/mbedtls/test_apps/main/test_psa_rsa.c +++ b/components/mbedtls/test_apps/main/test_psa_rsa.c @@ -293,7 +293,7 @@ TEST_CASE("test performance RSA key operations", "[bignum]") if (keysize == PSA_RSA_KEY_SIZE_2048) { TEST_PERFORMANCE_CCOMP_LESS_THAN(RSA_2048KEY_PUBLIC_OP, "%d us", public_perf); TEST_PERFORMANCE_CCOMP_LESS_THAN(RSA_2048KEY_PRIVATE_OP, "%d us", private_perf); - } else if (keysize == 4096) { + } else if (keysize == PSA_RSA_KEY_SIZE_4096) { TEST_PERFORMANCE_CCOMP_LESS_THAN(RSA_4096KEY_PUBLIC_OP, "%d us", public_perf); TEST_PERFORMANCE_CCOMP_LESS_THAN(RSA_4096KEY_PRIVATE_OP, "%d us", private_perf); } diff --git a/components/mbedtls/test_apps/sdkconfig.ci.aes_no_hw b/components/mbedtls/test_apps/sdkconfig.ci.aes_no_hw index aadb89a893..a41285ede3 100644 --- a/components/mbedtls/test_apps/sdkconfig.ci.aes_no_hw +++ b/components/mbedtls/test_apps/sdkconfig.ci.aes_no_hw @@ -1,2 +1 @@ CONFIG_MBEDTLS_HARDWARE_AES=n -CONFIG_MBEDTLS_MPI_USE_INTERRUPT=n