Skip to content

Conversation

@katucker
Copy link

The Federal Information Processing Standards (FIPS) do not allow using the md5 algorithm for encryption since it is considered too weak. The hashlib implementation of md5 provided a workaround permitting continued use of the fast md5 algorithm by explicitly noting the use was not for security purposes. The changes here try using that workaround, and fall back to failing on systems enforcing FIPS.

katucker added 2 commits May 10, 2024 12:02
Add usedforsecurity parameter to allow md5 use on systems enforcing compliance with Federal Information Processing Standards (FIPS).
The Federal Information Processing Standards (FIPS) do not allow using the md5 algorithm for encryption since it is considered too weak. The hashlib implementation of md5 provided a workaround permitting continued use of the fast md5 algorithm by explicitly noting the use was not for security purposes. The changes here try using that workaround, and fall back to failing on systems enforcing FIPS.
@@ -0,0 +1,4 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this unrelated file.

# succeed on systems that enforce compliance with the
# Federal Information Processing Standard (FIPS) and thus
# don't allow md5 for encryption.
md5_constructor = partial(hashlib.md5,usedforsecurity=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
md5_constructor = partial(hashlib.md5,usedforsecurity=False)
md5_constructor = partial(hashlib.md5, usedforsecurity=False)

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

Successfully merging this pull request may close these issues.

2 participants