Executable serialized GSW keys and ciphertexts #
Residues are written with exactly w bits, least significant first, and matrices are row major.
The dimensions are explicit inputs to the algorithms. Missing list entries and bits are zero;
excess data is ignored. Integer errors are reduced by Euclidean remainder, so negative errors
wrap correctly. These conventions specify total behavior on malformed inputs.
The programs below compute the public matrix and ciphertext of Gentry, Sahai and Waters, Section 3.1. The computational certificates are separate from the exact algebraic bridges. No security or bootstrappability is asserted.
Main definitions #
serializePublicMatrix,serializeSecret,serializeCiphertext: canonical typed words.publicMatrixSerialized,encryptWithCoinsSerialized: total deterministic computations.keyGenSerialized,encryptSerialized: the actual probabilistic word-valued algorithms.
Main results #
decode_serializeSecret,decode_serializeCiphertext: exact typed roundtrips.length_serializePublicMatrix,length_serializeSecret,length_serializeCiphertext: complete fixed-width output lengths.
Exact deterministic and distributional bridges are in GSW.Serialized.Correctness; native
certificates for the complete programs are in GSW.Serialized.PolyTime.
References #
Canonical secret words retain every residue.
Ciphertext coordinates (i, k) are ordered by i * w + k, in rows and columns.
Instances For
Total ciphertext decoding uses the declared dimensions and pads absent bits with false.
Instances For
Canonical ciphertext words retain every bit.
The complete ciphertext has the expected square number of bits.
Compute the leading entry B * secret + error of a public row in binary arithmetic.
Instances For
Compute the public word from arbitrary serialized sampled inputs.
Instances For
One entry of message * G + R * A, before its bit decomposition.
Instances For
Compute all ciphertext bits from the actual public word, message and Boolean coins.