All Projects → ssb-js → Chloride

ssb-js / Chloride

Licence: mit

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Chloride

Swift Sodium
Safe and easy to use crypto for iOS and macOS
Stars: ✭ 400 (+381.93%)
Mutual labels:  libsodium
Globaleaks
GlobaLeaks is free, open source software enabling anyone to easily set up and maintain a secure whistleblowing platform.
Stars: ✭ 832 (+902.41%)
Mutual labels:  libsodium
Paseto.rb
Ruby implementation of Paseto using libsodium.
Stars: ✭ 41 (-50.6%)
Mutual labels:  libsodium
Libsodium Php
The PHP extension for libsodium.
Stars: ✭ 507 (+510.84%)
Mutual labels:  libsodium
Sodium compat
Pure PHP polyfill for ext/sodium
Stars: ✭ 736 (+786.75%)
Mutual labels:  libsodium
Lockbox
Modern encryption for Ruby and Rails
Stars: ✭ 905 (+990.36%)
Mutual labels:  libsodium
Sapient
Secure API Toolkit
Stars: ✭ 308 (+271.08%)
Mutual labels:  libsodium
Zbox
Zero-details, privacy-focused in-app file system.
Stars: ✭ 1,185 (+1327.71%)
Mutual labels:  libsodium
Pynacl
Python binding to the Networking and Cryptography (NaCl) library
Stars: ✭ 761 (+816.87%)
Mutual labels:  libsodium
Wire Webapp
👽 Wire for web
Stars: ✭ 982 (+1083.13%)
Mutual labels:  libsodium
Sigmavpn
Light-weight, secure and modular VPN solution which makes use of NaCl encryption (also available for Android using jnacl in "sigmavpn-android")
Stars: ✭ 531 (+539.76%)
Mutual labels:  libsodium
Libsodium.js
libsodium compiled to Webassembly and pure JavaScript, with convenient wrappers.
Stars: ✭ 665 (+701.2%)
Mutual labels:  libsodium
Rbnacl
Ruby FFI binding to the Networking and Cryptography (NaCl) library (a.k.a. libsodium)
Stars: ✭ 910 (+996.39%)
Mutual labels:  libsodium
Airship
Secure Content Management for the Modern Web - "The sky is only the beginning"
Stars: ✭ 422 (+408.43%)
Mutual labels:  libsodium
Lazysodium Android
An Android implementation of the Libsodium cryptography library. For the lazy dev.
Stars: ✭ 69 (-16.87%)
Mutual labels:  libsodium
Node Sodium
Port of the lib sodium encryption library to Node.js
Stars: ✭ 346 (+316.87%)
Mutual labels:  libsodium
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+1024.1%)
Mutual labels:  libsodium
Flutter sodium
Flutter bindings for libsodium
Stars: ✭ 77 (-7.23%)
Mutual labels:  libsodium
Tweetnacl Js
Port of TweetNaCl cryptographic library to JavaScript
Stars: ✭ 1,176 (+1316.87%)
Mutual labels:  libsodium
Nim Libsodium
Nim wrapper for the libsodium library
Stars: ✭ 32 (-61.45%)
Mutual labels:  libsodium

Chloride

Chloride is a Cryptography Library (Cl) for javascript enviroments.

About

Chloride descends from Dan J. Bernstein's (djb) NaCl library ("Networking And Cryptography Library", not to be confused with the other NaCl, Google's Native Client). djb wrote NaCl, but did not maintain it, some ideas in the library (in particular the networking part) weren't really fully baked, and the best parts where taken and maintained as libsodium (although "Na" represents the element sodium, so they took the wrong part of the acronym).

Chloride is a compatibility layer that gives you bindings to libsodium when used in Node.js, and either the libsodium-wrappers which is libsodium compiled to JavaScript via emscripten if performance is important but code size isn't. Or, if you are not doing many crypto operations, it uses tweetnacl, which is a handwritten port, and 1/10 the size of libsodium-wrappers.

Support

We have wrapped and tested enough functions for our crypto modules to work.

This is probably everything you need, NaCl doesn't have a very large API, so this is probably everything.

Do I need performance or code size?

NaCl was written with performance in mind, unfortunately a lot of that is lost when you compile it to JavaScript. However, Chloride still has the fastest JavaScript elliptic curve signature that I am aware of (and asymmetric crypto is much slower than symmetric, so this is always the weak point).

If you are only doing a symmetric ciphers (crypto_box) or a signature or two, then performance is probably not a problem. If you are verifying many signatures, performance may be a problem. Bear in mind that an asymetric operation (sign, verify, scalarmult, keygen) is usually 50 times slower than a symmetric operation, for instance a hash.

See sodiumperf performance comparisons.

To run Chloride in performance mode, load it like this:

const chloride = require('chloride')

To run in low size mode:

const chloride = require('chloride/small')

This only applies to enviroments that only support JavaScript. If you are running this on the server and could compile libsodium, then you have the same fast crypto either way.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].