Documentation

CslibFrontier.Crypto.Computational.Nonuniform.Advice

Adversaries with advice #

An adversary with advice reads the unary parameter n, an advice word and its challenge word. This module fixes that input encoding and relates such adversaries to uniform ones, in both directions. A uniform adversary is an advice adversary that ignores its advice, and an advice adversary run on empty advice is a uniform adversary. Every notion relative to a fixed advice family thus specializes to its uniform counterpart at empty advice.

Main definitions #

Main results #

@[reducible, inline]
abbrev Cslib.Crypto.encAdvisedInputWith {γ : Type} (encAdvice : γ ↪ List Bool) :

Input ((1ⁿ, advice), x) of an adversary with typed advice encoded by encAdvice: the parameter n in unary paired with the encoded advice, then the challenge word x. The pair (n, advice) is framed, and within it the parameter; x is not.

@[reducible, inline]

Input ((1ⁿ, advice), x) of an adversary with advice: the parameter n in unary paired with the advice word, then the challenge word x. The pair (n, advice) is framed, and within it the parameter; x is not. This is encAdvisedInputWith at the advice word's own encoding.

theorem Cslib.Probability.IsPPT.dropAdvice {β : Type} {output : β ↪ List Bool} {adversary : ℕ → List Bool → ProbComp β} (h : IsPPT output adversary) :
IsPPTOn Crypto.encAdvisedInput output fun (input : (ℕ × List Bool) × List Bool) => adversary input.1.1 input.2

A uniform adversary is an advice adversary that ignores its advice.

theorem Cslib.Probability.IsPPTOn.nilAdvice {β : Type} {output : β ↪ List Bool} {adversary : (ℕ × List Bool) × List Bool → ProbComp β} (h : IsPPTOn Crypto.encAdvisedInput output adversary) :
IsPPT output fun (n : ℕ) (word : List Bool) => adversary ((n, []), word)

An advice adversary run on empty advice is a uniform adversary.