facil.io

#./fio-stl/152 sha3.h

17 public symbols.

#Types

#fio_sha3_s

c
typedef struct {
uint64_t state[25];
uint8_t buf[200]; /* rate buffer (max rate = 1600 - 2*capacity) */
size_t buflen; /* bytes in buffer */
size_t rate; /* rate in bytes */
size_t outlen; /* output length in bytes (0 for SHAKE) */
uint8_t delim; /* domain separation byte */
} fio_sha3_s

Keccak state (1600 bits = 200 bytes = 25 x 64-bit words)

Symbol type: type

#Functions

#fio_sha3_224_init

c
inline fio_sha3_s fio_sha3_224_init(void)

Initialize SHA3-224 (28-byte output).

Symbol type: function

#fio_sha3_256_init

c
inline fio_sha3_s fio_sha3_256_init(void)

Initialize SHA3-256 (32-byte output).

Symbol type: function

#fio_sha3_384_init

c
inline fio_sha3_s fio_sha3_384_init(void)

Initialize SHA3-384 (48-byte output).

Symbol type: function

#fio_sha3_512_init

c
inline fio_sha3_s fio_sha3_512_init(void)

Initialize SHA3-512 (64-byte output).

Symbol type: function

#fio_sha3_consume

c
void fio_sha3_consume(fio_sha3_s *restrict h, const void *restrict data, size_t len)

Feed data into SHA3 hash.

Symbol type: function

#fio_sha3_finalize

c
void fio_sha3_finalize(fio_sha3_s *restrict h, void *restrict out)

Finalize SHA3 hash. Writes h->outlen bytes to out.

Symbol type: function

#fio_sha3_224

c
void fio_sha3_224(void *restrict out, const void *restrict data, size_t len)

Simple SHA3-224 (28-byte output).

Symbol type: function

#fio_sha3_256

c
void fio_sha3_256(void *restrict out, const void *restrict data, size_t len)

Simple SHA3-256 (32-byte output).

Symbol type: function

#fio_sha3_384

c
void fio_sha3_384(void *restrict out, const void *restrict data, size_t len)

Simple SHA3-384 (48-byte output).

Symbol type: function

#fio_sha3_512

c
void fio_sha3_512(void *restrict out, const void *restrict data, size_t len)

Simple SHA3-512 (64-byte output).

Symbol type: function

#fio_shake128_init

c
inline fio_sha3_s fio_shake128_init(void)

Initialize SHAKE128 (variable output length).

Symbol type: function

#fio_shake256_init

c
inline fio_sha3_s fio_shake256_init(void)

Initialize SHAKE256 (variable output length).

Symbol type: function

#fio_shake_consume

c
#define fio_shake_consume fio_sha3_consume

Feed data into SHAKE.

Note: this may be a macro only / macro wrapper for a function.

Symbol type: macro

#fio_shake_squeeze

c
void fio_shake_squeeze(fio_sha3_s *restrict h, void *restrict out, size_t outlen)

Squeeze output from SHAKE. Can be called multiple times.

Symbol type: function

#fio_shake128

c
void fio_shake128(void *restrict out, size_t outlen, const void *restrict data, size_t len)

Simple SHAKE128 with specified output length.

Symbol type: function

#fio_shake256

c
void fio_shake256(void *restrict out, size_t outlen, const void *restrict data, size_t len)

Simple SHAKE256 with specified output length.

Symbol type: function