Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


npm npm Dependency Status Github Issues Github Releases GitHub license

Mobile Cipher crypto library written in clean TypeScript

Highligths and design goals

There are a lot of crypto libs in JS around, but I needed a clean, lightweight, reliable, fast and simple lib for mobile devices in TypeScript. That's mipher.
A collection of common crypto algorithms, optimized for speed, security and size.

  • Only usage of modern typed arrays like Uint8Array and Uint32Array as message/data types
  • Fast and simple, no dependencies
  • Own crypto random generator (using a FORTUNA implementation)
  • Extensive passing test suite
  • MIT license

Supported algorithms

  • AES
  • Serpent
  • Chacha20
  • Curve25519, Ed25519
  • HMAC
  • PBKDF2
  • SHA-1, SHA-256, SHA-512, SHA-3, Keccak, SHAKE
  • UUID
  • Random generator
  • Blockmodes (ECB, CBC, CTR)
  • Padding (PKCS5, PKCS7, zero padding)
  • Format converter (bin, number, hex, base64, string)
  • Utils (xor, cryptocompare etc.)


Import the mipher module as mipher and create your according crypto object:

import * as mipher from 'mipher';

let aes = new mipher.AES();
let ct  = aes.encrypt(key, pt);

Test suite

mipher is using the mocha test suite for testing. To do all tests just run npm run test.


If you find any bugs, have any comments, improvements or suggestions:

  1. Create an issue and describe your idea
  2. Fork it
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Publish the branch (git push origin my-new-feature)
  6. Create a new pull request
  7. Profit!


mipher is written under the MIT license.