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 #
Cslib.Crypto.Keccak.encByteLE: the exact eight-bit, least-significant-bit-first byte encoding.Cslib.Crypto.Keccak.encByteStringLE: framed lists of encoded bytes.Cslib.Crypto.Keccak.encByteXofInput: a byte string followed by a unary output-byte count.Cslib.Crypto.Keccak.encSpongeView: framed rate bits followed by framed capacity bits.
Main results #
Cslib.Crypto.Keccak.computableInPolyTime_byteSponge: every fixed lane-aligned layout and suffix has a uniform polynomial-time byte-sponge implementation.Cslib.Crypto.Keccak.computableInPolyTime_sha3512: uniform polynomial time for SHA3-512.Cslib.Crypto.Keccak.computableInPolyTime_shake256: uniform polynomial time for SHAKE256, including its requested output length.
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.