package salsa20

  1. Overview
  2. Docs
Salsa20 family of encryption functions, in pure OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

1.2.0.tar.gz
md5=aabca4d3954543cf8afb5121e0719821
sha512=afe2212ee6f44a32811214b0a369be06ed7806e501adb4e98dd5b0bc0718ce311c8306919813d64ed7a6df3d6147d42ce819488801b863d5cd31079c37120fbb

doc/salsa20/Salsa20/index.html

Module Salsa20Source

The Salsa20 specification specifies a Salsa20/20 encryption function as well as a set of reduced Salsa20/8 and Salsa20/12 encryption functions.

Note that only the 32-byte and 16-byte expansion function are implemented since. The 10-byte expansion functions is not supported, since it's not recommended. If you're interested in this reduced key length, it can still be easily generated.

Sourcetype t

Type of Salsa20 state.

Sourceval create : ?hash:(Cstruct.t -> Cstruct.t) -> Cstruct.t -> Cstruct.t -> t

create ?hash key nonce is state, the Salsa20 encryption/decryption function state. hash is Salsa20_core.salsa20_20_core by default (recommended), Salsa20_core.salsa20_12_core or Salsa20_core.salsa20_8_core could also be used instead. key is either a 32 (recommended) or 16 bytes. nonce is 8 bytes.

Sourceval encrypt : Cstruct.t -> t -> Cstruct.t

encrypt input state is output, the Salsa20 encryption function.

Sourceval decrypt : Cstruct.t -> t -> Cstruct.t

encrypt input state is output, the Salsa20 decryption function.

OCaml

Innovation. Community. Security.