Documentation

CatCryptCore.Examples.Cryptobox.SAE

SAE: Single-instance Authenticated Encryption Game #

The SAE game captures the security of a single symmetric encryption instance, parameterized by a Nonce-Based Symmetric Encryption Scheme (NBSES).

Overview #

Two variants parameterized by b : Bool:

Oracles #

References #

Heap Locations #

State is stored in the global heap via typed locations. Locations are @[reducible] so that .ty reduces for type checking.

@[reducible]

The single shared encryption key.

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

    Encryption log indexed by nonce: maps each nonce to an optional (plaintext, ciphertext) pair recorded during ideal encryption.

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

      Whether the key has been generated.

      Equations
      Instances For

        Oracle Definitions #

        Each oracle is an SPComp computation that reads/writes heap locations. The b : Bool parameter in saeEncOracle and saeDecOracle switches between real and ideal behavior.

        SGEN oracle: generate and store a fresh random shared key. Fails if the key has already been generated.

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

          SENC oracle: encrypt a message under a nonce.

          • b = false (real): encrypt with the stored key
          • b = true (ideal): sample a random ciphertext, log the (message, ciphertext) pair at the given nonce; fails if the nonce was already used (honesty check)
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            SDEC oracle: decrypt a ciphertext under a nonce.

            • b = false (real): decrypt with the stored key
            • b = true (ideal): look up the nonce in the log; if the ciphertext matches the logged one, return the logged plaintext; otherwise fail
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Oracle Record #

              SAE Game #

              SAE game parameterized by real/ideal behavior b.

              • b = false: real — encrypt/decrypt with actual key
              • b = true: ideal — encrypt returns random ciphertext, decrypt checks log
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                SAE Advantage #

                SAE advantage: distinguishing distance between real and ideal games.

                Equations
                Instances For