-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Summary
Hey all,
I am testing mbedtls 3.6.5 and encountered a significant performance regression between v3.6.4 and v3.6.5 with RSA test suite, with approximately 35% increase in execution time (1.37s → 1.85s) for identical test coverage (250/250 tests passed).
I noticed the v3.6.5 release notes mention a fix for the SSBleed/M-Step timing side-channel vulnerability. I assume this performance change is the intentional cost of the mitigation, but I wanted to confirm if this is expected and understand if any optimizations are possible.
System information
Mbed TLS version (number or commit id): v3.6.4 (baseline) vs v3.6.5 (regression)
Operating system and version: macOS (Apple Silicon M3)
Configuration (if not default, please attach mbedtls_config.h): Default configuration
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): Default compiler (clang on macOS)
Expected behavior
I was expecting a minor release to not have a significant performance penalty.
Actual behavior
| Metric | v3.6.4 | v3.6.5 | % Change |
|---|---|---|---|
| Elapsed Time | 1.37s | 1.85s | +35.0% |
| User CPU Time | 1.36s | 1.84s | +35.3% |
| System Time | 0.01s | 0.01s | 0% |
Steps to reproduce
# v3.6.4
git clone https://github.com/Mbed-TLS/mbedtls.git && cd mbedtls
git checkout v3.6.4 && make clean && make
gtime -f "\nElapsed: %e seconds\nUser: %U\nSys: %S" ./tests/test_suite_rsa
# v3.6.5
git checkout v3.6.5 && make clean && make
gtime -f "\nElapsed: %e seconds\nUser: %U\nSys: %S" ./tests/test_suite_rsaResult: v3.6.5 takes ~35% longer than v3.6.4
Additional information
Questions:
- Is this the expected cost of the SSBleed/M-Step mitigation?
- Are there optimization opportunities to reduce the impact while maintaining security?
- Could there be configuration options for different threat models (e.g.,
MBEDTLS_ALLOW_VARIABLE_TIME_FOR_PERFORMANCEfor systems not vulnerable to SSBleed/M-Step)? - Should the release notes explicitly mention this performance impact for capacity planning?
We appreciate the security fix! We're looking for confirmation this is expected, guidance on threat model applicability, and possible configuration options for controlled environments where the additional overhead may be unnecessary.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status