Git Product home page Git Product logo

crypto's Introduction

crypto

Libraries of cryptographic functions implemented in JavaScript.

aes.js

This is a reference implementation of the algorithm described in the FIPS-197 standard. It implements the standard very closely, in order to aid in understanding the standard and the algorithm itself.

This comprises:

  • cipher: takes a 128-bit input block and applies the cipher algorithm to produce a 128-bit output block
  • keyExpansion: applies a key expansion to a 128-/192-/256-bit cipher key to produce a 2D byte-array key schedule for the cipher routine

More details are available at www.movable-type.co.uk/scripts/aes.html.

aes-ctr.js

This is a counter-mode (CTR) wrapper for the AES function.

This comprises:

  • encrypt: encrypt a plaintext using a supplied password
  • decrypt: decrypt an encrypted ciphertext using a supplied password

Note that there are no standards for data storage formats of AES encryption mode wrapper functions, so this is unlikely to inter-operate with standard library functions.

More details are available at www.movable-type.co.uk/scripts/aes.html.

sha1.js

This is a reference implementation of the algorithm described in the FIPS-180-4 standard. It implements the standard very closely, in order to aid in understanding the standard and the algorithm itself.

This comprises:

  • hash: takes a (Unicode) string and generates a hash (of the UTF-8 encoded string)

More details are available at www.movable-type.co.uk/scripts/sha1.html.

sha256.js

This is a reference implementation of the algorithm described in the FIPS-180-4 standard. It implements the standard very closely, in order to aid in understanding the standard and the algorithm itself.

This comprises:

  • hash: takes a (Unicode) string and generates a hash (of the UTF-8 encoded string)

Note that while SHA-256 and SHA-512 are both members of the SHA-2 family, there is little common code, so they are in separate files here.

More details are available at www.movable-type.co.uk/scripts/sha256.html.

sha512.js

This is a reference implementation of the algorithm described in the FIPS-180-4 standard. It implements the standard very closely, in order to aid in understanding the standard and the algorithm itself.

This comprises:

  • hash: takes a (Unicode) string and generates a hash (of the UTF-8 encoded string)

Note that while SHA-256 and SHA-512 are both members of the SHA-2 family, there is little common code, so they are in separate files here.

More details are available at www.movable-type.co.uk/scripts/sha512.html.

sha3.js

This is a reference implementation of the algorithm described in the FIPS-202 standard. It implements the standard very closely, in order to aid in understanding the standard and the algorithm itself.

This comprises:

  • hash224: takes a (Unicode) string and generates a SHA3/224 hash (of the UTF-8 encoded string)
  • hash256: takes a (Unicode) string and generates a SHA3/256 hash (of the UTF-8 encoded string)
  • hash384: takes a (Unicode) string and generates a SHA3/384 hash (of the UTF-8 encoded string)
  • hash512: takes a (Unicode) string and generates a SHA3/512 hash (of the UTF-8 encoded string)

More details are available at www.movable-type.co.uk/scripts/sha3.html.

tea-block.js

Wheeler & Needham’s Tiny Encryption Algorithm is a simple but powerful encryption algorithm which provides strong encryption in just a few lines of concise, clear code. This implements the (corrected) ‘Block TEA’ variant (xxtea).

The library includes:

  • encrypt a text with a password
  • decrypt an encrypted text
  • encode an array of longs using a 128-bit key
  • decode an encoded array of longs

More details are available at www.movable-type.co.uk/scripts/tea-block.html.

Documentation

Documentation for all these methods is available at www.movable-type.co.uk/scripts/js/crypto/docs.

Browser support

IE9- doesn’t have btoa()/atob(): if you need to support IE9- (no!), you can use David Chambers’ Base64 polyfill.

crypto's People

Contributors

chrisveness 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.