Open
Description
Background
We confirmed that we now could not pass a salt length through the rust-mbedtls
APIs. However it was found that the function rsa_rsassa_pss_sign_ext
does allow us to supply a salt length (note this is in the mbedtls-sys-auto
).
Note
When turning on tls13
feature, need to be careful to following PSA specific limitations
From mbedtls-sys/vendor/docs/architecture/psa-migration/psa-limitations.md :
- signature:
mbedtls_rsa_rsassa_pss_sign()
- message hashed externally
- encoding hash = MGF1 hash (from context, or argument = message hash)
- salt length: always using the maximum legal value
- signature:
mbedtls_rsa_rsassa_pss_sign_ext()
- message hashed externally
- encoding hash = MGF1 hash (from context, or argument = message hash)
- salt length: specified explicitly
Also may need to call psa_crypto_init
before any call to above functions.
Acceptance Criteria
- Update the
rust-mbedtls
to have a function that allows us to pass asalt_length
to the sign function or makes use of the current logic (where salt_length == hash_length) - Ensure there isn’t a performance degradation