Documentation

Complexity.Computability.Probabilistic.LinearHash

Polynomial-time binary linear hashing #

Matrix hashing uses the shared row parser and Boolean folds. Both certificates allow computed input and output lengths, arbitrary input encodings, and short matrix seeds padded with zero. The full extractor charges sampling, hashing and copying its complete public seed and digest.

Main results #

References #

Adapted from Computability/Probabilistic/LinearHash.lean on the cslib crypto branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8, using the tidy machine calculus.

Hash plain polynomial-time words, retaining unary output dimensions and the full input.

theorem Cslib.BitString.LinearHash.isPPTOn_extract {α : Type} {encode : α ↪ List Bool} {count : α → ℕ} {input : α → List Bool} (hcount : Turing.MultiTapeTM.ComputableInPolyTime count encode Turing.MultiTapeTM.encUnary) (hinput : Turing.MultiTapeTM.ComputableInPolyTime input encode Turing.MultiTapeTM.encBits) :
Probability.IsPPTOn encode Turing.MultiTapeTM.encBits fun (a : α) => extract (count a) (input a)

The complete extractor is uniformly strict PPT, including the revealed matrix seed.