Title: `cipher.update()` fails for CCM mode with zero-length ArrayBufferView backed by explicit ArrayBuffer · Issue #62342 · nodejs/node · GitHub
Open Graph Title: `cipher.update()` fails for CCM mode with zero-length ArrayBufferView backed by explicit ArrayBuffer · Issue #62342 · nodejs/node
X Title: `cipher.update()` fails for CCM mode with zero-length ArrayBufferView backed by explicit ArrayBuffer · Issue #62342 · nodejs/node
Description: Version v25.8.1 Platform Darwin Mac 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:42 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8142 arm64 Subsystem crypto What steps will reproduce the bug? import crypto from "node:crypto"; ...
Open Graph Description: Version v25.8.1 Platform Darwin Mac 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:42 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8142 arm64 Subsystem crypto What steps will reproduce the...
X Description: Version v25.8.1 Platform Darwin Mac 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:42 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8142 arm64 Subsystem crypto What steps will reproduce the...
Opengraph URL: https://github.com/nodejs/node/issues/62342
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`cipher.update()` fails for CCM mode with zero-length ArrayBufferView backed by explicit ArrayBuffer","articleBody":"### Version\n\nv25.8.1\n\n### Platform\n\n```text\nDarwin Mac 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:42 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8142 arm64\n```\n\n### Subsystem\n\ncrypto\n\n### What steps will reproduce the bug?\n\n```javascript\nimport crypto from \"node:crypto\";\n\nconst key = crypto.randomBytes(16);\nconst nonce = crypto.randomBytes(13);\n\nconst ccm = crypto.createCipheriv(\"aes-128-ccm\", key, nonce, { authTagLength: 16 });\nccm.setAAD(Buffer.alloc(0), { plaintextLength: 0 });\nccm.update(new DataView(new ArrayBuffer(0)));\nccm.final();\n```\n\n### How often does it reproduce? Is there a required condition?\n\nHappens on AES-CCM but not AES-GCM\n\n### What is the expected behavior? Why is that the expected behavior?\n\nThe expected behavior is not to receive an exception because it is effectively a no-op. This is also a different behavior between CCM and GCM.\n\n### What do you see instead?\n\n```\nError: error:1C800077:Provider routines::tag not set\n at Cipheriv.final (node:internal/crypto/cipher:170:29)\n at [eval]:10:5\n at [eval]:11:4\n at runScriptInThisContext (node:internal/vm:219:10)\n at node:internal/process/execution:451:12\n at [eval]-wrapper:6:24\n at runScriptInContext (node:internal/process/execution:449:60)\n at evalFunction (node:internal/process/execution:283:30)\n at evalTypeScript (node:internal/process/execution:295:3)\n at node:internal/main/eval_string:71:3 {\n opensslErrorStack: [ 'error:1C800077:Provider routines::tag not set' ],\n library: 'Provider routines',\n reason: 'tag not set',\n code: 'ERR_OSSL_TAG_NOT_SET'\n}\n```\n\n### Additional information\n\nI maintain a [cryptography library](https://github.com/jtdowney/kryptos) for Gleam (which can compile to JS). This case popped up in my property-based testing.","author":{"url":"https://github.com/jtdowney","@type":"Person","name":"jtdowney"},"datePublished":"2026-03-19T17:51:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/62342/node/issues/62342"}
| 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:f49c4824-4b80-1fd4-cfc0-8e3ec8514b35 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81B8:24568D:12FDED:1A251D:6A4C20A3 |
| html-safe-nonce | f26eae85744885ab12db9f663edc8da3f2983371feecf5ee51bda0a4b918c718 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUI4OjI0NTY4RDoxMkZERUQ6MUEyNTFEOjZBNEMyMEEzIiwidmlzaXRvcl9pZCI6IjI0OTE3ODE5Njc4MzExMTM4OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7ecbe880b235e7d91bfe8bf5f26da29458c73ee2ef50ff5f089098faf2e81da8 |
| hovercard-subject-tag | issue:4103261113 |
| 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/62342/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b2d74b47e6c83a24e6c7f8d1cc87d86d037454620f4b4dd00f1ef54a438d7789/nodejs/node/issues/62342 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b2d74b47e6c83a24e6c7f8d1cc87d86d037454620f4b4dd00f1ef54a438d7789/nodejs/node/issues/62342 |
| og:image:alt | Version v25.8.1 Platform Darwin Mac 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:56:42 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T8142 arm64 Subsystem crypto What steps will reproduce the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jtdowney |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| 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 | f95fb36c72adc940ff991c03531114b2245658d0 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width