Documentation

VCVio.CryptoFoundations.HardnessAssumptions.OneWay

One-Way Functions and Trapdoor Permutations #

This file defines one-way functions (OWFs) and one-way trapdoor permutations (OW-TDPs), along with their security experiments.

One-Way Functions #

A function f : X → Y is one-way if no efficient adversary, given f(x) for a random x, can find any preimage x' with f(x') = f(x).

Trapdoor Permutations #

A trapdoor permutation has a key generation algorithm that produces a public key pk and a secret key sk. The forward direction f(pk, ·) is a permutation that is hard to invert given only pk; the secret key enables efficient inversion via f⁻¹(sk, ·).

Main Definitions #

One-Way Functions #

An OWF adversary receives f(x) and tries to find a preimage.

Instances For
    def OneWay.owfExp {X Y : Type} [SampleableType X] [DecidableEq Y] (f : XY) (adversary : OWFAdversary X Y) :

    One-wayness experiment: sample x uniformly, give the adversary f(x), and check whether the adversary's output is a valid preimage.

    Instances For
      noncomputable def OneWay.owfAdvantage {X Y : Type} [SampleableType X] [DecidableEq Y] (f : XY) (adversary : OWFAdversary X Y) :

      OWF advantage: the probability of successfully inverting f.

      Instances For

        Trapdoor Permutations #

        structure OneWay.TrapdoorPermutation (PK SK X : Type) :

        A trapdoor permutation with key spaces PK/SK and domain X. The forward direction is a permutation computable from the public key; the inverse requires the secret key (the trapdoor).

        • keygen : ProbComp (PK × SK)
        • forward : PKXX
        • inverse : SKXX
        Instances For

          A trapdoor permutation is correct if inversion recovers the original input for all honestly generated key pairs.

          Instances For

            A TDP adversary receives the public key and a challenge y = f(pk, x), and tries to find a valid preimage of y.

            Instances For
              def OneWay.tdpExp {X PK SK : Type} [SampleableType X] [DecidableEq X] (tdp : TrapdoorPermutation PK SK X) (adversary : TDPAdversary PK X) :

              TDP inversion experiment: generate keys, sample x uniformly, and check whether the adversary outputs a valid preimage of f(pk, x).

              Instances For
                noncomputable def OneWay.tdpAdvantage {X PK SK : Type} [SampleableType X] [DecidableEq X] (tdp : TrapdoorPermutation PK SK X) (adversary : TDPAdversary PK X) :

                TDP advantage: the probability of successfully producing a valid preimage without the trapdoor.

                Instances For