Documentation

CslibFrontier.Crypto.Primitives.Hash.Keccak.Efficient

Uniform polynomial-time certificates for SHA3-512 and SHAKE256 #

This module gives uniform multitape-Turing-machine certificates for the byte-oriented FIPS 202 functions in CslibFrontier.Crypto.Primitives.Hash.Keccak. A byte is represented by exactly eight bits in the same least-significant-bit-first order as the executable specification. Byte strings use the ordinary framed list encoding, and an XOF request pairs that string with a unary output length. The unary length charges every requested output byte.

The fixed Keccak-p[1600, 24] transformation is realized by the direct retained Boolean circuit in CslibFrontier.Crypto.Primitives.Hash.Keccak.Circuit: the uniform certificate below is derived from that construction, not from a finite-function table. Its named compiler separately retains exact time, workspace, input, output, and complete generated transition-table size. The surrounding variable-length sponge proofs in this module are asymptotic certificates; they do not claim a concrete bound for the whole sponge.

Main definitions #

Main results #

A byte as its eight FIPS 202 bits, least significant bit first.

@[reducible, inline]

A byte string as an ordinary framed list of eight-bit little-endian bytes.

@[reducible, inline]

The input to a byte XOF: framed little-endian bytes, followed by a unary output-byte count.

@[reducible, inline]

A split Keccak state as a framed pair: the 64 * rateLanes rate bits first, then the 64 * capacityLanes capacity bits.

Keccak-p[1600, 24] is polynomial-time on every fixed rate/capacity split, by encoding the split as the exact flat state consumed by the retained circuit and converting the result back.

For every fixed Keccak-p[1600] lane split and suffix, the executable byte sponge is uniformly polynomial-time in the framed input bytes and the unary requested output length.

SHA3-512 is uniformly polynomial-time in its framed little-endian input bytes.

SHAKE256 is uniformly polynomial-time when the requested number of output bytes is unary.