package hacl-star

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Versions of these functions which write their output in a buffer passed in as an argument

Buffers have the following size requirements:

  • ct must be 16 bytes longer than pt to also include the message authentication tag
  • pk, sk, ck: 32 bytes
  • n: 24 bytes
val box_beforenm : pk:bytes -> sk:bytes -> ck:bytes -> bool

box_beforenm pk sk ck is a version of NaCl.box_beforenm which takes an additional argument ck where the result is written, returning `true` if it is successful.

Buffers pk, sk, and ck must be distinct.

module Easy : sig ... end

The easy interface concatenates the ciphertext and the 16-byte long message authentication tag into a single buffer.

module Detached : sig ... end

The detached interface uses 2 separate buffers for the ciphertext and the message authentication tag. This allows users to encrypt and decrypt data in-place, by passing the same buffer for both plaintext and ciphertext.

OCaml

Innovation. Community. Security.