Documentation

Complexity.Crypto.Computational.Homomorphic.GSW.Sampling.Serialized

Serialized GSW random inputs #

The key-input sampler returns a secret list, a list of public-matrix rows and a signed error list. The encryption coins retain the three indices (n + 1) × w × m as nested lists. All dimensions use unary encodings, residues use binary natural encodings, and errors use the signed binary integer encoding. The strict PPT certificates charge the complete framed output.

These certificates concern random-input generation. They do not certify modular matrix arithmetic, the complete GSW key-generation or encryption algorithms, or computational security.

Main definitions #

Main results #

References #

@[reducible, inline]

Secret entries, public-matrix rows and signed errors, without dependent dimensions.

Instances For
    @[reducible, inline]

    Binary residues and signed binary errors, with all list and pair framing.

    Instances For
      @[reducible, inline]

      Encryption coins with the three indices (n + 1) × w × m kept in order.

      Instances For
        @[reducible, inline]

        Two framed list levels around each raw Boolean row.

        Instances For

          Independently sample every key-input entry using binary residues and signed errors.

          Instances For

            Independently sample the Boolean entries of the encryption matrix in index order.

            Instances For

              List every residue's canonical representative and every signed error in coordinate order.

              Instances For

                Read fixed dimensions from arbitrary lists, padding absent entries with zero and reducing natural representatives modulo 2 ^ w. Excess entries are ignored.

                Instances For
                  @[simp]

                  Canonical lists decode to their original typed key inputs, including empty dimensions.

                  List all three encryption-coin indices without flattening or reordering them.

                  Instances For

                    Read the encryption-coin matrix from arbitrary nested lists, padding absent entries with false and ignoring excess entries.

                    Instances For
                      @[simp]
                      theorem Cslib.Crypto.Homomorphic.GSW.decode_serializeCoins {n m w : ℕ} (coins : Matrix (Fin (n + 1) × Fin w) (Fin m) Bool) :
                      decodeCoins n m w (serializeCoins coins) = coins

                      Canonical coin lists decode to the original matrix, including empty dimensions.

                      The efficient key-input sampler has exactly the typed sampler's joint law, including the independence of the secret, public-matrix part and signed errors.

                      The efficient coin sampler has exactly the typed binary matrix's full joint law.

                      Decoding the efficient sampled lists recovers the mathematical key-input sampler.

                      Decoding the efficient sampled lists recovers the mathematical encryption-coin sampler.

                      Uniform strict PPT generation of every serialized key input. The dimensions may depend on the caller's complete encoded input; no finite-rank output encoding is used.

                      Uniform strict PPT generation of the complete encryption coin matrix, including zero dimensions. Every row and outer list delimiter is charged by the output encoding.