Title: Ensure builtin hashlib implementations honor usedforsecurity=True when _hashlib is in FIPS mode · Issue #127298 · python/cpython · GitHub
Open Graph Title: Ensure builtin hashlib implementations honor usedforsecurity=True when _hashlib is in FIPS mode · Issue #127298 · python/cpython
X Title: Ensure builtin hashlib implementations honor usedforsecurity=True when _hashlib is in FIPS mode · Issue #127298 · python/cpython
Description: Feature or enhancement Proposal: When OpenSSL is not available, or is not in FIPS mode: no change of behaviour When OpenSSL is available and is in FIPS mode: ensure that only OpenSSL implementations are used when usedforsecurity=True ens...
Open Graph Description: Feature or enhancement Proposal: When OpenSSL is not available, or is not in FIPS mode: no change of behaviour When OpenSSL is available and is in FIPS mode: ensure that only OpenSSL implementation...
X Description: Feature or enhancement Proposal: When OpenSSL is not available, or is not in FIPS mode: no change of behaviour When OpenSSL is available and is in FIPS mode: ensure that only OpenSSL implementation...
Opengraph URL: https://github.com/python/cpython/issues/127298
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ensure builtin hashlib implementations honor usedforsecurity=True when _hashlib is in FIPS mode","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nWhen OpenSSL is not available, or is not in FIPS mode:\n- no change of behaviour\n\nWhen OpenSSL is available and is in FIPS mode:\n- ensure that only OpenSSL implementations are used when usedforsecurity=True\n- ensure that all built-in (fallback) implementations require usedforsecurity=False\n\nThis addresses all needs of FIPS users that expect approved only cryptography from hashlib by default.\nIt satisfies Python guarantees of always available algorithms, as built-in fallbacks remain accessible with an explicit consent from the user that unapproved (an FIPS/ISO term) implementation is acceptable to the user.\n\nIn FIPS mode it means that all users can gain access to blake2/shake/md5, even when these algorithms are either blocked or unavailable from the runtime OpenSSL in FIPS mode. As long as usedforsecurity=False is used.\n\nThis also removes need to recompile or configure python somehow different for a non-fips \u0026 fips build, specifically one can safely compile python with all with-builtin-hashlib-hashes enabled.\n\nDiagrams and full details of the current state of hashlib; and FIPS user desires are documented in this issue is opened as a reference for potential implementations to resolve all needs and desires listed there.\n\nThis issue will be used as a reference for potential implementations.\n\n### Has this already been discussed elsewhere?\n\nI have already discussed this feature proposal on Discourse\n\n### Links to previous discussion of this feature:\n\nDiscuss:\n- https://discuss.python.org/t/python-and-openssl-fips-mode/51389/12 \n\n(note there are some off-topic messages there)\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-127301\n* gh-127492\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/xnox","@type":"Person","name":"xnox"},"datePublished":"2024-11-26T15:13:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/127298/cpython/issues/127298"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5eec178c-28f8-ae79-8439-e11dceb9502c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5EC:3960C0:426F4E:5E21B9:696A0ABB |
| html-safe-nonce | 2558e0effe602ce97867f4539885dd698c3e1cd144ef88a4151908a400847f28 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUVDOjM5NjBDMDo0MjZGNEU6NUUyMUI5OjY5NkEwQUJCIiwidmlzaXRvcl9pZCI6IjE3Mjk3Mjc3MjAwNzgzMTQxNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3e53258c79bc01361a126602b1715d2418db5798bb8cafa729f47df60ae9f419 |
| hovercard-subject-tag | issue:2695039186 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/127298/issue_layout |
| twitter:image | https://opengraph.githubassets.com/789a89ac3c8b4c2bcdfde5c12ddc935b93f6e547fdf8f7649263784db236ac2d/python/cpython/issues/127298 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/789a89ac3c8b4c2bcdfde5c12ddc935b93f6e547fdf8f7649263784db236ac2d/python/cpython/issues/127298 |
| og:image:alt | Feature or enhancement Proposal: When OpenSSL is not available, or is not in FIPS mode: no change of behaviour When OpenSSL is available and is in FIPS mode: ensure that only OpenSSL implementation... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xnox |
| hostname | github.com |
| expected-hostname | github.com |
| None | 699227a00bbb7fe1eec276d2ae1c3a93068bc5ba483bd9dc4b2a27a8f4f2f595 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7266b2d935baa1c6474b16dd9feaa5ca30607261 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width