(a) Solve for the secret sA live instance with n = 6, q = 97, 40 samples b = a⊤s + e (mod q). Two attacks run on whatever data the toggles produce: Gaussian elimination over ℤq, which needs exact equations, and least-squares regression, which needs unwrapped magnitudes. Turn the noise off and elimination wins; turn the modulus off and regression wins; leave both on and each attack sees only a band of middle bits — the modulus discards the high bits, the noise drowns the low ones — and both fail. That combination is LWE.
the data
noise width σ
(b) Fresh samples without the secretChoose r ← {0,1}m and form a′ = Ar, b′ = b⊤r (mod q): a valid pair under the same secret, with noise widened by about √(m/2). The leftover hash lemma makes it genuinely fresh: once m ≥ n log2 q, the vector a′ is ε-close to uniform even given A, with the exact bound ε ≤ ½√(qn/2m) plotted below. Each press mints another sample, appended below as a new row of the dataset — it grows without the secret ever being learned. This is the engine of public-key encryption from LWE: publish samples, encrypt 0 as a generated fresh sample and 1 as a uniform pair; the secret key s tells them apart. Reference: Impagliazzo, Levin & Luby, STOC 1989.
samples m