Documentation

Cryptlib.Protocols.Sphinx.sphinx

The abstract Sphinx interface #

Reference: George Danezis and Ian Goldberg, Sphinx: A Compact and Provably Secure Mix Format, IEEE S&P 2009, https://eprint.iacr.org/2008/475. A bare §n.m in this directory refers to that paper's sections.

A packet scheme with completeness (unwrap_complete), integrity (§4.2) and indistinguishability (§4.4). Wrap-resistance (§4.3) is stated on NIKESphinxScheme only, since it needs a re-blindable group element.

@[reducible, inline]

Counter plus an infinite stream of 32-byte seeds.

Equations
Instances For

    Initial state: counter zero over a seed stream, which must be unpredictable.

    Equations
    Instances For

      n bytes from the seed stream starting at seed i: byte k is byte k % 32 of seed i + k / 32.

      Equations
      Instances For

        Draw n bytes from the seed stream, consuming ⌈n/32⌉ seeds.

        Equations
        Instances For

          Routing-info bytes a nrHops-hop path leaves unused. These are filled with random bytes, not zeros, which would reveal the path length (Kuhn et al., S&P 2020).

          Equations
          Instances For
            def Cryptlib.Protocols.Sphinx.Interface.unwrapChainAux {PrivateKey Command : Type} (unwrap : PrivateKey → (pkt : ByteArray) → Except String (Option ByteArray × Vector UInt8 32 × List Command × Option (Vector UInt8 pkt.size))) :

            Repeatedly unwrap, one key per hop, stopping at the first hop with no forward packet.

            Equations
            Instances For
              Instances For
                @[instance_reducible]
                Equations
                • One or more equations did not get rendered due to their size.