Module Hacl_star__Hacl.Keccak

SHAKE-128, SHAKE-256, and the general Keccak function

Contrary to other Keccak/SHA-3 variants, SHAKE-128 and SHAKE-256 produce digests of any size. When calling these functions, it will correspond to the size of the digest buffer.

val shake128 : msg:bytes -> size:int -> bytes

shake128 msg size hashes msg using SHAKE-128 and returns a digest of size bytes.

val shake256 : msg:bytes -> size:int -> bytes

shake256 msg size hashes msg using SHAKE-256 and returns a digest of size bytes.

val keccak : rate:int -> capacity:int -> suffix:int -> msg:bytes -> size:int -> bytes

Direct access to the general Keccak function, of which all the SHA-3 and SHAKE functions are instances. While the library does run some sanity checks for the parameters, users should be extremely careful if using the Keccak function directly.

module Noalloc : sig ... end

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