Module orion::hazardous::cshake[][src]

cSHAKE256 as specified in the NIST SP 800-185.

Notes:

The cSHAKE256 implementation currently relies on the tiny-keccak crate. Currently this crate will produce incorrect results on big-endian based systems. See issue here.

Security:

cSHAKE256 has a security strength of 256 bits. The recommended output length for cSHAKE256 is 64.

Example:

use orion::hazardous::cshake;

let input = b"\x00\x01\x02\x03";
let custom = b"Email signature";
let mut out = [0u8; 64];

let mut hash = cshake::init(custom, None).unwrap();
hash.update(input);

hash.finalize(&mut out).unwrap();

Structs

CShake

cSHAKE256 as specified in the NIST SP 800-185.

Functions

init

Initialize a CShake struct.