-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Restrict MBEDTLS_X509_RSASSA_PSS_SUPPORT #8154
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
Comments
If I understood correctly this document explains the difference between legacy RSA and PSA for what concerns RSA-PSS signature. However this issue is about
Reading that document further though I found this paragraph:
So albeit legacy and PSA support different options, it seems that X.509 already checks and enforces the "PSA way" (i.e. the stricter in terms of requirements). It seems to me that the only missing part that should be checked is the salt length. Am I wrong? |
Good question, I agree it's not very clear from the issue description.
Not entirely. Part of the enforcement is done on the X.509 side (message hash = encoding hash) but the other (encoding hash = mgf1 hash) is done on the PK side. We'll like everything to be enforce on the X.509 side. Looking at the code, it actually goes a bit deeper than that: currently the X.509 code uses I suggest the following course of action, trying to avoid inter-dependent crypto/x509 PRs:
Note that ensuring Note on this issue's scope: the title and description make it look like it's about X.509 but the labels say component-crypto. Given this existing inconsistency, I'm not feeling bad about suggesting a plan that involves changes on both sides :) |
A SHA-1 default has been obsolete for a while. Maybe we should stop accepting certificates where the PSS parameters are omitted? Or would that be problematic even today, maybe for some root CA? |
@mpg thanks for the workflow, but I have a question. Having the 2 PRs independent from each other it means that in the tf-psa-crypto one I cannot remove |
Yes, that sounds correct. I think it's one of this situations where we can either have only 2 PRs but then they're inter-dependent, or we can avoid the inter-dependency but then need 3 PRs. Considering inter-dependent PRs are a pain, I think it's worth trying the 3-PR way here. |
Restrict the
MBEDTLS_X509_RSASSA_PSS_SUPPORT
option, and corresponding code from the library, to only what PSA supports (no funny hash combination or force salt length).The text was updated successfully, but these errors were encountered: