Skip to content

Commit 3f96c4d

Browse files
committed
benchmark: Enable RSA benchmarks
The current Mbed TLS benchmark application requires MBEDTLS_GENPRIME (RSA key generation) to be enabled in order to benchmark RSA. Mbed OS doesn't enable MBEDTLS_GENPRIME by default, so add it to our application-specific Mbed TLS configuration file. Update the expected log output to reflect the freshly enabled RSA benchmarks.
1 parent 5724c14 commit 3f96c4d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

benchmark/mbedtls_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
#define MBEDTLS_RSA_C
9090
#endif
9191

92+
#if !defined(MBEDTLS_GENPRIME)
93+
#define MBEDTLS_GENPRIME
94+
#endif
95+
9296
#if !defined(MBEDTLS_ECDSA_C)
9397
#define MBEDTLS_ECDSA_C
9498
#endif

tests/benchmark.log

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
\s+HMAC_DRBG SHA-1 (PR)\s*:\s*\d+ KB/s,\s*\d+ cycles/byte
3737
\s+HMAC_DRBG SHA-256 (NOPR)\s*:\s*\d+ KB/s,\s*\d+ cycles/byte
3838
\s+HMAC_DRBG SHA-256 (PR)\s*:\s*\d+ KB/s,\s*\d+ cycles/byte
39+
\s+RSA-2048\s*:\s*\d+ public/s
40+
\s+RSA-2048\s*:\s*\d+ private/s
41+
\s+RSA-4096\s*:\s*\d+ public/s
42+
\s+RSA-4096\s*:\s*\d+ private/s
3943
\s+ECDSA-secp384r1\s*:\s*\d+ sign/s
4044
\s+ECDSA-secp256r1\s*:\s*\d+ sign/s
4145
\s+ECDSA-secp384r1\s*:\s*\d+ verify/s

0 commit comments

Comments
 (0)