38#ifndef SHARKSSL_KECCAK_H
39#define SHARKSSL_KECCAK_H
43#include "TargConfig.h"
69#if (SHARKSSL_USE_SHAKE || SHARKSSL_USE_MLKEM || SHARKSSL_USE_MLDSA)
SharkSSL feature defaults and dependency checks.
void SharkSslKeccak_clear(SharkSslKeccak *o)
Erase the complete context and leave it inactive.
void SharkSslKeccak_finalize(SharkSslKeccak *o, uint8_t suffix)
Apply padding and switch from message input to output.
void SharkSslKeccak_absorb(SharkSslKeccak *o, const uint8_t *data, size_t len)
Append message bytes before finalization.
struct SharkSslKeccak SharkSslKeccak
Caller-owned sponge storage; treat all members as implementation details.
void SharkSslKeccak_squeeze(SharkSslKeccak *o, uint8_t *out, size_t len)
Read output bytes, continuing where the preceding call stopped.
void SharkSslKeccak_init(SharkSslKeccak *o, unsigned rate)
Initialize or reset a FIPS 202 sponge for the selected algorithm.
@ SHARKSSL_KECCAK_RATE_SHAKE128
SHAKE128 rate in bytes.
Definition: SharkSslKeccak.h:79
@ SHARKSSL_KECCAK_RATE_SHA3_512
SHA3-512 rate in bytes.
Definition: SharkSslKeccak.h:82
@ SHARKSSL_KECCAK_RATE_SHA3_256
SHA3-256 rate in bytes.
Definition: SharkSslKeccak.h:81
@ SHARKSSL_KECCAK_SUFFIX_SHA3
SHA-3 domain suffix.
Definition: SharkSslKeccak.h:83
@ SHARKSSL_KECCAK_SUFFIX_SHAKE
SHAKE domain suffix.
Definition: SharkSslKeccak.h:84
@ SHARKSSL_KECCAK_RATE_SHAKE256
SHAKE256 rate in bytes.
Definition: SharkSslKeccak.h:80
Caller-owned sponge storage; treat all members as implementation details.
Definition: SharkSslKeccak.h:62
uint16_t pos
Internal byte position within the rate.
Definition: SharkSslKeccak.h:65
uint64_t state[25]
Internal permutation lanes; do not modify directly.
Definition: SharkSslKeccak.h:63
uint16_t rate
Internal rate in bytes.
Definition: SharkSslKeccak.h:64
uint8_t squeezing
Internal absorb/output phase flag.
Definition: SharkSslKeccak.h:66