-
Notifications
You must be signed in to change notification settings - Fork 19
Stop using RSA_* functions for signatures #57
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
Conversation
40bcb96 to
8d955ba
Compare
simo5
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general but I wonder why the change in behavior for msgIsHashed cases, I think we wanted to enforce hashing in the FIPS boundary in the past?
|
Afaik we later had to revert that enforcement as the crypto/rsa.SignPKCS1v15 takes hashed bytes and there are still some use of PKCS#1 v1.5 signatures in applications. |
For creating and verifying PKCS#1 v1.5 signatures in a pre-hashed
manner, we used the legacy RSA_sign and RSA_verify functions, which
bypass the system-wide disablement of SHA-1 and shorter RSA key length
usage inconsistently with the OpenSSL 3.0 default on RHEL.
This switches to using our _goboringcrypto_EVP_{sign,verify}_raw,
which internally use EVP_PKEY_ functions.
Signed-off-by: Daiki Ueno <[email protected]>
This switches _goboringcrypto_RSA_generate_key_fips to using EVP_PKEY_keygen function instead of RSA_generate_key_ex. The accessors functions around the RSA * type, such as RSA_get0_crt_params, are still used, though they are not a cryptographic operation so this patch leaves it as they are for now. Signed-off-by: Daiki Ueno <[email protected]>
Signed-off-by: Daiki Ueno <[email protected]>
derekparker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For creating and verifying PKCS#1 v1.5 signatures in a pre-hashed manner, we used the legacy
RSA_signandRSA_verifyfunctions, which bypass the system-wide disablement of SHA-1 and shorter RSA key length usage inconsistently with the OpenSSL 3.0 default on RHEL.This switches to using our
_goboringcrypto_EVP_{sign,verify}_raw, which internally useEVP_PKEY_functions.