python-pkcs1
python-pkcs1 copied to clipboard
Pure python, slow and standard implementation of PKCS #1 also knows as RSA
Added support for implicit NULL parameter case in pkcs1 signature verification
I was testing PKCS#1 v1.5 signature verification as implemented in python-pkcs1 and noticed it rejects valid signature whose encoded message uses an implicit NULL parameter for hash algorithm (where digestAlgorithm...
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:...