Giter Site home page Giter Site logo

chloride's Introduction

chloride

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

about

Chloride decends from Dan J. Bernstein's 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) wasn'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

I have wrapped and tested enough functions for my 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 veryify many signatures, performance may be a problem. Bear in mind that an asymetric operation (sign, verify, scalarmult, keygen) are usually 50 times slower than a symmetric operation, say a hash.

See sodiumperf performance comparisons.

to run chloride in performance mode, load via

var chloride = require('chloride')

to run in low size mode

var chloride = require('chloride/small')

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

License

MIT

chloride's People

Contributors

19h avatar dominictarr avatar donpark avatar dsshap avatar erichocean avatar jonasfj avatar joshuaconner avatar jtremback avatar manuelkasper avatar no9 avatar paixaop avatar perguth avatar rvagg avatar yorickvp avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.