Documentation

CslibFrontier.Crypto.Computational.GenericGroup.Relabel

Running and relabelling generic group programs #

runLabeled L A runs a program A with private coins against the group oracle of the labeling L ([BS23], Section 16.3, p. 693): fresh coins are uniform, and group queries are answered by answer L.

relabel j A turns a program for labels in S into one for labels in ZMod q, through an injection j : ZMod q ↪ S: it answers each query of A with at most one query of its own and translates labels by j. Against a permutation σ of ZMod q, the relabelled program behaves as A against the labeling j ∘ σ (runLabeled_relabel), and it makes no more queries than A (isQueryBounded_relabel). Since a uniform injection ZMod q ↪ S is a uniform injection after a uniform permutation (Cslib.Probability.PMF.uniformOfFintype_embedding_bind_perm_trans), a statement about generic groups with labels in S reduces to one with labels in ZMod q and a uniform permutation as labeling, in which no group operation is ever rejected. This replaces the set S′ and the resampling of the book's Game 1 in the proof of Theorem 16.3. The names in this file are this library's.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.GenericGroup.runLabeled {q : ℕ} {S α : Type} (L : ZMod q → S) (program : ProbOracleComp (GroupOracleSpec q S) α) :
PMF α

Run a program with private coins against the group oracle of the labeling L: coins are uniform and group queries are answered by answer L.

noncomputable def Cslib.Crypto.GenericGroup.relabel {q : ℕ} {S α : Type} (j : ZMod q ↪ S) (A : ProbOracleComp (GroupOracleSpec q S) α) :

The program for labels in ZMod q that runs A and answers its queries through j, with at most one query for each query of A.

theorem Cslib.Crypto.GenericGroup.runLabeled_relabel {q : ℕ} {S α : Type} (j : ZMod q ↪ S) (σ : Equiv.Perm (ZMod q)) (A : ProbOracleComp (GroupOracleSpec q S) α) :
runLabeled (⇑σ) (relabel j A) = runLabeled (fun (β : ZMod q) => j (σ β)) A

Against a permutation σ of ZMod q, the relabelled program has the law of A against the labeling j ∘ σ.

Relabelling makes at most as many queries as the program: this is the query-count certificate of the reduction.