René's URL Explorer Experiment


Title: `crypto`: SM4-GCM and SM4-CCM not available despite OpenSSL 3.5 bundling the implementation · Issue #64866 · nodejs/node · GitHub

Open Graph Title: `crypto`: SM4-GCM and SM4-CCM not available despite OpenSSL 3.5 bundling the implementation · Issue #64866 · nodejs/node

X Title: `crypto`: SM4-GCM and SM4-CCM not available despite OpenSSL 3.5 bundling the implementation · Issue #64866 · nodejs/node

Description: What is the problem this feature will solve? SM4-GCM and SM4-CCM are documented as available in OpenSSL 3.x default provider (EVP_CIPHER-SM4), and the source files (cipher_sm4_gcm.c, cipher_sm4_ccm.c) are included in Node.js's OpenSSL bu...

Open Graph Description: What is the problem this feature will solve? SM4-GCM and SM4-CCM are documented as available in OpenSSL 3.x default provider (EVP_CIPHER-SM4), and the source files (cipher_sm4_gcm.c, cipher_sm4_ccm...

X Description: What is the problem this feature will solve? SM4-GCM and SM4-CCM are documented as available in OpenSSL 3.x default provider (EVP_CIPHER-SM4), and the source files (cipher_sm4_gcm.c, cipher_sm4_ccm...

Opengraph URL: https://github.com/nodejs/node/issues/64866

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`crypto`: SM4-GCM and SM4-CCM not available despite OpenSSL 3.5 bundling the implementation","articleBody":"### What is the problem this feature will solve?\n\nSM4-GCM and SM4-CCM are documented as available in OpenSSL 3.x default provider ([EVP_CIPHER-SM4](https://docs.openssl.org/3.5/man7/EVP_CIPHER-SM4/)), and the source files (`cipher_sm4_gcm.c`, `cipher_sm4_ccm.c`) are included in Node.js's OpenSSL build (`deps/openssl/config/archs/*/openssl.gypi` and `providers/implementations/ciphers/build.info`). However, these ciphers are not registered at runtime.\n\nThis affects cross-language interoperability for projects using SM4-GCM (e.g., Java BouncyCastle) that need Node.js decryption support, and China compliance (GM/T 0002) scenarios requiring authenticated encryption with SM4.\n\n### Reproduction\n\n```javascript\nconst crypto = require('node:crypto');\n\nconsole.log('Node.js:', process.version);           // v24.18.0\nconsole.log('OpenSSL:', process.versions.openssl);   // 3.5.7\nconsole.log('FIPS:', crypto.getFips());              // 0\n\n// SM4-GCM not in getCiphers()\nconsole.log(crypto.getCiphers().filter(c => c.includes('sm4')));\n// → [ 'sm4', 'sm4-cbc', 'sm4-cfb', 'sm4-ctr', 'sm4-ecb', 'sm4-ofb' ]\n// Missing: sm4-gcm, sm4-ccm, sm4-xts\n\n// getCipherInfo returns undefined\nconsole.log(crypto.getCipherInfo('sm4-gcm'));   // → undefined\nconsole.log(crypto.getCipherInfo('sm4-cbc'));   // → { mode: 'cbc', nid: 1134, ... }\n\n// createCipheriv throws\ntry {\n  crypto.createCipheriv('sm4-gcm', Buffer.alloc(16), Buffer.alloc(12));\n} catch (e) {\n  console.log(e.message); // → \"Unknown cipher\"\n}\n```\n\n### Evidence that this is a Node.js build issue (not OpenSSL)\n\n1. **OpenSSL docs** list SM4-GCM/CCM/XTS as available in the default provider since 3.1+.\n2. **Python `cryptography` library** (linking system OpenSSL 3.x) supports SM4-GCM.\n3. **Source files are compiled**: `deps/openssl/config/archs/VC-WAN64A/no-asm/openssl.gypi` includes:\n   ```\n   'openssl/providers/implementations/ciphers/cipher_sm4_gcm.c',\n   'openssl/providers/implementations/ciphers/cipher_sm4_gcm_hw.c',\n   'openssl/providers/implementations/ciphers/cipher_sm4_ccm.c',\n   'openssl/providers/implementations/ciphers/cipher_sm4_ccm_hw.c',\n   'openssl/providers/implementations/ciphers/cipher_sm4_xts.c',\n   'openssl/providers/implementations/ciphers/cipher_sm4_xts_hw.c',\n   ```\n4. **`build.info`** includes them unconditionally (given `!$disabled{sm4}`, and SM4-CBC works).\n5. **No `no-sm4` in Configure options** (`deps/openssl/config/Makefile` COPTS).\n\n### Suspected root cause\n\nNode.js builds OpenSSL with `enable-fips`. The FIPS module build process may regenerate or filter the default provider's `OSSL_ALGORITHM` dispatch table, causing SM4-GCM/CCM/XTS registration entries to be dropped while basic SM4 modes (CBC, CTR, ECB, OFB, CFB) are retained.\n\nAdditionally, `deps/ncrypto/ncrypto.cc` line 4304 uses the legacy API:\n```cpp\nconst Cipher Cipher::FromName(const char* name) {\n  return Cipher(EVP_get_cipherbyname(name));\n}\n```\nEven if the provider registration is fixed, `EVP_get_cipherbyname()` may not resolve provider-only ciphers that lack a legacy `EVP_CIPHER` object (per [openssl/openssl#13667](https://github.com/openssl/openssl/issues/13667): \"There never will be an `evp_sm4_gcm()` function\"). A fallback to `EVP_CIPHER_fetch(NULL, name, NULL)` may be needed.\n\n### What is the feature you are proposing?\n\n1. Investigate why SM4-GCM/CCM/XTS are not registered in the default provider at runtime despite being compiled.\n2. If the `enable-fips` build path is the cause, ensure non-FIPS algorithms remain registered in the default provider.\n3. Consider adding an `EVP_CIPHER_fetch` fallback in `Cipher::FromName()` for forward compatibility with provider-only ciphers.\n\n### Environment\n\n- Node.js: v24.18.0\n- OpenSSL: 3.5.7\n- OS: Windows 11 24H2\n- FIPS mode: disabled (0)\n\n---","author":{"url":"https://github.com/emmansun","@type":"Person","name":"emmansun"},"datePublished":"2026-07-31T10:03:14Z","url":"https://github.com/nodejs/node/issues/64866"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8430f616-c4f7-8a71-78fe-d9909ffa94f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id827A:2CAC94:819C03:A915E6:6AED3753
html-safe-nonce73fd6fbb852846194f46500e66a3be4d1095020ab1b77c62e4b8ee9da22279e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjdBOjJDQUM5NDo4MTlDMDM6QTkxNUU2OjZBRUQzNzUzIiwidmlzaXRvcl9pZCI6Ijc5MjgzNzMyMTc3NTM2NDI4MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac179151a77f6f94a1862d0282573692ecd420ad46ca059fb4e94f39e8b8d1fb40
hovercard-subject-tagissue:5028569108
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/64866/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5556ed30a7bac0507b903602a7f80ecafc7761bc9c45be0a8f422fdc9170ab3b/nodejs/node/issues/64866
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5556ed30a7bac0507b903602a7f80ecafc7761bc9c45be0a8f422fdc9170ab3b/nodejs/node/issues/64866
og:image:altWhat is the problem this feature will solve? SM4-GCM and SM4-CCM are documented as available in OpenSSL 3.x default provider (EVP_CIPHER-SM4), and the source files (cipher_sm4_gcm.c, cipher_sm4_ccm...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameemmansun
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/64866#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64866
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F64866
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/64866
Reloadhttps://github.com/nodejs/node/issues/64866
Reloadhttps://github.com/nodejs/node/issues/64866
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64866
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64866
crypto: SM4-GCM and SM4-CCM not available despite OpenSSL 3.5 bundling the implementationhttps://github.com/nodejs/node/issues/64866#top
https://github.com/emmansun
emmansunhttps://github.com/emmansun
on Jul 31, 2026https://github.com/nodejs/node/issues/64866#issue-5028569108
EVP_CIPHER-SM4https://docs.openssl.org/3.5/man7/EVP_CIPHER-SM4/
openssl/openssl#13667https://github.com/openssl/openssl/issues/13667
https://github.com/Shivang9983
Shivang9983https://github.com/Shivang9983
on Aug 3, 2026https://github.com/nodejs/node/issues/64866#issuecomment-5170595849
@emmansunhttps://github.com/emmansun
PickBashttps://github.com/PickBas
on Aug 19, 2026https://github.com/nodejs/node/issues/64866#event-29678412782
crypto: support provider-only SM4 cipher modeshttps://github.com/JaneaSystems/node/commit/491dc6df340ad9f03cc2c1a81c607d1e1f4f6625
491dc6dhttps://github.com/JaneaSystems/node/commit/491dc6df340ad9f03cc2c1a81c607d1e1f4f6625
panvahttps://github.com/panva
on Aug 22, 2026https://github.com/nodejs/node/issues/64866#event-29856235782
crypto: discover ciphers from OpenSSL providershttps://github.com/panva/node/commit/2cebe48e08e7125a2b39b7d24a1e4c644633a4f4
2cebe48https://github.com/panva/node/commit/2cebe48e08e7125a2b39b7d24a1e4c644633a4f4
crypto: discover ciphers from OpenSSL providershttps://github.com/panva/node/commit/54489eb9adbb7d8c35e35a20889c482093827be8
54489ebhttps://github.com/panva/node/commit/54489eb9adbb7d8c35e35a20889c482093827be8
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
025e88fhttps://github.com/nodejs/node/commit/025e88f981fde833920756b22a031305d260e175
on Aug 25, 2026https://github.com/nodejs/node/issues/64866#event-30011109092
nodejs-github-bothttps://github.com/nodejs-github-bot
on Aug 25, 2026https://github.com/nodejs/node/issues/64866#event-30011109406
crypto: discover ciphers from OpenSSL providershttps://github.com/nodejs/node/commit/e7a69c499242d270df50a29d2bef5642aff03c13
e7a69c4https://github.com/nodejs/node/commit/e7a69c499242d270df50a29d2bef5642aff03c13
pullhttps://github.com/apps/pull
on Aug 25, 2026https://github.com/nodejs/node/issues/64866#event-30011696075
crypto: discover hashes from OpenSSL providershttps://github.com/alexanderregnier/node/commit/025e88f981fde833920756b22a031305d260e175
025e88fhttps://github.com/alexanderregnier/node/commit/025e88f981fde833920756b22a031305d260e175
aduh95https://github.com/aduh95
on Aug 29, 2026https://github.com/nodejs/node/issues/64866#event-30207780132
crypto: discover hashes from OpenSSL providershttps://github.com/nodejs/node/commit/d0d300f01fc9955cdd68db4ac6c31f992287cf1b
d0d300fhttps://github.com/nodejs/node/commit/d0d300f01fc9955cdd68db4ac6c31f992287cf1b
crypto: discover ciphers from OpenSSL providershttps://github.com/nodejs/node/commit/9b52db81ebf3d15ce0dd6397f8c8b27daee6109c
9b52db8https://github.com/nodejs/node/commit/9b52db81ebf3d15ce0dd6397f8c8b27daee6109c
aduh95https://github.com/aduh95
on Sep 15, 2026https://github.com/nodejs/node/issues/64866#event-31161498573
crypto: discover hashes from OpenSSL providershttps://github.com/nodejs/node/commit/7c7e95a3bd16ef6064ddff89f47bf02d3d913cf8
7c7e95ahttps://github.com/nodejs/node/commit/7c7e95a3bd16ef6064ddff89f47bf02d3d913cf8
crypto: discover ciphers from OpenSSL providershttps://github.com/nodejs/node/commit/7ac458f802525c7de4b3273bfc7e474a3a5a9b60
7ac458fhttps://github.com/nodejs/node/commit/7ac458f802525c7de4b3273bfc7e474a3a5a9b60
panvahttps://github.com/panva
on Sep 19, 2026https://github.com/nodejs/node/issues/64866#event-31441206142
crypto: discover hashes from OpenSSL providershttps://github.com/panva/node/commit/3748316efbf3f83d05dc5bf17229f9db9c184e4e
3748316https://github.com/panva/node/commit/3748316efbf3f83d05dc5bf17229f9db9c184e4e
crypto: discover ciphers from OpenSSL providershttps://github.com/panva/node/commit/b714efbdf33eb65ace9b006ac8d85986520c004d
b714efbhttps://github.com/panva/node/commit/b714efbdf33eb65ace9b006ac8d85986520c004d
crypto: discover hashes from OpenSSL providershttps://github.com/panva/node/commit/517cd544d69328a404e88c73e297683416493d8f
517cd54https://github.com/panva/node/commit/517cd544d69328a404e88c73e297683416493d8f
crypto: discover ciphers from OpenSSL providershttps://github.com/panva/node/commit/287b523f9a167695fb4983a08a3d0f0d1a88c543
287b523https://github.com/panva/node/commit/287b523f9a167695fb4983a08a3d0f0d1a88c543
crypto: discover hashes from OpenSSL providershttps://github.com/panva/node/commit/7ef632a49c45f36ae8d5c327d19957102c5aaa72
7ef632ahttps://github.com/panva/node/commit/7ef632a49c45f36ae8d5c327d19957102c5aaa72
crypto: discover ciphers from OpenSSL providershttps://github.com/panva/node/commit/e63bbfeb171b4886d5fbd9e6de25aeafc1a481b0
e63bbfehttps://github.com/panva/node/commit/e63bbfeb171b4886d5fbd9e6de25aeafc1a481b0
aduh95https://github.com/aduh95
on Sep 21, 2026https://github.com/nodejs/node/issues/64866#event-31519152292
crypto: discover hashes from OpenSSL providershttps://github.com/nodejs/node/commit/c2f1e829ea3a1a12ce9c3472e3112eda98e6e512
c2f1e82https://github.com/nodejs/node/commit/c2f1e829ea3a1a12ce9c3472e3112eda98e6e512
crypto: discover ciphers from OpenSSL providershttps://github.com/nodejs/node/commit/a4ab3d84d779b7fb95da9b5c9ac1d2e6a97929a1
a4ab3d8https://github.com/nodejs/node/commit/a4ab3d84d779b7fb95da9b5c9ac1d2e6a97929a1
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/64866
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/64866
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.