Documentation

CslibFrontier.Languages.Probabilistic.RandomOracle.ImageCollision

Image collisions in query caches #

Cslib.RandomOracle.HasImageCollision records two distinct keys in an association list whose images under a map agree. It is decidable from equality of keys and images, and it persists when the cache grows.

def Cslib.RandomOracle.HasImageCollision {M Y Z : Type} (φ : M → Y) (cache : List (M × Z)) :

Two distinct keys of the cache have the same image under φ. Unlike RandomOracle.HasOutputCollision (which records a collision between two cached answers), HasImageCollision records a collision of cached queries under φ and does not involve the answers.

Instances For
    @[instance_reducible]
    theorem Cslib.RandomOracle.hasImageCollision_iff {M Y Z : Type} (φ : M → Y) (cache : List (M × Z)) :
    HasImageCollision φ cache ↔ ∃ m ∈ List.map Prod.fst cache, ∃ m' ∈ List.map Prod.fst cache, m ≠ m' ∧ φ m = φ m'

    HasImageCollision depends only on the list of cached queries.

    theorem Cslib.RandomOracle.HasImageCollision.mono {M Y Z : Type} {φ : M → Y} {s t : List (M × Z)} (hst : s ⊆ t) (h : HasImageCollision φ s) :

    A collision persists after adding entries to the cache.