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

Use 'usedforsecurity' flag when using hashing functions for non-security purposes #452

Open
djhoese opened this issue Sep 7, 2022 · 0 comments

Comments

@djhoese
Copy link
Member

djhoese commented Sep 7, 2022

We occasionally use python's hashlib to generate hashes for things like AreaDefinitions. On FIPS-enabled systems, certain hashing algorithms are disabled from use for security reasons. This is common in certain US government organizations. It turns out there is a feature in some versions of Python to say "I know I'm using md5sum and it is not well-suited for security purposes, but I'm not using it for security" by passing a usedforsecurity=False keyword argument to some of the hashing functions. See it discussed here:

https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5

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

No branches or pull requests

1 participant