B-1.2 LWE Cryptosystem

The LWE cryptosystem uses the following encryption formula: b = s→ ⋅a→ + Δ ⋅m + e (where s→ is a secret key, a→ is a publicly known random vector picked per encryption, m is a plaintext, e is small noise randomly picked per encryption from a normal distribution, and b is a ciphertext). Δ is a scaling factor of the plaintext M (shifting m by log2Δ bits to the left). Before encrypting the plaintext, we left-shift the plaintext several bits (i.e., log2Δ bits) to secure sufficient space to store the error in the lower bits.

PIC

Figure 8: An illustration of LWE’s plaintext scaling and adding a noise: Δ ⋅m + e ∈ ℤq

Figure 8 visually illustrates the term Δ ⋅m + e, where the plaintext m left-shifted by log2Δ bits and noised by the noise e. The actual encryption and decryption formulas are as follows:

⟨Summary B-1.2⟩ Lattice-based LWE Cryptosystem

⌊⌉Δ means rounding the number to the nearest multiple of Δ. For example, ⌊16⌉10 = 20, which is rounding 16 to the nearest multiple of 10. As another example, ⌊17⌉8 = 16, which rounds 17 to the nearest multiple of 8 (note that 17 is closer to 16 than to 24; thus, it is rounded to 16).

Correctness: In the decryption scheme, computing b⟨i⟩−s→ ⋅a→⟨i⟩ gives Δ ⋅m⟨i⟩+ e⟨i⟩, which is Figure 8. Then, ⌈Δ ⋅m⟨i⟩+ e⟨i⟩⌋Δ (i.e., rounding the value to the nearest multiple of Δ) gives Δ ⋅m⟨i⟩, provided the added noise |e⟨i⟩|< Δ 2 . That is, if the noise is less than Δ 2 , it will disappear during the rounding. Finally, right-shifting Δ ⋅m⟨i⟩ by log2Δ bits gives m⟨i⟩. To summarize, if we ensure |e⟨i⟩|< Δ 2 (which is why the noise e⟨i⟩ should be smaller than this threshold), then we can eliminate e⟨i⟩ during the decryption’s rounding process and retrieve the original Δ ⋅m⟨i⟩. The reason we scaled m⟨i⟩ by Δ is to: (i) create space for storing e⟨i⟩ in the lower bits during encryption such that the noise bits do not interfere with the plaintext bits (to avoid corrupting the plaintext bits); and (ii) blow away the noise e⟨i⟩ stored in the lower bits during decryption without corrupting the plaintext m⟨i⟩.

Security: Given that an attacker has a large list of (a→⟨i⟩,b⟨i⟩) (i.e., many ciphertexts), it is almost impossible for them to derive s→, due to the random noise e⟨i⟩ added in each encryption (which is a search-hard problem described in §B-1.1). This is because even small added unknown noises e⟨i⟩ greatly change the mathematical solution for s→ that satisfies all the b⟨i⟩ = s→ ⋅a→⟨i⟩+ Δ ⋅m⟨i⟩+ e⟨i⟩ equations.

Even in the case that the attacker has a large list of (a→(j),b(j)) generated for the same ciphertext m⟨i⟩ (where each ciphertext used different a→(j) and e(j) to encrypt the same m⟨i⟩), he still cannot derive m⟨i⟩, because a randomly picked different noise e(j) is used for every (a→(j),b(j)) and is accumulated over ciphertexts, which exponentially complicates the difficulty of the linear algebra involved in solving s→. Also, in the actual cryptosystem (§B-2), the publicly known random vector a→⟨i⟩ and the secret key s→ are not a single number but a long vector comprising many random numbers. Thus, adding a→⟨i⟩⋅s→ to Δm⟨i⟩+ e⟨i⟩ increases the entropy of randomness against the attack.

To summarize, lattice-based cryptography hides plaintext by adding the encryption component s→ ⋅a→ to it, along with a small random noise e. During decryption, the secret key owner re-creates this encryption component a→ ⋅s→ by using her s→ and removes it. She then removes the noise e using the rounding technique and finally right-shifts the remaining Δm by log2Δ bits to get m.