mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(mbedtls): updates crypto performance numbers
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
// Some resources are lazy allocated in wifi and lwip
|
||||
#define TEST_MEMORY_LEAK_THRESHOLD (-1596)
|
||||
#define TEST_MEMORY_LEAK_THRESHOLD (-1896)
|
||||
|
||||
static size_t before_free_8bit;
|
||||
static size_t before_free_32bit;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// #define TEST_MEMORY_LEAK_THRESHOLD (-1546)
|
||||
// With PSA Migration, there is an increase in memory usage.
|
||||
// TODO: Check why this is happening and fix it.
|
||||
#define TEST_MEMORY_LEAK_THRESHOLD (-1750)
|
||||
#define TEST_MEMORY_LEAK_THRESHOLD (-1850)
|
||||
|
||||
static size_t before_free_8bit;
|
||||
static size_t before_free_32bit;
|
||||
|
||||
@@ -190,3 +190,6 @@
|
||||
#undef PSA_WANT_ALG_TLS12_PRF
|
||||
#undef PSA_WANT_ALG_PBKDF2_HMAC
|
||||
#undef PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128
|
||||
|
||||
/* ESP-TEE is single threaded so we can disable threading in mbedTLS */
|
||||
#undef MBEDTLS_THREADING_C
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define IDF_PERFORMANCE_MAX_TIME_SHA1_32KB 5000
|
||||
#define IDF_PERFORMANCE_MAX_TIME_SHA512_32KB 4500
|
||||
|
||||
#define IDF_PERFORMANCE_MAX_RSA_2048KEY_PUBLIC_OP 19000
|
||||
#define IDF_PERFORMANCE_MAX_RSA_2048KEY_PUBLIC_OP 21500
|
||||
#define IDF_PERFORMANCE_MAX_RSA_2048KEY_PRIVATE_OP 750000
|
||||
#define IDF_PERFORMANCE_MAX_RSA_3072KEY_PUBLIC_OP 33000
|
||||
#define IDF_PERFORMANCE_MAX_RSA_3072KEY_PRIVATE_OP 950000
|
||||
@@ -40,7 +40,7 @@
|
||||
#define IDF_PERFORMANCE_MAX_TIME_SHA1_32KB 900
|
||||
#define IDF_PERFORMANCE_MAX_TIME_SHA512_32KB 900
|
||||
|
||||
#define IDF_PERFORMANCE_MAX_RSA_2048KEY_PUBLIC_OP 15500
|
||||
#define IDF_PERFORMANCE_MAX_RSA_2048KEY_PUBLIC_OP 17000
|
||||
#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
|
||||
|
||||
@@ -38,7 +38,7 @@ TEST_CASE("psa SHA256 performance", "[mbedtls]")
|
||||
TEST_ASSERT_NOT_NULL(buf);
|
||||
memset(buf, 0x55, CALL_SZ);
|
||||
|
||||
ccomp_timer_start();
|
||||
TEST_ESP_OK(ccomp_timer_start());
|
||||
for (int c = 0; c < CALLS; c++) {
|
||||
status = psa_hash_update(&operation, buf, CALL_SZ);
|
||||
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
|
||||
@@ -47,6 +47,7 @@ TEST_CASE("psa SHA256 performance", "[mbedtls]")
|
||||
status = psa_hash_finish(&operation, sha256, sizeof(sha256), &hash_length);
|
||||
TEST_ASSERT_EQUAL(PSA_SUCCESS, status);
|
||||
elapsed_usec = ccomp_timer_stop();
|
||||
TEST_ASSERT_GREATER_THAN(0, elapsed_usec);
|
||||
|
||||
free(buf);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user