Skip to content

Hash is not passed from PSS methods to MGF1 #13

@GrosQuildu

Description

@GrosQuildu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions