fips-20260721: Fix ACVP RSA PSS. 305bcfce0 broke ACVP PSS because it didn't update the expected number of arguments for the operation in modulewrapper.cc. We didn't notice because we didn't have ACVP tests for RSA signature generation. Fix both things. (cherry picked from commit ef0c0723156ff8014feb6b6789afe1e43d7e8710) Change-Id: I224a6626e9a9ecdf4c21838aa55425bae1b72139 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/100947 Auto-Submit: Adam Langley <agl@google.com> Commit-Queue: Xiangfei Ding <xfding@google.com> Reviewed-by: Xiangfei Ding <xfding@google.com> SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
diff --git a/util/fipstools/acvp/acvptool/test/tests.json b/util/fipstools/acvp/acvptool/test/tests.json index af41452..d39dd0b 100644 --- a/util/fipstools/acvp/acvptool/test/tests.json +++ b/util/fipstools/acvp/acvptool/test/tests.json
@@ -28,6 +28,7 @@ {"Wrapper": "modulewrapper", "In": "vectors/ML-DSA.bz2", "Out": "expected/ML-DSA.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/ML-KEM.bz2", "Out": "expected/ML-KEM.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/RSA.bz2", "Out": "expected/RSA.bz2"}, +{"Wrapper": "modulewrapper", "In": "vectors/RSA-sigGen.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/SHA-1.bz2", "Out": "expected/SHA-1.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/SHA2-224.bz2", "Out": "expected/SHA2-224.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/SHA2-256.bz2", "Out": "expected/SHA2-256.bz2"},
diff --git a/util/fipstools/acvp/acvptool/test/vectors/RSA-sigGen.bz2 b/util/fipstools/acvp/acvptool/test/vectors/RSA-sigGen.bz2 new file mode 100644 index 0000000..6263814 --- /dev/null +++ b/util/fipstools/acvp/acvptool/test/vectors/RSA-sigGen.bz2 Binary files differ
diff --git a/util/fipstools/acvp/modulewrapper/modulewrapper.cc b/util/fipstools/acvp/modulewrapper/modulewrapper.cc index b3d5e75..fabc802 100644 --- a/util/fipstools/acvp/modulewrapper/modulewrapper.cc +++ b/util/fipstools/acvp/modulewrapper/modulewrapper.cc
@@ -2535,12 +2535,12 @@ {"RSA/sigGen/SHA2-384/pkcs1v1.5", 2, RSASigGen<EVP_sha384, false>}, {"RSA/sigGen/SHA2-512/pkcs1v1.5", 2, RSASigGen<EVP_sha512, false>}, {"RSA/sigGen/SHA-1/pkcs1v1.5", 2, RSASigGen<EVP_sha1, false>}, - {"RSA/sigGen/SHA2-224/pss", 2, RSASigGen<EVP_sha224, true>}, - {"RSA/sigGen/SHA2-256/pss", 2, RSASigGen<EVP_sha256, true>}, - {"RSA/sigGen/SHA2-384/pss", 2, RSASigGen<EVP_sha384, true>}, - {"RSA/sigGen/SHA2-512/pss", 2, RSASigGen<EVP_sha512, true>}, - {"RSA/sigGen/SHA2-512/256/pss", 2, RSASigGen<EVP_sha512_256, true>}, - {"RSA/sigGen/SHA-1/pss", 2, RSASigGen<EVP_sha1, true>}, + {"RSA/sigGen/SHA2-224/pss", 3, RSASigGen<EVP_sha224, true>}, + {"RSA/sigGen/SHA2-256/pss", 3, RSASigGen<EVP_sha256, true>}, + {"RSA/sigGen/SHA2-384/pss", 3, RSASigGen<EVP_sha384, true>}, + {"RSA/sigGen/SHA2-512/pss", 3, RSASigGen<EVP_sha512, true>}, + {"RSA/sigGen/SHA2-512/256/pss", 3, RSASigGen<EVP_sha512_256, true>}, + {"RSA/sigGen/SHA-1/pss", 3, RSASigGen<EVP_sha1, true>}, {"RSA/sigVer/SHA2-224/pkcs1v1.5", 4, RSASigVer<EVP_sha224, false>}, {"RSA/sigVer/SHA2-256/pkcs1v1.5", 4, RSASigVer<EVP_sha256, false>}, {"RSA/sigVer/SHA2-384/pkcs1v1.5", 4, RSASigVer<EVP_sha384, false>},