The mgf1 method takes hash_class argument with default sha1 value.
|
def mgf1(mgf_seed, mask_len, hash_class=hashlib.sha1): |
The PSS encode method also takes hash_class argument, but does not pass it down to the `mgf1:
|
db_mask = mgf(h, em_len - h_len - 1) |
Fix: pass the hash_class from top methods (like PSS encode and verify) to mgf1.
The
mgf1method takeshash_classargument with defaultsha1value.python-pkcs1/pkcs1/mgf.py
Line 5 in 2492f80
The PSS
encodemethod also takeshash_classargument, but does not pass it down to the `mgf1:python-pkcs1/pkcs1/emsa_pss.py
Line 43 in 2492f80
Fix: pass the
hash_classfrom top methods (like PSSencodeandverify) tomgf1.