Added support for RSASSA-PSS padding algorithms#417
Added support for RSASSA-PSS padding algorithms#417MasonCitywide wants to merge 6 commits intorustls:mainfrom
Conversation
djc
left a comment
There was a problem hiding this comment.
The changes here look okay so far, but CI doesn't pass and we'll want to make sure there some tests exercising this against a different backend (maybe OpenSSL)?
|
The first build was failing because the algorithms I implemented had the same OIDs. However, RSA-PSS algorithms are supposed to have the same OIDs and are instead differentiated by their hash algorithm OIDs (RFC 4055, pgs. 8, 9, 15). So, I changed the I checked CSR generation with all three algorithms, and it worked, but only with After trying for several hours, I can't get the project to build with OpenSSL. Unfortunately, I don't think I have more time to dedicate to this PR. If anyone would like to take it from here, I am quite sure the code works, I just can't write proper OpenSSL tests. |
Added algorithms to
sign_algo.rsPKCS_RSA_PSS_SHA256,PKCS_RSA_PSS_SHA384, andPKCS_RSA_PSS_SHA512.A half implemented version of
PKCS_RSA_PSS_SHA256already existed with a comment saying this doesn't work becauseringhasn't implemented PSS padding (here). It seems that since then it has (here), and that comment was made before the release ofaws-lc-rs.There was also an issue in the pre-existing
PKCS_RSA_PSS_SHA256function in which the salt length was set to the default 20 instead of the recommended value of the number of octets of the hash algorithm (RFC 4055, pg. 9).This is an important change as, if I am reading it correctly, non-PSS padding has been deprecated since RFC 8446 (pg. 70), with security concerns like ROBOT.
I was able to successfully create CSRs using all three of these algorithms using the
aws-lc-rsbackend. However, I'm not familiar with the unit testing of this library and I am new to contributions, so I would appreciate an independant review of these additions before they are merged.Thank you for your time,
MC