You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found that the openpgp npm module is broken (either when trying to generate a key, decrypt using a key, etc). I've tried various versions of Deno and openpgp but it looks like they all return the same error: error: Uncaught (in promise) TypeError: Error generating keypair: Unknown cipher aes-256-cfb at new Cipheriv (ext:deno_node/internal/crypto/cipher.ts:40:21) at new createCipheriv (node:crypto:29:10)
The strange thing is that cipher is available node:crypto, as I can see it via: import { getCiphers } from 'node:crypto' console.log((getCiphers()).find((c) => c === 'aes-256-cfb'))
This is something that worked with node 22. Not sure if it should be brought up with ya'll or openpgp, but I was on the verge of transitioning to deno until this broke. Sad :(
Thanks for your help!
The text was updated successfully, but these errors were encountered:
Currently we only supports 7 ciphers (`aes-(128|192|256)-ecb` and
`aes-(128|256)-(cbc|gcm)`) in `node:crypto`, but `crypto.getCiphers`
returns other supported cipher names. That confuses `npm:openpgp`
package and causes #26875.
This PR makes `getCiphers` return actually supported cipher names.
With this change, the example given in #26875 can create private and
public key files.
closes#26875
Currently we only supports 7 ciphers (`aes-(128|192|256)-ecb` and
`aes-(128|256)-(cbc|gcm)`) in `node:crypto`, but `crypto.getCiphers`
returns other supported cipher names. That confuses `npm:openpgp`
package and causes #26875.
This PR makes `getCiphers` return actually supported cipher names.
With this change, the example given in #26875 can create private and
public key files.
closes#26875
Version: Deno 2.0.6
I've found that the openpgp npm module is broken (either when trying to generate a key, decrypt using a key, etc). I've tried various versions of Deno and openpgp but it looks like they all return the same error:
error: Uncaught (in promise) TypeError: Error generating keypair: Unknown cipher aes-256-cfb at new Cipheriv (ext:deno_node/internal/crypto/cipher.ts:40:21) at new createCipheriv (node:crypto:29:10)
The strange thing is that cipher is available node:crypto, as I can see it via:
import { getCiphers } from 'node:crypto' console.log((getCiphers()).find((c) => c === 'aes-256-cfb'))
result:
aes-256-cfb
This all looks like it's coming from deno_node/internal/crypto/cipher.ts https://github.com/denoland/deno/blob/main/ext/node/polyfills/internal/crypto/cipher.ts
Here is the full script to reproduce:
This is something that worked with node 22. Not sure if it should be brought up with ya'll or openpgp, but I was on the verge of transitioning to deno until this broke. Sad :(
Thanks for your help!
The text was updated successfully, but these errors were encountered: