Background
At the heart of lattice-based cryptography is noise sampling, generally from discrete Gaussian distributions. These small noise samples play a crucial role in hiding information during both the key generation and encryption phases in lattice-based cryptosystems. Moreover, it has been shown that the bounded distance decoding problem underlying the Gaussian Sampling can be reduced to the Shortest Vector Problem (SVP) or Closest Vector Problem (CVP). The security reductions from these problems, i.e., SVP and CVP, form the theoretical foundation of lattice-based cryptography.
Although noise sampling could be performed using simpler distributions, e.g., uniform or binomial distributions, this would require increasing the noise levels significantly. Higher noise levels increase the complexity and lower the performance of these cryptosystems. Furthermore, many simpler distributions suffer from information leakage and weaker security guarantees. Hence, the Gaussian distribution represents a highly desirable choice for noise sampling with optimal performance and security trade-offs. Obtaining discrete Gaussian samples with high precision is challenging and non-trivial. It represents one of the main hurdles in the effort to implement a secure scheme and poses a serious bottleneck to achieving good performance in practice. High-precision floating-point arithmetic operations are required to perform a high-precision Gaussian sampling with negligible statistical distance.
Furthermore, achieving security against side-channel attacks has been recognized as an important problem. This is because developing a constant time implementation of Gaussian sampling without incurring major performance penalties is still largely an unsolved problem. Moreover, an efficient implementation of a Gaussian noise sampler without security losses remains elusive. It requires careful timing analysis of the underlying sampling algorithm so that the resulting implementation is constant-time and resistant to side-channel attacks.
The discrete version of the Gaussian distribution over Z with mean 0 and standard deviation σ > 0 is denoted by D
Z,σ and is defined as follows:
1. Let E be a random variable on Z, then
Pr(E = Z) =
1
/
S
e
-Z2/2σ2
Where
S = 1 + 2 ∑ ∞ Z=1
e -Z2/2σ2
and S is the normalization factor & approximately equals σ√
2 π
2. Let E be a random variable on Z, then
Pr(E = Z) =
e -πz2/s2
Here, s > 0, s is the parameter of distribution.
The discrete Gaussian distribution D
L,σ over a Lattice L with standard deviation σ > 0 assigns a probability proportional to as follows:
Let E be a random variable on L, then
Pr(E = x) =
e -|x|2/2σ2
Specifically, when L = Z
m, the discrete Gaussian distribution is the product distribution of m independent copies of D
Z,σ.
Tail bound of the Discrete Gaussian distribution
Tail of the Gaussian distribution is infinitely long and cannot be covered by any sampling algorithm. We need to sample up to a bound known as the
tail bound. A finite tail-bound introduces a statistical difference with the true Gaussian difference. So, the tail bound will depend on the maximum statistical distance allowed by the security
parameters.
For any c > 1, the probability of sampling v from D
Zm,σ satisfies the following inequality
Pr(|v| > cσ√m) =
cme (m/2)(1-c)2
Precision Bound (Why true discrete Gaussian distribution is not feasible?)
The probabilities in a discrete Gaussian distribution
have infinitely long binary representations and hence no algorithm can sample according to the true discrete Gaussian distribution. Secure applications require sampling with high precision to maintain negligible statistical distance from actual distribution.
Let ρ
z denote the true probability of sampling z ∈ Z according to the distribution D
z,σ
Assume that the sampler selects z with probability p
z where |p
z - ρ
z| < ε for some error constant ε > 0.
The statistical distance Δ to the true distribution D
Zm,σ is given by
Δ(ĎZm,σ, DZm,σ) < 2-k + 2mzt∊
Here,
Ď
Zm,σ is approximate discrete Gaussian distribution corresponding to the finite-precision probabilities p
zover m independent samples.
Also,
Pr(|v| > zt : v ← DZm,σ) < 2-k represents the tail bound and k is the security parameter (cryptographic scheme will be k-1 bit secure).
Summary: Probability distribution function for discrete Gaussian distribution is given by
Dσ(x = z) =
1
/
σ√ 2 π
e
-(z-c)2/2σ2
Here, x = random variable defined over Z
c = 0, i.e., Gaussian distribution centered around 0.
The advantage of assuming c = 0 is that there will be symmetry of probability density function and it is
sufficient to generate samples over Z
+ and use a random bit to determine the sign.
For practicality, generate samples in the interval [0, τσ] where τ is positive constant or tail-cut factor. Also, for practical reasons, the probabilities D
σ(x) are calculated only upto n-bit precision and can be denoted by D
nσ.
Sampling Algorithm: A sampling method is required to generate samples from discrete Gaussian distributions. Below are several sampling algorithms and their efficient hardware implementations.