You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MBEDTLS_RSA_NO_CRT is a compromise between features, performance and code size:
When enabled, the Mbed TLS 3.x rsa.h interface can import private keys without the private exponent, and can export keys with the CRT parameters.
When enabled, RSA private key operations are slower.
When enabled, the size of rsa.o is smaller.
I am not aware of a security impact. Enabling MBEDTLS_RSA_NO_CRT avoids a classic glitch attack on RSA signature operations that can leak the private key, but we mitigate against that attack even when MBEDTLS_RSA_NO_CRT is disabled by checking that the calculated signature passes verification.
TF-PSA-Crypto removes rsa.h from the public API. Therefore MBEDTLS_RSA_NO_CRT no longer has a direct impact on the API. Furthermore, the PSA export format includes CRT parameters, so PSA requires CRT parameters. (However, everything might just work with MBEDTLS_RSA_NO_CRT disabled, because CRT parameters are available after generating a key, and they must be present on import, so our code just needs to copy them around, it doesn't have to calculate with them.)
That leaves MBEDTLS_RSA_NO_CRT as just a performance/code-size compromise, only for RSA private-key operations. This is not very useful and I think we should just remove it from TF-PSA-Crypto 1.0.
Arguably, given that there is no functional impact, we could make the option a no-op in a minor release.
The text was updated successfully, but these errors were encountered:
MBEDTLS_RSA_NO_CRT
is a compromise between features, performance and code size:rsa.h
interface can import private keys without the private exponent, and can export keys with the CRT parameters.rsa.o
is smaller.MBEDTLS_RSA_NO_CRT
avoids a classic glitch attack on RSA signature operations that can leak the private key, but we mitigate against that attack even whenMBEDTLS_RSA_NO_CRT
is disabled by checking that the calculated signature passes verification.TF-PSA-Crypto removes
rsa.h
from the public API. ThereforeMBEDTLS_RSA_NO_CRT
no longer has a direct impact on the API. Furthermore, the PSA export format includes CRT parameters, so PSA requires CRT parameters. (However, everything might just work withMBEDTLS_RSA_NO_CRT
disabled, because CRT parameters are available after generating a key, and they must be present on import, so our code just needs to copy them around, it doesn't have to calculate with them.)That leaves
MBEDTLS_RSA_NO_CRT
as just a performance/code-size compromise, only for RSA private-key operations. This is not very useful and I think we should just remove it from TF-PSA-Crypto 1.0.Arguably, given that there is no functional impact, we could make the option a no-op in a minor release.
The text was updated successfully, but these errors were encountered: