Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.


This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

  • W3C Working Draft 25 June 2013


Stanford Javascript Crypto Library


Emscripten-compiled Javascript version of NaCl, the Networking and Cryptography library.


RSA and ECC in JavaScript

  • Version 1.4 (7/1/2013)


RSA public/private key crypto for Node.


Provides a simple wrapper around the fantastic work done by Tom Wu for RSA Encryption for JavaScript.


OpenPGP implementation for JavaScript


JavaScript implementation of JSON Web Signatures, JSON Web Tokens, and JSON Web Certificates


An easy-to-use encryption system utilizing RSA and AES for javascript.


a JavaScript crypto library


A native implementation of TLS in Javascript and tools to write crypto-based and network-heavy webapps

  • based on jsbn


JavaScript implementations of standard and secure cryptographic algorithms


JavaScript Cryptography Toolkit

This library is an object oriented cryptography toolkit that implements several fundamental cryptographic algorithms including TWOFISH, SERPENT, RIJNDAEL, RSA with key-generation and SHA(SHA-1,224,256,384,512) for JavaScript. This library works in ActionScript as well. The unique feature of this library is asynchronous processing. A heavyweight process such as 4096bit RSA key generation will be done asynchronously so that this library does not cause problems such as freezing browsers, "slow-downing" warning dialogs, etc.

  • asynchronous RSA key generation
  • based on jsbn


A JavaScript Cryptography Library

This library is an object oriented cryptography library that implements several fundamental cryptographic algorithms including AES, SHA-1, HMAC, BASE64, RSA, ECC and IBE for JavaScript. This library works in ActionScript as well.


Cifre is a fast crypto toolkit for modern client-side JavaScript. This is done by taking the best crypto code for js on the net and updating it to use modern technologies. There are plans to collaborate with the forge project.

  • MIT License
  • 2013-07-30 14:09:58


A WebCrypto Polyfill


A Firefox extension for the Web Cryptography API


JavaScript Cryptography

  • Last modified: - 09/05/2012

rmhrisk commented Mar 1, 2016 edited

Imho asmcrypto is the best right now. Tested AES functions

maxnis commented Jan 6, 2017

One more to the list:

IMO this is best one: WebCrypto GOST Library

yonjah commented May 31, 2017 edited

@wal-de-marlad what makes you think that ?
And what does it even mean best one ?
Is it the most audited implementation ? Does it uses a recommended algorithms ? Does it have the simplest API ?
(Having only one contributor and using some semi secret Russian algo similar to DES I would be surprised if it won't be one of the least recommended library out of the list provided here)

SJCL Is probably the only js library that was actually created by cryptography professionals.
Don't know if it makes it the "best" but I wouldn't consider using any other 3rd party library in anything important

AlessandroBudroni commented Jul 2, 2017 edited

There is also milagro-crypto-js.

I have created a Repo with this info so people can help easily.
Also the list has a new format that I think will help us to compare the different options easily: JavaScript Crypto Libraries
Comments, missing libs and pull requests more than welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment