Fixed RSA PSS verificatiobn bug (when hash_len != salt_len).

This commit is contained in:
Thomas Pornin 2022-06-08 08:09:34 -04:00
parent d40d23b60c
commit 6a691e6995

View File

@ -114,7 +114,7 @@ br_rsa_pss_sig_unpad(const br_hash_class *hf_data,
* in the string. * in the string.
*/ */
for (u = 0; u < hash_len; u ++) { for (u = 0; u < hash_len; u ++) {
r |= tmp[u] ^ x[(xlen - salt_len - 1) + u]; r |= tmp[u] ^ x[(xlen - hash_len - 1) + u];
} }
return EQ0(r); return EQ0(r);