Title: `make_program_cache_key`: blake2b is not a FIPS-compliant hash · Issue #2043 · NVIDIA/cuda-python · GitHub
Open Graph Title: `make_program_cache_key`: blake2b is not a FIPS-compliant hash · Issue #2043 · NVIDIA/cuda-python
X Title: `make_program_cache_key`: blake2b is not a FIPS-compliant hash · Issue #2043 · NVIDIA/cuda-python
Description: make_program_cache_key (added in #1912) uses hashlib.blake2b for cache key derivation. blake2b is not FIPS-approved, so hashlib.blake2b() raises ValueError on FIPS-compliant Linux systems: ValueError: [digital envelope routines: EVP_Dige...
Open Graph Description: make_program_cache_key (added in #1912) uses hashlib.blake2b for cache key derivation. blake2b is not FIPS-approved, so hashlib.blake2b() raises ValueError on FIPS-compliant Linux systems: ValueErr...
X Description: make_program_cache_key (added in #1912) uses hashlib.blake2b for cache key derivation. blake2b is not FIPS-approved, so hashlib.blake2b() raises ValueError on FIPS-compliant Linux systems: ValueErr...
Opengraph URL: https://github.com/NVIDIA/cuda-python/issues/2043
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`make_program_cache_key`: blake2b is not a FIPS-compliant hash","articleBody":"`make_program_cache_key` (added in #1912) uses `hashlib.blake2b` for cache key derivation. blake2b is not FIPS-approved, so `hashlib.blake2b()` raises `ValueError` on FIPS-compliant Linux systems:\n\n```\nValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS\n```\n\nThis is common in government/DOE supercomputer environments — exactly where CUDA workloads run. CuPy hit the same issue with `hashlib.md5` (cupy/cupy#5959, fixed in cupy/cupy#5988 by switching to SHA-1).\n\nNote: `FileStreamProgramCache._path_for_key` also uses `hashlib.blake2b` to hash keys into filesystem paths — this needs the same fix.\n\n## Proposed fix\n\n1. Switch from blake2b to a FIPS-approved hash. Two options:\n - **SHA-1** (20-byte digest, FIPS-approved) — matches CuPy's choice. Faster than SHA-256. 160-bit collision resistance is more than sufficient for cache keys.\n - **SHA-256** (32-byte digest, FIPS-approved) — drop-in replacement for the current `blake2b(digest_size=32)`. Slightly slower but stronger.\n2. Remove both the hash algorithm name AND the digest size from the public `make_program_cache_key` docstring — the `Returns` section currently says \"A 32-byte blake2b digest.\" Both the algorithm and the size are implementation details that may change (e.g., switching to SHA-1 changes the size from 32 to 20 bytes). The return type should just be documented as `bytes`.\n3. Bump `_KEY_SCHEMA_VERSION` to invalidate old caches (old blake2b entries become orphans, reaped by eviction).\n","author":{"url":"https://github.com/leofang","@type":"Person","name":"leofang"},"datePublished":"2026-05-06T22:24:50Z","url":"https://github.com/NVIDIA/cuda-python/issues/2043"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| 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:e0423748-3d4c-2e77-703d-d063b9925d33 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE2A:3AABB4:492E8F:602A1C:6AF82A36 |
| html-safe-nonce | 5fa7bc5f4d9ea62ee3d73e389a861624973655b24f86e54ecbdfe2539382f403 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTJBOjNBQUJCNDo0OTJFOEY6NjAyQTFDOjZBRjgyQTM2IiwidmlzaXRvcl9pZCI6IjM5MjgxODYyNDMyOTE1NTY0MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e740026e0f5b736d6bbeb139d4d1c060e7710e1dde5fb75174c29f66cf66baf2 |
| hovercard-subject-tag | issue:4394835232 |
| 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/NVIDIA/cuda-python/2043/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81402f9ef1140baa8bec11825e53e087600d563a7f532fb426ddfa2e4a9e2d17/NVIDIA/cuda-python/issues/2043 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81402f9ef1140baa8bec11825e53e087600d563a7f532fb426ddfa2e4a9e2d17/NVIDIA/cuda-python/issues/2043 |
| og:image:alt | make_program_cache_key (added in #1912) uses hashlib.blake2b for cache key derivation. blake2b is not FIPS-approved, so hashlib.blake2b() raises ValueError on FIPS-compliant Linux systems: ValueErr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | leofang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| go-import | github.com/NVIDIA/cuda-python git https://github.com/NVIDIA/cuda-python.git |
| octolytics-dimension-user_id | 1728152 |
| octolytics-dimension-user_login | NVIDIA |
| octolytics-dimension-repository_id | 381173759 |
| octolytics-dimension-repository_nwo | NVIDIA/cuda-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 381173759 |
| octolytics-dimension-repository_network_root_nwo | NVIDIA/cuda-python |
| 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 | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width