From 20ca52882877ba9025da2ee58c8dab7808eca457 Mon Sep 17 00:00:00 2001 From: "Agrawal, Sachin" Date: Mon, 14 Jun 2021 23:30:43 +0800 Subject: CryptoPkg: BaseCryptLib: Update Salt length requirement for RSA-PSS scheme. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3455 Enforce salt length to be equal to digest length for RSA-PSS encoding scheme. Cc: Jiewen Yao Cc: Jian J Wang Cc: Xiaoyu Lu Cc: Guomin Jiang Signed-off-by: Sachin Agrawal Reviewed-by: Jiewen Yao --- CryptoPkg/Private/Protocol/Crypto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CryptoPkg/Private') diff --git a/CryptoPkg/Private/Protocol/Crypto.h b/CryptoPkg/Private/Protocol/Crypto.h index e304302c94..498f8e387d 100644 --- a/CryptoPkg/Private/Protocol/Crypto.h +++ b/CryptoPkg/Private/Protocol/Crypto.h @@ -3421,7 +3421,7 @@ EFI_STATUS If Message is NULL, then return FALSE. If MsgSize is zero or > INT_MAX, then return FALSE. If DigestLen is NOT 32, 48 or 64, return FALSE. - If SaltLen is < DigestLen, then return FALSE. + If SaltLen is not equal to DigestLen, then return FALSE. If SigSize is large enough but Signature is NULL, then return FALSE. If this interface is not supported, then return FALSE. @@ -3456,7 +3456,7 @@ BOOLEAN Verifies the RSA signature with RSASSA-PSS signature scheme defined in RFC 8017. Implementation determines salt length automatically from the signature encoding. Mask generation function is the same as the message digest algorithm. - Salt length should atleast be equal to digest length. + Salt length should be equal to digest length. @param[in] RsaContext Pointer to RSA context for signature verification. @param[in] Message Pointer to octet message to be verified. -- cgit v1.2.3