Here we describe static noise estimation in FHE and how it relates to noise flooding. We focus on CKKS, but the same applies to threshold decryption in threshold FHE.
Li and Micciancio showed that
approximate FHE schemes (e.g., CKKS) can leak information about the secret key.
In short, CKKS decryptions give
direct access to the secret key given a ciphertext and a decryption
since the user gets
One solution to the above issue is to change the decryption algorithm
in CKKS to add additional error to the output. That is, given a
CKKS ciphertext
Notice that the number of queries
OpenFHE enables the user to do the following for static estimation, i.e.
determining a good bound for
- It first runs the computation on a fresh secret key-public key pair, independent of the user's key pair, and a message determined by the user. Here, the user can use the actual message or a message picked from a suitable set of messages (representing real data the homomorphic computation is supposed to be computed on).
- OpenFHE estimates the error in the computation by measuring
the noise/precision-loss in the imaginary slots of the decrypted
plaintext. Costache et al. argue that this method accurately estimates noise growth in
FHE according to their heuristics and experiments. It also
has long been used in PALISADE. Note, this means that
OpenFHE only supports real number arithmetic in CKKS.
The parameter
$\mathsf{ct}.t$ is now set according to this estimate. We call this step the$\mathsf{EXEC}\textunderscore\mathsf{NOISE}\textunderscore\mathsf{ESTIMATION}$ execution mode. - Finally, OpenFHE runs the actual computation, with the
users ciphertexts under her secret key, and applies
noise flooding with discrete gaussian noise with
standard deviation
$\sigma = \sqrt{12\tau}2^{s/2}\mathsf{ct}.t$ . We call this mode$\mathsf{EXEC}\textunderscore\mathsf{EVALUATION}$ .
The code for this procedure is in src/examples/pke/ckks-noise-flooding.cpp in OpenFHE. For leveled computations, the code allows for the user to run the static estimation using 64-bit CKKS and the actual computation in 128-bit CKKS.
Footnotes
-
The formula for $\sigma$ in Corollary 2 of the state of the art in noise flooding security has an incorrect $\sqrt{2n}$ factor since the indistinguishablility game is played over the coefficient embedding. ↩