Skip to content

MD5 not supported without usedforsecurity=False in FIPS 140-2 environment #8608

Closed
@tuffacton

Description

What happened:
In a FIPS 140-2 enabled CentOS 7 VM I got an error much like the one described here: paramiko/paramiko#396

I had to effectively perform this monkey patch: https://stackoverflow.com/a/70232502

Changed .env/lib/python3.6/site-packages/dask/base.py:

855 return md5(str(tuple(map(normalize_token, args))).encode()).hexdigest()

to

855 return md5(str(tuple(map(normalize_token, args))).encode(), usedforsecurity=False).hexdigest()

Anything else we need to know?:

Tried to reproduce on my M1 Macbook but unfortunately the Mac's OpenSSL md5 has a different hashlib implementation that doesn't support multiple arguments. https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5

Environment:

  • Python version: 3.8.9
  • Operating System: CentOS 7
  • Install method (conda, pip, source): pip

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions