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. Change-Id: Idccd56f8480556c3aa77a8d4ddc856669e03b086 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/100887 Reviewed-by: Xiangfei Ding <xfding@google.com> Auto-Submit: Adam Langley <agl@google.com> Commit-Queue: Xiangfei Ding <xfding@google.com> SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com> Presubmit-BoringSSL-Verified: boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/util/fipstools/acvp/acvptool/test/tests.json b/util/fipstools/acvp/acvptool/test/tests.json index 589402c..b0fdd18 100644 --- a/util/fipstools/acvp/acvptool/test/tests.json +++ b/util/fipstools/acvp/acvptool/test/tests.json
@@ -30,6 +30,7 @@ {"Wrapper": "modulewrapper", "In": "vectors/ML-KEM.bz2", "Out": "expected/ML-KEM.bz2"}, {"Wrapper": "modulewrapper", "In": "vectors/ML-KEM-seed.bz2", "Out": "expected/ML-KEM-seed.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 83351b7..0006d14 100644 --- a/util/fipstools/acvp/modulewrapper/modulewrapper.cc +++ b/util/fipstools/acvp/modulewrapper/modulewrapper.cc
@@ -2600,12 +2600,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>},