On a side note, the Electron
actually uses Chromium's BoringSSL
instead of OpenSSL
for the Node.js binary, so an Electron
app supports fewer ciphers and hashes than the original Node.js.
It seems AES-CCM
is not supported in Electron
, so I cannot achieve Goal #2 on desktop without 3rd-party libraries.
Native Node.js modules are supported by Electron, but since Electron has a different application binary interface (ABI) from a given Node.js binary (due to differences such as using Chromium's BoringSSL instead of OpenSSL), the native modules you use...
opened 08:55AM - 26 Dec 18 UTC
closed 07:32PM - 04 Feb 19 UTC
bug
bug/regression
4-2-x
* Output of `node_modules/.bin/electron --version`: 4.0.0
* Operating System (… Platform and Version): Windows 10
* Output of `node_modules/.bin/electron --version` on last known working Electron version (if applicable): v3.x.x
**Expected Behavior**
Generally , invoke ``crypto.createCipheriv ()`` that should return a Cipheriv Object.
**Actual behavior**
When I call ``crypto.createCipheriv()`` , it will response me a error that is **unknown cipher** .
But If I run this program(**test code** ) alone by node cmd. (ex. node test.js ) that it work.
So I don't think it is a node10 problem.
**To Reproduce**
**sample code**
in main.js
```
const crypto = require('crypto')
const methodName = 'aes-256-cfb'
const key = 'nMvTdb7VXMPudFWH'
const iv = crypto.randomBytes(16)
const cipher = crypto.createCipheriv(methodName, key, iv)
console.log(cipher)
```
**Response:**
in Electron 4 or more newer
```
unknown cipher
```
in Electron 3.x , more older or run alone by node cmd
```
Cipheriv {
_handle: {},
_decoder: null,
_options: undefined,
writable: true,
readable: true }
```
opened 03:47PM - 11 Sep 19 UTC
closed 01:15PM - 12 Sep 19 UTC
Hi,
in the latest source code it looks like electron_node is built using bo… ringssl instead of openssl directly. I wanted to confirm if my understanding is correct ?
I saw in this issue https://github.com/nodejs/node/issues/25890 there was some discussion about this.
looking at `third_party/electron_node/BUILD.gn` in the latest source suggests that boringSSL is what's used
```
if (node_use_openssl) {
print("node_use_openssl in BUILD.gn")
deps += [ "//third_party/boringssl" ]
sources += [
"src/node_crypto.cc",
"src/node_crypto.h",
"src/node_crypto_bio.cc",
"src/node_crypto_bio.h",
"src/node_crypto_clienthello-inl.h",
"src/node_crypto_clienthello.cc",
"src/node_crypto_clienthello.h",
"src/node_crypto_groups.h",
"src/tls_wrap.cc",
"src/tls_wrap.h",
]
print("deps: ", deps)
cflags_cc += [ "-Wno-sign-compare" ]
}
```
printing our `process.versions` from an electron app still lists `openssl: '1.1.0'` but perhaps that is the version of openssl that is wrapped by boringSSL.
opened 04:52PM - 18 May 20 UTC
closed 04:26AM - 27 May 20 UTC
enhancement
With the switch from OpenSSL to BoringSSL by Chrome a bunch of ciphers were lost… . In the main issue regarding this: https://github.com/electron/electron/issues/16195# it was suggested to open a new issue requesting other ciphers, so hereby was wondering whether there would be any way that Electron could support aes-128-ccm.
Justification for requesting this: Mostly that on IoT devices this is a very popular cipher as it's just more power efficient than alternatives.
I don't really understand how BoringSSL relates to OpenSSL and I don't really understand if it's possible to even enable aes-128-ccm in BoringSSL, but I figured I would put the request out there regardless.
PS. This is to use node libraries that rely on `crypto` exposing this, so manually using a different solution isn't an option right now :(