Statistical homomorphism of word-encoded Paillier encryption #
The word algorithm Paillier.encrypt samples a residue using fair coins and replaces nonunits
by 1. Its randomness is close to uniform on the units, but is not exactly uniform. This module
compares that implemented ciphertext distribution with paillierEncrypt, which samples a
uniform unit, and transfers the latter's exact additive homomorphism to statistical closeness.
For a balanced modulus N = p * q with both factors having at least n bits, word encryption
is within 5 / 2 ^ n of encoded uniform-unit encryption. Multiplying a supported ciphertext of
m₁ by a fresh word encryption of m₂ is within 10 / 2 ^ n of fresh word encryption of
m₁ + m₂. The same bound holds for two independently sampled ciphertexts: the first ciphertext
can be fixed throughout the comparison, so it incurs no additional sampling error.
These original approximation bounds are unconditional results for the existing word algorithms.
They do not assert the exact distributional condition of [KL20], Definition 15.14,
which fails for this sampler, or introduce a new security assumption. CloseTo quantifies over
every event on the full ciphertext words and is preserved by any deterministic or randomized
continuation.
Main results #
Cslib.Crypto.Paillier.closeTo_encrypt_paillierEncrypt: the word encryption law is close to the encoded uniform-unit encryption law.Cslib.Crypto.Paillier.closeTo_addCiphertexts_encrypt: multiplying a supported ciphertext by fresh encryption is close to fresh encryption of the sum.Cslib.Crypto.Paillier.closeTo_addCiphertexts: the product of two independent encryptions is close to fresh encryption of the sum.
Word encryption with the actual dyadic sampler is within 5 / 2 ^ n of encryption with
uniform unit randomness, with both laws represented by the same ciphertext words.
Multiplying any supported word ciphertext of m₁ by a fresh word encryption of m₂ is
within 10 / 2 ^ n of fresh word encryption of m₁ + m₂. Only the fresh randomness is replaced
by uniform unit randomness in the comparison.
Multiplying two independent word encryptions is within 10 / 2 ^ n of fresh word
encryption of the sum. The bound is uniform in the first ciphertext, so averaging over it adds
no error.