Regev public-key encryption #
Regev's bit encryption scheme [Regev2009, Section 5] in the presentation of
[Peikert2016, Section 5.2.1], at modulus q = 2 ^ w. The public key is the decision-LWE matrix
A = [B * t + e | B] of LWE.publicMatrixInt, generated by the LWE key generator LWE.keyGen;
the secret key is t. A bit μ is encrypted with a uniform binary coin vector x ∈ {0, 1}^m as
the row vector xᵀ A + (μ * 2 ^ (w - 1), 0, …, 0), and decrypted by rounding its inner product
with (1, -t), which equals μ * 2 ^ (w - 1) + ⟨x, e⟩.
The security statements are concrete and make no efficiency assumption on the adversary.
Under a uniform public matrix, the binary subset sums xᵀ A of independent coin vectors are
jointly close to uniform by the leftover hash lemma for x ↦ xᵀ A
(BitString.SubsetSum.dist_bind_mul_le). This bounds the advantage of every adaptive
left-or-right adversary making Q encryption queries by Q * sqrt(2 ^ ((n + 1) * w) / 2 ^ m).
Replacing the generated public key by a uniform matrix costs the advantage of two explicit
decision-LWE distinguishers, one for each challenge bit. Native runtime certificates and the
asymptotic single-challenge and adaptive Q-query left-or-right theorems are in
LWE.Regev.Security.
Main definitions #
Regev.encryptWithCoins,Regev.decrypt: encryption with explicit binary coins and rounding decryption (usingLWE.encodeBitandLWE.decode).Regev.noise: the integer decryption noise⟨x, e⟩.Regev.encrypt: the encryption program sampling uniform binary coins.Regev.LoRAdversary,Regev.lorRun,Regev.lorGame: an adaptiveQ-query left-or-right adversary, its interaction with an encryption oracle, and the experiment for a public-key law.Regev.idealLorGame: the interaction in which every answer is an independent uniform vector.Regev.challengeGame: the single-challenge experiment, the left-or-right experimentlrExperimentof a typedTwoStageadversary on a public key drawn from a key law.Regev.ChallengeState,Regev.LoRAdversary.ofChallenge: a single-challenge adversary as a one-query left-or-right adversary, whose state records the challenge pair, the saved state and the challenge ciphertext.Regev.lorDistinguisher: the typed decision-LWE distinguisher that runs theQ-query experiment for one challenge bit on the supplied matrix.
Main results #
Regev.encryptWithCoins_dotProduct_secretVector: the exact decryption residual.Regev.decrypt_encryptWithCoins,Regev.keyGen_encrypt_correct: zero decryption error when4 * (m * η) < 2 ^ wfor errors bounded byη.Regev.dist_lorGame_uniform_ideal_le,Regev.lorGame_uniform_advantage_le: the leftover-hash bound for adaptiveQ-query left-or-right security under a uniform public matrix.Regev.challengeGame_uniform_advantage_le: the single-challenge caseQ = 1.Regev.lorGame_advantage_le: theQ-query advantage under the actual LWE public-key law is at most the two decision-LWE advantages plus the leftover-hash term.
References #
A ciphertext is one row vector of n + 1 residues modulo 2 ^ w.
A public key is an m × (n + 1) matrix modulo 2 ^ w, of the shape [B * t + e | B].
Encrypt μ with binary coins x as xᵀ A + (LWE.encodeBit w μ, 0, …, 0).
Decrypt by rounding the inner product with the secret vector (1, -t).
Encrypt with independent uniform binary coins.
Encryption draws its coin vector uniformly.
The decryption residual: ⟨c, (1, -t)⟩ = μ * 2 ^ (w - 1) + ⟨x, e⟩ modulo 2 ^ w.
Zero decryption error: every coin vector decrypts correctly when 4 * (m * bound) < 2 ^ w.
Every key generated with centered-binomial errors of parameter η and every supported
ciphertext decrypt correctly under the strict margin 4 * (m * η) < 2 ^ w.
Adaptive left-or-right security #
An adaptive left-or-right adversary. It receives the public matrix, repeatedly chooses a pair of bits and absorbs the ciphertext of the selected one, and finally guesses. Absorption is deterministic without loss of generality: the state may record the full transcript, and later stages are randomized.
Receive the public matrix.
Choose the next pair of challenge bits.
- receive : State → Ciphertext n w → State
Absorb the answer to the last query.
Output the final guess.
Answer q adaptive queries, encrypting the message of each pair selected by bit (msg₀ for
false, msg₁ for true) with the oracle enc.
The adaptive Q-query left-or-right experiment with public keys drawn from keys; every
query is answered by a fresh encryption under the drawn key.
The ideal experiment under a uniform public matrix: every answer is an independent uniform vector, independent of the challenge bit.
Under a uniform public matrix, each side of the adaptive Q-query experiment is within
Q * sqrt(2 ^ ((n + 1) * w) / 2 ^ m) / 2 of the ideal experiment. No efficiency or finiteness
assumption is imposed on the adversary.
The leftover-hash bound for adaptive left-or-right security with Q queries under a
uniform public matrix.
The single-challenge experiment: draw a public matrix from keys and run the left-or-right
experiment lrExperiment with Regev encryption. Every challenge pair is admissible. The typed
adversary's first stage sees the public matrix and chooses a pair of bits and a state; its second
stage sees that state and the challenge ciphertext.
The state of LoRAdversary.ofChallenge: the challenge pair and saved state chosen by the first
stage, and the challenge ciphertext received (0 before the query is answered).
- pair : MessagePair Bool
The pair of challenge bits chosen by the first stage.
- saved : State
The state saved by the first stage.
- ciphertext : Ciphertext n w
The challenge ciphertext.
A single-challenge adversary as a one-query left-or-right adversary: the first stage starts the interaction, the only query is its challenge pair, and the second stage guesses from the saved state and the answer.
The single-challenge experiment is the one-query left-or-right experiment.
Single-challenge security under a uniform public matrix: advantage at most
sqrt(2 ^ ((n + 1) * w) / 2 ^ m).
The decision-LWE distinguisher for one challenge bit: run the Q-query experiment on the
supplied matrix as public key.
The experiment under a key law averages the per-key distinguisher.
Concrete adaptive Q-query left-or-right security under the actual public-key law: the
advantage is at most the decision-LWE advantages of lorDistinguisher Q adversary false and
lorDistinguisher Q adversary true, plus the leftover-hash term. The error law errorLaw is
arbitrary.