Hide Forgot
+++ This bug was initially created as a clone of Bug #2091905 +++ We clarified with lab that we should be able to use the RSA keys for signature verification if they are of the following sizes: 1024, 1280, 1536, 1792 Consider adapting NSS to also support these shorter key sizes. We may not want to enable these short key sizes by default in TLS, though. --- Additional comment from Bob Relyea on 2022-06-16 09:30:13 PDT --- ok, I'm coopting this bug. That's because there is code around this that was supposed to be upstream, but didn't make into the RHEL 3.79 NSS release. (https://phabricator.services.mozilla.com/D146341). The base thing this bug describes is already done by NSS. NSS allows any signature for any rsa key between 128 and 16384 for both signing and verification in regular and FIPS mode. It only gives FIPS indicators for keys >2048. The upstream patch was supposed to: 1) increase the low end of the RSA keys to 1024 in all cases (encryption/decryption/signing/verification). 2) give FIPS indicators for 1024, 1280, 1536, 1792, signing only. 3) allow crypto-policies to optionally add signing, and verification to the checks for minimum key sizes by set by policy. this bug is now to include this patch as part of the rebase. proposed AC: 1) verify small RSA keys are no longer supported. 2) check the fips indicators for signing in FIPS mode. These could be sanity checks by looking at RSA_MIN_MODULUS_BITS in lib/freebl/blapit.h (or /usr/include/nss3/blapit.h in an installed system), and looking at nss/lib/softokn/fips_algorithms.h to make sure that the verification entries in the table are there: { CKM_SHA224_RSA_PKCS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA256_RSA_PKCS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA384_RSA_PKCS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA512_RSA_PKCS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA224_RSA_PKCS_PSS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA256_RSA_PKCS_PSS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA384_RSA_PKCS_PSS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone }, { CKM_SHA512_RSA_PKCS_PSS, { RSA_LEGACY_FB_KEY, CKF_VERIFY }, RSA_LEGACY_FB_STEP, SFTKFIPSNone },