Skip to content

BUG: Allow MD5 fingerprints in FIPS mode - #5490

Open
Kkkakania wants to merge 1 commit into
yt-project:mainfrom
Kkkakania:agent/fips-safe-md5
Open

BUG: Allow MD5 fingerprints in FIPS mode#5490
Kkkakania wants to merge 1 commit into
yt-project:mainfrom
Kkkakania:agent/fips-safe-md5

Conversation

@Kkkakania

Copy link
Copy Markdown

PR Summary

All MD5 usage in yt is for dataset/cache identifiers or answer-test fingerprints, not for security. This change passes usedforsecurity=False at every MD5 constructor so yt can run on Python builds that block MD5 in FIPS mode while preserving the existing digest algorithm and stored answer hashes.

The regression test simulates FIPS behavior for byte, None, and nested dictionary hashing paths and verifies that each digest remains unchanged.

Fixes #5172.

PR Checklist

  • New features are documented, with docstrings and narrative docs
  • Adds a test for any bugs fixed. Adds tests for new features.

Verification

  • python -m pytest yt/utilities/tests/test_answer_testing.py -q (3 passed)
  • python -m pytest yt/utilities/tests -q (48 passed, 1 skipped)
  • python -m pytest yt/data_objects/tests/test_data_containers.py -q (7 passed, 2 skipped)
  • uvx pre-commit run --files ... on all seven changed files (all applicable hooks passed)

AI assistance

OpenAI Codex assisted with issue investigation, implementation, testing, and PR drafting. No private data or generated assets are included.

@welcome

welcome Bot commented Jul 16, 2026

Copy link
Copy Markdown

Hi! Welcome, and thanks for opening this pull request. We have some guidelines for new pull requests, and soon you'll hear back about the results of our tests and continuous integration checks. Thank you for your contribution!

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.

hashlib.md5 doesn't work when FIPS is enabled

1 participant