Title: crypto: support AES-*-SIV and AES-*-GCM-SIV in createCipheriv() · Issue #63393 · nodejs/node · GitHub
Open Graph Title: crypto: support AES-*-SIV and AES-*-GCM-SIV in createCipheriv() · Issue #63393 · nodejs/node
X Title: crypto: support AES-*-SIV and AES-*-GCM-SIV in createCipheriv() · Issue #63393 · nodejs/node
Description: What is the problem this feature will solve? I would like Node.js node:crypto to expose AES-SIV and AES-GCM-SIV ciphers through crypto.getCiphers(), crypto.getCipherInfo(), crypto.createCipheriv() and crypto.createDecipheriv(), when the ...
Open Graph Description: What is the problem this feature will solve? I would like Node.js node:crypto to expose AES-SIV and AES-GCM-SIV ciphers through crypto.getCiphers(), crypto.getCipherInfo(), crypto.createCipheriv() ...
X Description: What is the problem this feature will solve? I would like Node.js node:crypto to expose AES-SIV and AES-GCM-SIV ciphers through crypto.getCiphers(), crypto.getCipherInfo(), crypto.createCipheriv() ...
Opengraph URL: https://github.com/nodejs/node/issues/63393
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"crypto: support AES-*-SIV and AES-*-GCM-SIV in createCipheriv()","articleBody":"### What is the problem this feature will solve?\n\nI would like Node.js `node:crypto` to expose AES-SIV and AES-GCM-SIV ciphers through `crypto.getCiphers()`, `crypto.getCipherInfo()`, `crypto.createCipheriv()` and `crypto.createDecipheriv()`, when the underlying OpenSSL version supports them.\n\nOpenSSL documentation lists the following AES cipher names:\n- `AES-128-SIV`\n- `AES-192-SIV`\n- `AES-256-SIV`\n- `AES-128-GCM-SIV`\n- `AES-192-GCM-SIV`\n- `AES-256-GCM-SIV`\n\nHowever, these do not appear to be available through Node.js `node:crypto`, even with a recent Node.js version backed by OpenSSL 3.5.x.\n\nAES-GCM is widely available and useful, but it is very sensitive to nonce reuse. AES-SIV and AES-GCM-SIV are misuse-resistant authenticated encryption modes and are useful for application-level encryption APIs where accidental nonce reuse is a realistic operational risk.\n\nIn framework/library code, this would allow Node.js users to choose a safer AEAD mode where nonce misuse resistance is desirable.\n\n### Reproduction\n\n```js\nconst crypto = require('node:crypto');\n\nconsole.log('Node.js version:', process.version);\nconsole.log('OpenSSL version:', process.versions.openssl);\nconsole.log('FIPS mode:', crypto.getFips());\n\nconst ciphers = crypto.getCiphers().sort();\n\nconsole.log('SIV ciphers:', ciphers.filter((cipher) => cipher.includes('siv')));\nconsole.log('GCM/SIV ciphers:', ciphers.filter((cipher) => cipher.includes('gcm') || cipher.includes('siv')));\n\nfor (const algorithm of [\n 'aes-128-siv',\n 'aes-192-siv',\n 'aes-256-siv',\n 'aes-128-gcm-siv',\n 'aes-192-gcm-siv',\n 'aes-256-gcm-siv',\n]) {\n console.log(algorithm, crypto.getCipherInfo(algorithm));\n}\n```\n\nOn my machine:\nNode.js version: v24.14.1\nOpenSSL version: 3.5.5\nFIPS mode: 0\nSIV ciphers: []\n\ncrypto.getCiphers() does not include AES-SIV or AES-GCM-SIV algorithms.\n\nIf the underlying OpenSSL version supports these ciphers and the active provider allows them, I would expect Node.js to expose them through node:crypto, or at least document why they are intentionally unavailable.\n\nThis is not a FIPS-mode issue in my environment because crypto.getFips() returns 0. I understand that OpenSSL support does not automatically imply Node.js API exposure. I am opening this issue to ask whether exposing these ciphers is technically feasible and desirable in Node.js.\n\n### What is the feature you are proposing to solve the problem?\n\nI propose that Node.js should expose AES-SIV and AES-GCM-SIV ciphers through `node:crypto` when they are available from the underlying OpenSSL build and active provider.\n\nIdeally, this would include support for:\n- `crypto.getCiphers()`\n- `crypto.getCipherInfo()`\n- `crypto.createCipheriv()`\n- `crypto.createDecipheriv()`\n\nfor the following algorithms:\n- `aes-128-siv`\n- `aes-192-siv`\n- `aes-256-siv`\n- `aes-128-gcm-siv`\n- `aes-192-gcm-siv`\n- `aes-256-gcm-siv`\n\nIf these algorithms cannot safely fit into the current streaming `Cipheriv` / `Decipheriv` API because of their AEAD/SIV semantics, then I would like to propose one of the following alternatives:\n\n1. Document explicitly why these OpenSSL-supported ciphers are not exposed through `node:crypto`.\n2. Expose them through a non-streaming AEAD API in the future.\n3. Provide a documented way to detect that the underlying OpenSSL version supports them, even if Node.js intentionally does not expose them.\n\nThe main goal is to make misuse-resistant authenticated encryption modes available to Node.js applications and libraries in a clear, supported, and documented way.\n\n### What alternatives have you considered?\n\nI considered using the currently available `aes-256-gcm` cipher, which is supported by `node:crypto` today. This is a practical fallback, but it does not provide the same nonce-misuse resistance properties as AES-SIV or AES-GCM-SIV.\n\nI also considered relying on a third-party cryptography library or native addon, but that adds supply-chain risk, maintenance overhead, and deployment complexity compared to using the built-in `node:crypto` module.\n\nAnother alternative would be to implement stricter nonce management at the application/framework level. This helps reduce the risk, but it does not fully replace a misuse-resistant AEAD mode.\n\nTherefore, the preferred solution would be native, documented support in `node:crypto`, or at least clear documentation explaining why these OpenSSL-supported ciphers are not exposed.","author":{"url":"https://github.com/hylmarj","@type":"Person","name":"hylmarj"},"datePublished":"2026-05-17T23:06:32Z","url":"https://github.com/nodejs/node/issues/63393"}
| 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:459647ea-7bd3-95dd-5bac-d1ff81fe1244 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCC2:1E27AA:915F9C:C2D5D5:6AED2C51 |
| html-safe-nonce | 6c4bb8f120951e6d365d1de166b85728ef145a3e3be150356793980479858aaa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0MyOjFFMjdBQTo5MTVGOUM6QzJENUQ1OjZBRUQyQzUxIiwidmlzaXRvcl9pZCI6IjczMDgxODU2NTI1MTc3NDM2OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 895e3f8b0927f1c1d242d36cc1453873d33e24c7d495fbc31501807ecdc12120 |
| hovercard-subject-tag | issue:4465214400 |
| 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/nodejs/node/63393/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9cb663779ea396c0cf4150a576629f924659a4a1a0863ebdfe63fad323d86761/nodejs/node/issues/63393 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9cb663779ea396c0cf4150a576629f924659a4a1a0863ebdfe63fad323d86761/nodejs/node/issues/63393 |
| og:image:alt | What is the problem this feature will solve? I would like Node.js node:crypto to expose AES-SIV and AES-GCM-SIV ciphers through crypto.getCiphers(), crypto.getCipherInfo(), crypto.createCipheriv() ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hylmarj |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| 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 | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width