package noise

  1. Overview
  2. Docs
An OCaml implementation of the Noise Protocol Framework (rev 34)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

noise-0.1.0.tbz
sha256=fcd0da39248e25d9c96405d665d2a019b981449967611e1f41aa026c75af9ecc
sha512=450557c5ccb8cc0efb026574918466c59b2585f8c138b873b7501dae129ac21ebb197555ea27839f6f03bb90112055e84d22d051d3989cac3532b2468526b9cd

Description

noise implements the Noise Protocol Framework (https://noiseprotocol.org/) in OCaml. It supports Curve25519 DH, AES-256-GCM and ChaCha20-Poly1305 ciphers, SHA-256, SHA-512, BLAKE2s and BLAKE2b hashes, all fundamental and deferred handshake patterns, and PSK modifiers.

Tags

cryptography networking

Published: 23 Jul 2026

README

ocaml-noise

OCaml implementation of the Noise Protocol Framework.

Not ready for primetime.

More precisely, some primitives are implemented in an ad hoc manner. This passes a good amount of test vectors, but this has not been properly fuzzed and there are no countermeasures with respect to side channel attacks.

What is this NOT?

This is not an implementation of a full cryptographic protocol that you can drop into your application and have secure channels.

What is this?

This is an implementation of the Noise Protocol Framework. It consists of building bricks that can be used to create a secure cryptographic protocol.

Because of the way Noise works, it is possible to process messages in full without dealing with I/O or buffering. So, this library only deals with the handshake and encrypting/decrypting payloads.

How to use this?

Refer to the examples in test/examples/ for an example, but basically:

  • pick a protocol
  • import or generate the relevant keys on each side
  • create initial states using Noise.State.make and Noise.Protocol.initialize
  • drive the handshake using Noise.Protocol.read_message and Noise.Protocol.write_message
  • check that the handshake is completed (see Noise.State.handshake_hash)
  • send transport messages using Noise.Protocol.read_message and Noise.Protocol.write_message

Resources

Dependencies (5)

  1. digestif >= "1.3"
  2. mirage-crypto-ec >= "2.0"
  3. mirage-crypto >= "2.0"
  4. ocaml >= "5.0"
  5. dune >= "3.17"

Dev Dependencies (5)

  1. odoc with-doc
  2. ohex with-test & >= "0.2"
  3. yojson with-test & >= "2.0"
  4. alcotest with-test & >= "1.0"
  5. mirage-crypto-rng with-test & >= "2.0"

Used by

None

Conflicts

None