`SHAKE` and `cSHAKE` XOF algorithm families. The SHA3 hash algorithm can be found in the crypto/sha3. See: - [[ https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.202.pdf ]] - [[ https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-185.pdf ]]

Collection Info

View Source
Collection
core
Path
crypto/shake
Entries
9

Source Files

Types

1

Procedures

8

init_cshake_128 #

Source
init_cshake_128 :: proc(ctx: ^Context, domain_sep: []u8) {…}

init_cshake_128 initializes a Context for cSHAKE128.

init_cshake_256 #

Source
init_cshake_256 :: proc(ctx: ^Context, domain_sep: []u8) {…}

init_cshake_256 initializes a Context for cSHAKE256.

read #

Source
read :: proc(ctx: ^Context, dst: []u8) {…}

read reads output from the SHAKE instance. There is no practical upper limit to the amount of data that can be read from SHAKE. After read has been called one or more times, further calls to write will panic.

reset #

Source
reset :: proc(ctx: ^Context) {…}

reset sanitizes the Context. The Context must be re-initialized to be used again.

write #

Source
write :: proc(ctx: ^Context, data: []u8) {…}

write writes more data into the SHAKE instance. This MUST not be called after any reads have been done, and attempts to do so will panic.