Skip to content

BUG: Fix building NumPy in FIPS mode #27104

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

Merged
merged 1 commit into from
Aug 4, 2024
Merged

Conversation

tiran
Copy link
Contributor

@tiran tiran commented Aug 4, 2024

MD5 is an insecure cryptogrpahic hashing algorithm and is therefore blocked in FIPS mode. NumPy uses MD5 has digest algorithm without any security requirements. Use usedforsecurity=False flag to tell OpenSSL that the use of MD5 is okay in FIPS enforcing mode. I implemented the flag in Python 3.9 for exactly this purpose

Fixes: #27099

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

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

Linting is failing on 85 characters, which is fine. We should change that rule.
Docs and 32-bit windows failures are not connected to this PR.

LGTM, let's let CI run to completion.

MD5 is an insecure cryptogrpahic hashing algorithm and is therefore
blocked in FIPS mode. NumPy uses MD5 has digest algorithm without any
security requirements. Use `usedforsecurity=False` flag to tell OpenSSL
that the use of MD5 is okay in FIPS enforcing mode. I implemented the
flag in Python 3.9 for exactly this purpose

Fixes: numpy#27099
Signed-off-by: Christian Heimes <christian@python.org>
@tiran tiran force-pushed the genapi-fips-md5 branch from 1b33b05 to 818515b Compare August 4, 2024 07:30
@tiran
Copy link
Contributor Author

tiran commented Aug 4, 2024

The other tests were green. I have fixed the linting violation and forced pushed the fix.

@mattip mattip merged commit cf2d77a into numpy:main Aug 4, 2024
66 checks passed
@mattip
Copy link
Member

mattip commented Aug 4, 2024

Thanks @tiran

@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Aug 4, 2024
@charris charris changed the title Fix building NumPy in FIPS mode BUG: Fix building NumPy in FIPS mode Aug 4, 2024
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Building numpy on a FIPS mode system fails due to use of md5
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy