../2017-05-15-javascript-crypto
Crypto Libraries for JavaScript
Crypto Libraries for JavaScript
What is a good cryptographic library for pure JavaScript? Ideally should be in npm.
I see on stackoverflow there are three choices:
- sjcl - I believe npm at sjcl npm. Last security advisory 2014 - is it really that good? Or maybe abandoned?
- CryptoJSi - dead project.
- crypto-js - also has NPM. Has been criticised for using a poor algorithm (MD5 based) to convert passphrases to keys - Top 10 developer crypto mistakes].
I also see other choices:
- nodejs_crypto - looks like it uses C openssl libraries.
- SubtleCrypto - native browser side API. Not supported on IE. See SubtleCrypto example.
There also appears to be more options if hashing is the only requirement, not encryption, e.g.:
However, I think don't think this is going to help with encryption.
Any others?
Note: I previously posted this to another stackoverflow question. but it was put on hold as it was considered "off-topic".