Skip to content

Remove non-default, memory-heavy tests from the benchmark application #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
1 change: 0 additions & 1 deletion benchmark/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ MBED_NOINLINE static int benchmark_rsa()
mbedtls_rsa_context *rsa;
const char *rsa_keys[] = {
RSA_PRIVATE_KEY_2048,
RSA_PRIVATE_KEY_4096,
};
size_t i;

Expand Down
4 changes: 0 additions & 4 deletions benchmark/mbedtls_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
#define MBEDTLS_RSA_C
#endif

#if !defined(MBEDTLS_DHM_C)
#define MBEDTLS_DHM_C
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@k-stachowiak: Thanks for the PR, but in my opinion this is not sufficient. I think you should explicitly use #undef if you want that particular feature to be disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andresag01 Thanks for the review.

This change was made based on the following reasoning: there are some features used here, that are not even enabled by default. Therefore, we should not enable them forcibly. Should, in the future, the features become enabled by default (and break this app), we may return to this issue, and e.g. explicitly disable them.

Looking at this from another perspective, there are probably more features in Mbed TLS that would break the benchmark, but we don't explicitly disable the in this file, since they are not enabled by default. Should DHM be treated specially in this case?

Please consider my arguments and confirm, if you think the feature should still be explicitly disabled.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

#if !defined(MBEDTLS_ECDSA_C)
#define MBEDTLS_ECDSA_C
#endif
Expand Down
6 changes: 0 additions & 6 deletions tests/benchmark.log
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@
\s+HMAC_DRBG SHA-256 \(PR\)\s*:\s*\d+ KB/s
\s+RSA-2048\s*:\s*\d+ ms/ public
\s+RSA-2048\s*:\s*\d+ ms/private
\s+RSA-4096\s*:\s*\d+ ms/ public
\s+RSA-4096\s*:\s*\d+ ms/private
\s+DHE-2048\s*:\s*\d+ ms/handshake
\s+DH-2048\s*:\s*\d+ ms/handshake
\s+DHE-3072\s*:\s*\d+ ms/handshake
\s+DH-3072\s*:\s*\d+ ms/handshake
\s+ECDSA-secp384r1\s*:\s*\d+ ms/sign
\s+ECDSA-secp256r1\s*:\s*\d+ ms/sign
\s+ECDSA-secp384r1\s*:\s*\d+ ms/verify
Expand Down