-
Notifications
You must be signed in to change notification settings - Fork 52
Find alternative to node-webcrypto-ossl #38
Comments
cc @diasdavid :( |
After some more investigation it seems that node core is able to do encryption and decryption using RSA keys, but generate them. |
@dignifiedquire what about https://www.npmjs.com/package/keypair ? I was using it before node-forge |
Pure js was the reason things were so slow, this needs to do better than that. |
Generating keys is a one-time operation. Breaking users ability to use it in electron and Windows is more prejudicial. |
Can we somehow include OpenSSL into the build process of node-webcrypto-ossl? |
This is not correct, there are only two specific cases we actually break
The electron renderer process will work fine given that it is running inside a browser and has webcrypto available. The detection here might fail if you don't use a bundler to generate you renderer files, but this is easily fixable. Those two specific cases do not warrant making things significantly slower for everyone in my opinion.
You really don't want that, as that would mean recompiling openssl on every install -- Moving forward I think the following is our best option
|
I'm trying to build it manually, adding the absolute path to openssl headers in bindings.gyp:
...and that compiles it fine with So what I take from this is that we could include openssl source in the module and make it build. Which is funny because I remember using node-webcrypto-ossl module in August-ish, had same problems and remember that I got it all working nicely. So I wonder what changed. Looking into it more... |
Or we provide pre-built binaries for the Electron use case (limited to latest version)? |
Not sure if that's possible, but yes if we can provide prebuilt versions for all major platform combinations that you would also be a viable option forward, ref #31 |
One other option would be to benchmark try to integrate https://github.com/vibornoff/asmcrypto.js |
Quick benchmark (Node 7.2) Current (node-webcrypto-ossl)
asmcrypto.js
keypair
|
that is a considerable difference :/ |
Sadly we will have to let go of node-webcrypto-ossl as it is blocking users from using it in electron.
Details can be found here:
We currently use
Of which
The text was updated successfully, but these errors were encountered: