To report a vulnerability please contact us directly using the following email: lattigo@tuneinsight.com.
Lattigo 2.0.0 has been code-reviewed by ELCA in November 2020 and, within the allocated time for the code review, no critical or high-risk issues were found.
Homomorphic encryption schemes are by definition malleable, and are therefore not secure against chosen ciphertext attacks (CCA security). They can be though secure against chosen plaintext attacks (CPA security).
Classified as an approximate decryption scheme, the CKKS scheme is secure as long as the plaintext result of a decryption is only revealed to entities with knowledge of the secret-key. This is because, given a ciphertext
This attack demonstrates that, when using an approximate homomorphic encryption scheme, the usual CPA security may not sufficient depending on the application setting. Many applications do not require to share the result with external parties and are not affected by this attack, but the ones that do must take the appropriate steps to ensure that no key-dependent information is leaked. A homomorphic encryption scheme that provides such functionality and that can be secure when releasing decrypted plaintext to external parties is defined to be CPAD secure. The corresponding indistinguishability notion (IND-CPAD) is defined as "indistinguishability under chosen plaintext attacks with decryption oracles."
Lattigo implements tools to mitigate Li and Micciancio's attack. In particular, the decoding step of CKKS (and its real-number variant R-CKKS) allows the user to specify the desired fixed-point bit-precision.
Let
If at any point of an application, decrypted values have to be shared with external parties, then the user must ensure that each shared plaintext is first sanitized before being shared. To do so, the user must use the
Estimating
- Given a security parameter
$\lambda$ and a circuit$C$ that takes as inputs length-$n$ vectors$\omega$ following a distribution$\chi$ , select the appropriate parameters enabling the homomorphic evaluation of$C(\omega)$ , denoted by$H(C(\omega))$ , which includes the encoding, encryption, evaluation, decryption and decoding. - Sample input vectors
$\omega$ from the distribution$\chi$ and record$\epsilon = C(\omega) - H(C(\omega))$ for each slots. The user should make sure that the underlying circuit computed by$H(C(\cdot))$ is identical to$C(\cdot)$ ; i.e., if the homomorphic implementation$H(C(\cdot))$ uses polynomial approximations, then$C(\cdot)$ should use them too, instead of using the original exact function. Repeat until enough data points are collected to construct a CDF of$\textsf{Pr}[\epsilon > x]$ . - Use the CDF to select the value
$\text{E}[\epsilon]$ such that any given slot will fail with probability$2^{-\varepsilon}$ (where$\varepsilon$ is a user-defined security parameter) to reach$\log_{2}(1/\epsilon)$ bits of precision. - Use the encoder method
$\textsf{DecodePublic}$ with the parameter$\log_{2}(1/\epsilon)$ to decode plaintexts that will be published.
Note that, for composability with differential privacy, the variance of the error introduced by the rounding is