Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hash is not passed from PSS methods to MGF1 #13

Open
GrosQuildu opened this issue Sep 27, 2024 · 0 comments
Open

Hash is not passed from PSS methods to MGF1 #13

GrosQuildu opened this issue Sep 27, 2024 · 0 comments

Comments

@GrosQuildu
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant