Title: AES-256-CBC-HMAC-SHA256 and similar ciphers are not recognized as authenticated ciphers · Issue #43040 · nodejs/node · GitHub
Open Graph Title: AES-256-CBC-HMAC-SHA256 and similar ciphers are not recognized as authenticated ciphers · Issue #43040 · nodejs/node
X Title: AES-256-CBC-HMAC-SHA256 and similar ciphers are not recognized as authenticated ciphers · Issue #43040 · nodejs/node
Description: Version 18.1.0 Platform Microsoft Windows NT 10.0.19044.0 x64 Subsystem crypto What steps will reproduce the bug? Run the following code: import crypto from 'crypto'; let cipher = crypto.createCipheriv('AES-256-CBC-HMAC-SHA256', crypto.r...
Open Graph Description: Version 18.1.0 Platform Microsoft Windows NT 10.0.19044.0 x64 Subsystem crypto What steps will reproduce the bug? Run the following code: import crypto from 'crypto'; let cipher = crypto.createCiph...
X Description: Version 18.1.0 Platform Microsoft Windows NT 10.0.19044.0 x64 Subsystem crypto What steps will reproduce the bug? Run the following code: import crypto from 'crypto'; let cipher = crypto.cr...
Opengraph URL: https://github.com/nodejs/node/issues/43040
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AES-256-CBC-HMAC-SHA256 and similar ciphers are not recognized as authenticated ciphers","articleBody":"### Version\n\n18.1.0\n\n### Platform\n\nMicrosoft Windows NT 10.0.19044.0 x64\n\n### Subsystem\n\ncrypto\n\n### What steps will reproduce the bug?\n\nRun the following code:\r\n\r\n```js\r\nimport crypto from 'crypto';\r\n\r\nlet cipher = crypto.createCipheriv('AES-256-CBC-HMAC-SHA256', crypto.randomBytes(32), crypto.randomBytes(16));\r\nlet encrypted = cipher.update('My beautiful data', 'utf8', 'hex');\r\nencrypted += cipher.final('hex');\r\n```\n\n### How often does it reproduce? Is there a required condition?\n\nThis only reproduces when using:\r\n- aes-128-cbc-hmac-sha1\r\n- aes-128-cbc-hmac-sha256\r\n- aes-256-cbc-hmac-sha1\r\n- aes-256-cbc-hmac-sha256\n\n### What is the expected behavior?\n\nOn Node 17.1.0:\r\n```\r\nd8d390a8554e2ca579a1946447c8144509495f521458996db711dd6c9595080d\r\n```\n\n### What do you see instead?\n\n```\r\nnode:internal/crypto/cipher:180\r\n const ret = this[kHandle].update(data, inputEncoding);\r\n ^\r\n\r\nError: Trying to add data in unsupported state\r\n at Cipheriv.update (node:internal/crypto/cipher:180:29)\r\n at file:///C:/Users/myuser/Documents/GitHub/something/test/playground.js:22:24\r\n at ModuleJob.run (node:internal/modules/esm/module_job:198:25)\r\n at async Promise.all (index 0)\r\n at async ESMLoader.import (node:internal/modules/esm/loader:409:24)\r\n at async loadESM (node:internal/process/esm_loader:85:5)\r\n at async handleMainPromise (node:internal/modules/run_main:61:12)\r\n```\n\n### Additional information\n\nIt seems to work on LTS and above (tested until 17.1.0), but not on V18.","author":{"url":"https://github.com/seirdotexe","@type":"Person","name":"seirdotexe"},"datePublished":"2022-05-10T16:41:39Z","url":"https://github.com/nodejs/node/issues/43040"}
| 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:f4d673ca-4e36-4958-8632-4769e01b9bb8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DC12:E530F:7C05D9:A4B6A8:6AED262C |
| html-safe-nonce | f3c75705163d975a6330225dc244ad8f1e20a07697fe33eb5938135fb76d9ca5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzEyOkU1MzBGOjdDMDVEOTpBNEI2QTg6NkFFRDI2MkMiLCJ2aXNpdG9yX2lkIjoiNzIzODI2NjEwNjA4NDY2NDg3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 64629dfd21fa70ed1496082ad9fee26b86d327f3effd26d0f70c84b8143a310c |
| hovercard-subject-tag | issue:1231424706 |
| 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/43040/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7bd2e1f48e931f3c99c2c4ee6f76faf63982ca1b7b40a55bc6b23b6e936e2f3d/nodejs/node/issues/43040 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7bd2e1f48e931f3c99c2c4ee6f76faf63982ca1b7b40a55bc6b23b6e936e2f3d/nodejs/node/issues/43040 |
| og:image:alt | Version 18.1.0 Platform Microsoft Windows NT 10.0.19044.0 x64 Subsystem crypto What steps will reproduce the bug? Run the following code: import crypto from 'crypto'; let cipher = crypto.createCiph... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | seirdotexe |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2 |
| 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 | 98b41fa4b5635ceb45a4c54320fced73817ff290 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width