python-pkcs1 icon indicating copy to clipboard operation
python-pkcs1 copied to clipboard

Hash is not passed from PSS methods to MGF1

Open GrosQuildu opened this issue 1 year ago • 0 comments

The mgf1 method takes hash_class argument with default sha1 value. https://github.com/bdauvergne/python-pkcs1/blob/2492f80b3a72aafd5b0045b5d40bd9adddc14d22/pkcs1/mgf.py#L5

The PSS encode method also takes hash_class argument, but does not pass it down to the `mgf1: https://github.com/bdauvergne/python-pkcs1/blob/2492f80b3a72aafd5b0045b5d40bd9adddc14d22/pkcs1/emsa_pss.py#L43

Fix: pass the hash_class from top methods (like PSS encode and verify) to mgf1.

GrosQuildu avatar Sep 27 '24 06:09 GrosQuildu