package mirage-crypto

  1. Overview
  2. Docs

Simpler crypto

Mirage-crypto is a cryptographic library.

The overarching API principle is simply mapping inputs to outputs, wherever feasible.

Similar algorithms in the same class (like hashes or block ciphers) are presented as distinct modules sharing the same signature.

The opam package mirage-crypto-rng provides a cryptographically secure pseudo-random number generator, the package mirage-crypto-pk provides public key cryptography.

module Poly1305 : sig ... end

The poly1305 message authentication code

Symmetric-key cryptography

module type AEAD = sig ... end

Authenticated encryption with associated data.

Block ciphers.

Each algorithm, and each mode of operation, is contained in its own separate module.

module Block : sig ... end

Module types for various block cipher modes of operation.

module AES : sig ... end
module DES : sig ... end
val accelerated : [ `XOR | `AES | `GHASH ] list

Operations using non-portable, hardware-dependent implementation in this build of the library.

module Chacha20 : sig ... end

The ChaCha20 cipher proposed by D.J. Bernstein.

module type Stream = sig ... end

General stream cipher type.

module ARC4 : Stream

Alleged Rivest Cipher 4.

OCaml

Innovation. Community. Security.