New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: crypto
package is missing cipher AES-WRAP
#31874
Comments
@gnarea This is due to the fact that Node.js uses OpenSSL to underpin its You're more than welcome to open a crbug upstream to see if BoringSSL will add it, but this is unfortunately not something Electron itself is in a position to fix. |
@codebytere, thanks for looking into this. I'm certainly happy to propose it upstream, but how is AES-WRAP any different from the other ciphers that have been enabled by the Electron team? You've patched boringssl to add support for des-ede3 (#30453) and AES-CFB (#16573). Why couldn't we do that here? BoringSSL already supports this cipher. Edit: I've just reported the issue upstream: https://bugs.chromium.org/p/boringssl/issues/detail?id=458 |
This information may be useful. Here are lists of mechanisms from NodeJS and Electron for comparison NodeJS v16.13.0crypto.getCiphers().filter(o => o.includes("wrap"));
// Log
[
'aes128-wrap',
'aes192-wrap',
'aes256-wrap',
'des3-wrap',
'id-aes128-wrap',
'id-aes128-wrap-pad',
'id-aes192-wrap',
'id-aes192-wrap-pad',
'id-aes256-wrap',
'id-aes256-wrap-pad',
'id-smime-alg-CMS3DESwrap'
] Electron v16.0.0const crypto = require("crypto");
console.log(crypto.getCiphers().filter(o => o.includes("aes")));
// Log
[
'aes-128-cbc', 'aes-128-cfb',
'aes-128-ctr', 'aes-128-ecb',
'aes-128-gcm', 'aes-128-ofb',
'aes-192-cbc', 'aes-192-ctr',
'aes-192-ecb', 'aes-192-gcm',
'aes-192-ofb', 'aes-256-cbc',
'aes-256-cfb', 'aes-256-ctr',
'aes-256-ecb', 'aes-256-gcm',
'aes-256-ofb'
] Electron doesn't suggest any const crypto = require("crypto");
console.log(crypto.getCiphers().filter(o => o.includes("wrap")))
// Log
[] |
Preflight Checklist
Electron Version
16 (tested on 12, 13, 14 and 15 too)
What operating system are you using?
Ubuntu
Operating System Version
Linux relaybox 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
AES with key wrap mode (aka AES-KW or AES-WRAP) to be supported.
Actual Behavior
It isn't supported:
results in:
crypto.getCiphers()
returns the following:Testcase Gist URL
No response
Additional Information
Node.js 12+ supports it:
The text was updated successfully, but these errors were encountered: