{-# OPTIONS --without-K #-}
open import Type
open import Data.Two
open import Data.Product
module Game.EntropySmoothing.WithKey
(M : ★)
(Key : ★)
(Hash : ★)
(ℋ : Key → M → Hash)
(Rₐ : ★)
where
Adversary : ★
Adversary = Rₐ → Key → Hash → 𝟚
R : ★
R = Key × M × Hash × Rₐ
Experiment : ★
Experiment = Adversary → R → 𝟚
EXP₀ : Experiment
EXP₀ A (k , m , _ , rₐ) = A rₐ k (ℋ k m)
EXP₁ : Experiment
EXP₁ A (k , _ , h , rₐ) = A rₐ k h
EXP : 𝟚 → Experiment
EXP = proj (EXP₀ , EXP₁)
game : Adversary → 𝟚 × R → 𝟚
game A (b , r) = EXP b A r