Abstract
Fully Homomorphic Encryption enables arbitrary computations over encrypted data and it has a multitude of applications, e.g., secure cloud computing in healthcare or finance. Multi-Key Homomorphic Encryption (MKHE) further allows to process encrypted data from multiple sources: the data can be encrypted with keys owned by different parties. In this paper, we propose a new variant of MKHE instantiated with the \(\textsf{TFHE}\) scheme. Compared to previous attempts by Chen et al. and by Kwak et al., our scheme achieves computation runtime that is linear in the number of involved parties and it outperforms the faster scheme by a factor of 4.5–\(6.9\times \), at the cost of a slightly extended pre-computation. In addition, for our scheme, we propose and practically evaluate parameters for up to 128 parties, which enjoy the same estimated security as parameters suggested for the previous schemes (100 bits). It is also worth noting that our scheme—unlike the previous schemes—did not experience any error in any of our seven setups, each running \(1\,000\) trials.
This work was supported by the MESRI-BMBF French-German joint project UPCARE (ANR-20-CYAL-0003-01). Find the full version at https://ia.cr/2023/065.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Available at https://gitlab.eurecom.fr/fakub/3-gen-mk-tfhe as 3gen.
- 2.
As noted by the authors, the code serves solely as a proof-of-concept.
References
Acar, A., Aksu, H., Uluagac, A.S., Conti, M.: A survey on homomorphic encryption schemes: Theory and implementation. ACM Comput. Surv. (Csur) 51(4), 1–35 (2018)
Albrecht, M.R.: Contributors: Security Estimates for Lattice Problems. https://github.com/malb/lattice-estimator (2022)
Albrecht, M.R., Player, R., Scott, S.: On the concrete hardness of learning with errors. J. Math. Cryptol. 9(3), 169–203 (2015)
Brakerski, Z.: Fully homomorphic encryption without modulus switching from classical GapSVP. In: Safavi-Naini, R., Canetti, R. (eds.) Advances in Cryptology – CRYPTO 2012, pp. 868–886. Springer Berlin Heidelberg, Berlin, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32009-5_50
Brakerski, Z., Perlman, R.: Lattice-based fully dynamic multi-key fhe with short ciphertexts. In: Robshaw, M., Katz, J. (eds.) Advances in Cryptology – CRYPTO 2016: 36th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 14-18, 2016, Proceedings, Part I, pp. 190–213. Springer Berlin Heidelberg, Berlin, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53018-4_8
Chen, H., Chillotti, I., Song, Y.: Multi-key homomorphic encryption from TFHE. In: Galbraith, S.D., Moriai, S. (eds.) Advances in Cryptology – ASIACRYPT 2019: 25th International Conference on the Theory and Application of Cryptology and Information Security, Kobe, Japan, December 8–12, 2019, Proceedings, Part II, pp. 446–472. Springer International Publishing, Cham (2019). https://doi.org/10.1007/978-3-030-34621-8_16
Chen, H., Dai, W., Kim, M., Song, Y.: Efficient multi-key homomorphic encryption with packed ciphertexts with application to oblivious neural network inference. In: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 395–412 (2019)
Chen, L., Zhang, Z., Wang, X.: Batched Multi-hop Multi-key FHE from Ring-LWE with compact ciphertext extension. In: Kalai, Y., Reyzin, L. (eds.) Theory of Cryptography: 15th International Conference, TCC 2017, Baltimore, MD, USA, November 12-15, 2017, Proceedings, Part II, pp. 597–627. Springer International Publishing, Cham (2017). https://doi.org/10.1007/978-3-319-70503-3_20
Cheon, J.H., Hhan, M., Hong, S., Son, Y.: A hybrid of dual and meet-in-the-middle attack on sparse and ternary secret lwe. IEEE Access 7, 89497–89506 (2019)
Cheon, J.H., Kim, A., Kim, M., Song, Y.: Homomorphic encryption for arithmetic of approximate numbers. In: Takagi, T., Peyrin, T. (eds.) Advances in Cryptology – ASIACRYPT 2017: 23rd International Conference on the Theory and Applications of Cryptology and Information Security, Hong Kong, China, December 3-7, 2017, Proceedings, Part I, pp. 409–437. Springer International Publishing, Cham (2017). https://doi.org/10.1007/978-3-319-70694-8_15
Chillotti, I., Gama, N., Georgieva, M., Izabachène, M.: TFHE: fast fully homomorphic encryption over the torus. J. Cryptol. 33(1), 34–91 (2020)
Clear, M., McGoldrick, C.: Multi-identity and Multi-key Leveled FHE from learning with errors. In: Gennaro, R., Robshaw, M. (eds.) Advances in Cryptology – CRYPTO 2015: 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part II, pp. 630–656. Springer Berlin Heidelberg, Berlin, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48000-7_31
Fan, J., Vercauteren, F.: Somewhat Practical Fully Homomorphic Encryption. Cryptology ePrint Archive, Paper 2012/144 (2012). https://ia.cr/2012/144
Gentry, C.: Fully homomorphic encryption using ideal lattices. In: Proceedings of the forty-first annual ACM symposium on Theory of computing, pp. 169–178 (2009)
Halevi, S., Shoup, V.: Design and implementation of a homomorphic-encryption library. IBM Res. (Manuscript) 6(12–15), 8–36 (2013)
Kim, T., Kwak, H., Lee, D., Seo, J., Song, Y.: Asymptotically faster multi-key homomorphic encryption from homomorphic gadget decomposition. Cryptology ePrint Archive, Paper 2022/347 (2022). https://ia.cr/2022/347
Klemsa, J.: Fast and error-free negacyclic integer convolution using extended fourier transform. In: Dolev, S., Margalit, O., Pinkas, B., Schwarzmann, A. (eds.) Cyber Security Cryptography and Machine Learning: 5th International Symposium, CSCML 2021, Be’er Sheva, Israel, July 8–9, 2021, Proceedings, pp. 282–300. Springer International Publishing, Cham (2021). https://doi.org/10.1007/978-3-030-78086-9_22
Klemsa, J., Önen, M., Akın, Y.: A Practical TFHE-Based Multi-Key Homomorphic Encryption with Linear Complexity and Low Noise Growth. Cryptology ePrint Archive, Paper 2023/065 (2023). https://eprint.iacr.org/2023/065
Kwak, H., Min, S., Song, Y.: Towards Practical Multi-key TFHE: Parallelizable, Key-Compatible, Quasi-linear Complexity. Cryptology ePrint Archive, Paper 2022/1460 (2022), https://ia.cr/2022/1460
López-Alt, A., Tromer, E., Vaikuntanathan, V.: On-the-fly multiparty computation on the cloud via multikey fully homomorphic encryption. In: Proceedings of the Forty-fourth Annual ACM Symposium On Theory Of Computing, pp. 1219–1234 (2012)
Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors over rings. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 1–23. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13190-5_1
Microsoft: SEAL (release 4.1). https://github.com/Microsoft/SEAL (Jan 2023)
Mouchet, C., Troncoso-Pastoriza, J., Bossuat, J.P., Hubaux, J.P.: Multiparty homomorphic encryption from ring-learning-with-errors. Proceedings on Privacy Enhancing Technologies, pp. 291–311 (2021)
Mouchet, C.V., Bossuat, J.P., Troncoso-Pastoriza, J.R., Hubaux, J.P.: Lattigo: A multiparty homomorphic encryption library in go. In: Proceedings of the 8th Workshop on Encrypted Computing and Applied Homomorphic Cryptography, pp. 64–70. No. CONF (2020)
Mukherjee, P., Wichs, D.: Two round multiparty computation via multi-key FHE. In: Fischlin, M., Coron, J.-S. (eds.) Advances in Cryptology – EUROCRYPT 2016: 35th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Vienna, Austria, May 8-12, 2016, Proceedings, Part II, pp. 735–763. Springer Berlin Heidelberg, Berlin, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49896-5_26
NuCypher: TFHE.jl. https://github.com/nucypher/TFHE.jl (2022)
Peikert, C., Shiehian, S.: Multi-key FHE from LWE, Revisited. In: Hirt, M., Smith, A. (eds.) Theory of Cryptography: 14th International Conference, TCC 2016-B, Beijing, China, October 31-November 3, 2016, Proceedings, Part II, pp. 217–238. Springer Berlin Heidelberg, Berlin, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53644-5_9
Regev, O.: On lattices, learning with errors, random linear codes, and cryptography. In: Proceedings of the Thirty-seventh Annual ACM Symposium on Theory of Computing, pp. 84–93 (2005)
SNUCrypto: HEAAN (release 1.1). https://github.com/snucrypto/HEAAN (2018)
SNUPrivacy: MK-TFHE. https://github.com/SNUPrivacy/MKTFHE (2022)
Son, Y., Cheon, J.H.: Revisiting the hybrid attack on sparse secret lwe and application to he parameters. In: Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography, pp. 11–20 (2019)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Technical Description of \(\textsf{TFHE}\)
A Technical Description of \(\textsf{TFHE}\)
We provide a technical description of the \(\textsf{TFHE}\) scheme in a form of self-descriptive algorithms. Parameters and secret keys are considered implicit inputs.
Given security parameter \(\lambda \), generate parameters for:
-
\(\textsf{LWE}\) encryption: dimension n, standard deviation \(\alpha > 0\) (of the noise);
-
\(\textsf{LWE}\) decomposition: base \(B'\), depth \(d'\);
-
set up \(\textsf{LWE}\) gadget vector: \(\textbf{g}' \leftarrow (\nicefrac {1}{B'}, \nicefrac {1}{{B'}^2}, \ldots , \nicefrac {1}{{B'}^{d'}})\);
-
\(\textsf{RLWE}\) encryption: polynomial degree N (a power of two), standard deviation \(\beta > 0\);
-
\(\textsf{RLWE}\) decomposition: base B, depth d;
-
set up \(\textsf{RLWE}\) gadget vector: \(\textbf{g}\leftarrow (\nicefrac {1}{B}, \nicefrac {1}{B^2}, \ldots , \nicefrac {1}{B^d})\).
Other input parameters of the Setup algorithm may include the maximal allowed probability of error, or the plaintext space size (for other than Boolean circuits).
Generate secret keys for:
-
\(\textsf{LWE}\) encryption: \(\textbf{s}{\mathop {\leftarrow }\limits ^{\$}}\mathbb {B} ^n\);
-
\(\textsf{RLWE}\) encryption: \(z {\mathop {\leftarrow }\limits ^{\$}}\mathbb {B} ^{(N)}[X] \), (alternatively \(z_i {\mathop {\leftarrow }\limits ^{\zeta }} \{-1,0,1\}\) for some distribution \(\zeta \)).
For \(\textsf{LWE}\) key \(\textbf{s}\in \mathbb {B} ^n\), we denote \(\bar{\textbf{s}} {:}{=}(1,\textbf{s}) \in \mathbb {B} ^{1+n}\) the extended secret key, similarly for an \(\textsf{RLWE}\) key \(z\in \mathbb {Z} ^{(N)}[X] \), we denote \(\bar{\textbf{z}} {:}{=}(1,z) \in \mathbb {Z} ^{(N)}[X] ^2\).
Given message \(\mu \in \mathbb {T} \), sample fresh mask \(\textbf{a}{\mathop {\leftarrow }\limits ^{\$}}\mathbb {T} ^n\) and noise \(e {\mathop {\leftarrow }\limits ^{\alpha }} \mathbb {T} \). Evaluate \(b \leftarrow -\langle \textbf{s}, \textbf{a}\rangle + \mu + e\) and output \(\bar{\textbf{c}} = (b, \textbf{a}) \in \mathbb {T} ^{1+n}\), an \(\textsf{LWE}\) encryption of \(\mu \). This algorithm is used as the main encryption algorithm of the scheme. We generalize this as well as subsequent algorithms to input vectors and proceed element-by-element.
Given message \(m \in \mathbb {T} ^{(N)}[X] \), sample fresh mask \(a {\mathop {\leftarrow }\limits ^{\$}}\mathbb {T} ^{(N)}[X] \), unless explicitly given. If the pair \((a,z_{in})\) has been used before, output \(\bot \). Otherwise, sample fresh noise \(e \in \mathbb {T} ^{(N)}[X] \), \(e_i {\mathop {\leftarrow }\limits ^{\beta }} \mathbb {T} \), and evaluate \(b \leftarrow -z_{in} \cdot a + m + e\). Output \(\bar{\textbf{c}} = (b, a) \in \mathbb {T} ^{(N)}[X] ^2\), an \(\textsf{RLWE}\) encryption of m. In case a is given, we may limit the output to only b.
Given \(\mathsf {(R)LWE}\) sample \(\bar{\textbf{c}}\), evaluate and output \(\varphi \leftarrow \langle \bar{\textbf{s}}, \bar{\textbf{c}} \rangle \), where \(\bar{\textbf{s}}\) is respective \(\mathsf {(R)LWE}\) extended secret key.
Set \(\mu = \pm \nicefrac {1}{8}\) for b true or false, respectively. Output \(\mathtt{LweSymEncr(\mu )}\).
Output \(\mathtt{LwePhase(\bar{\textbf{c}})} > 0\), assuming \(\mathbb {T} \sim [-\nicefrac {1}{2},\nicefrac {1}{2})\).
Given \(m\in \mathbb {Z} ^{(N)}[X] \), evaluate \(\textbf{Z}\leftarrow \mathtt{RLweSymEncr(\textbf{0})}\), where \(\textbf{0}\) is a vector of 2d zero polynomials (i.e., \(\textbf{Z}\in (\mathbb {T} ^{(N)}[X])^{2d\times 2}\)). Output \(\textbf{Z}+ m\cdot \textbf{G}\), an \(\textsf{RGSW}\) sample of m.
Given \(\textsf{RGSW}\) sample \(\textsf{BK}\) of \(s\in \mathbb {Z} ^{(N)}[X] \), and \(\textsf{RLWE}\) sample (b, a) of \(m\in \mathbb {T} ^{(N)}[X] \), evaluate and output:
which is an \(\textsf{RLWE}\) sample of \(s \cdot m \in \mathbb {T} ^{(N)}[X] \); in \(\textsf{TFHE}\) also referred to as the external product.
Given \(\bar{\textbf{c}} = (b, a_1, \ldots , a_n) \in \mathbb {T} ^{1+n}\), an \(\textsf{LWE}\) sample of \(\mu \in \mathbb {T} \) under key \(\textbf{s}\in \mathbb {B} ^n\); \((\textsf{BK} _i)_{i=1}^n\), \(\textsf{RGSW}\) samples of \(\textbf{s}_i\) under \(\textsf{RLWE}\) key z (aka. blind-rotate keys); and \(\textsf{RLWE}\,\,_z(tv) \in \mathbb {T} ^{(N)}[X] ^2\), (usually trivial) \(\textsf{RLWE}\) sample of \(tv \in \mathbb {T} ^{(N)}[X] \) (aka. test vector), evaluate:
Output \(\textsf{ACC} = \textsf{RLWE}\,\,_z(X^{\tilde{\varphi }} \cdot tv)\), an \(\textsf{RLWE}\) encryption of test vector “rotated” by \(\tilde{\varphi }\), where \(\tilde{\varphi } = \lfloor 2Nb \rceil + s_1 \lfloor 2Na_1 \rceil + \ldots + s_n \lfloor 2Na_n \rceil \approx 2N (\bar{\textbf{s}} \cdot \bar{\textbf{c}}) \approx 2N\mu \).
Given \(\textsf{RLWE}\) key \(z\in \mathbb {Z} ^{(N)}[X] \), output \(\textbf{z}^* \leftarrow (z_0, -z_{N-1},\ldots ,-z_1)\).
Given \(\textsf{RLWE}\) sample \((b,a) \in \mathbb {T} ^{(N)}[X] ^2\) of \(m\in \mathbb {T} ^{(N)}[X]\) under \(\textsf{RLWE}\) key \(z\in \mathbb {Z} ^{(N)}[X]\), output \(\textsf{LWE}\) sample \((b', \textbf{a}') \leftarrow (b_0, a_0, \ldots ,a_{N-1}) \in \mathbb {T} ^{1+N}\) of \(m_0 \in \mathbb {T} \) (the constant term of m) under the extracted \(\textsf{LWE}\) key \(\textbf{z}^* = \texttt{KeyExtract}(z)\).
For \(j \in [1,N]\), evaluate and output a key-switching key for \(z_j\) and \(\textbf{s}\): \(\textsf{KS} _j \leftarrow \texttt{LweSymEncr}\bigl ( \textbf{z}_j^* \cdot \textbf{g}' \bigr )\), where \(\textbf{z}^* \leftarrow \texttt{KeyExtract}(z)\). \(\textsf{KS} _j\) is a \(d'\)-tuple of \(\textsf{LWE}\) samples of \(\textbf{g}'\)-respective fractions of \(\textbf{z}_j^*\) under the key \(\textbf{s}\).
Given \(\textsf{LWE}\) sample \(\bar{\textbf{c}}' = (b',a'_1,\ldots ,a'_N) \in \mathbb {T} ^{1+N}\) (extraction of an \(\textsf{RLWE}\) sample), which encrypts \(\mu \in \mathbb {T} \) under the extraction of an \(\textsf{RLWE}\) key \(\textbf{z}^* = \texttt{KeyExtract}(z)\), and a set of key-switching keys for z and \(\textbf{s}\), evaluate and output
which is an \(\textsf{LWE}\) sample of the same \(\mu \in \mathbb {T} \) under the \(\textsf{LWE}\) key \(\textbf{s}\).
Given \(\textsf{LWE}\) sample \(\bar{\textbf{c}}\) of \(\mu \in \mathbb {T} \) under \(\textsf{LWE}\) key \(\textbf{s}\), test vector \(tv\in \mathbb {T} ^{(N)}[X] \) that encodes a \(\textsf{LUT}\), and two sets of keys for blind-rotate and for key-switching (aka. bootstrapping keys – the evaluation keys of \(\textsf{TFHE}\)), evaluate:
Output \(\bar{\textbf{c}}''\), which is an \(\textsf{LWE}\) sample of—vaguely speaking—“evaluation of the \(\textsf{LUT}\) at \(\mu \)”, under the key \(\textbf{s}\), with a refreshed noise. Details on the encoding of the \(\textsf{LUT}\) are out of the scope of this paper.
Output \(\overline{\textbf{c}}_1 + \overline{\textbf{c}}_2\), which encrypts the sum of input plaintexts. Using just “\(+\)”.
Given encryptions of bools \(b_1\) and \(b_2\) under \(\textsf{LWE}\) key \(\textbf{s}\), and bootstrapping keys for \(\textbf{s}\) and z, set the test vector as \(tv \leftarrow \nicefrac {1}{8} \cdot (1 + X + X^2 + \ldots + X^{N-1})\). Output \(\bar{\textbf{c}}'' \leftarrow \texttt{Bootstrap}\bigl ( \nicefrac {1}{8} - \overline{\textbf{c}}_1 - \overline{\textbf{c}}_2, tv, \{\textsf{BK} _i\}_{i=1}^n, \{\textsf{KS} _j\}_{j=1}^{N} \bigr )\), which is an encryption of \(\lnot (b_1 \wedge b_2)\) under the key \(\textbf{s}\).
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Akın, Y., Klemsa, J., Önen, M. (2024). A Practical TFHE-Based Multi-Key Homomorphic Encryption with Linear Complexity and Low Noise Growth. In: Tsudik, G., Conti, M., Liang, K., Smaragdakis, G. (eds) Computer Security – ESORICS 2023. ESORICS 2023. Lecture Notes in Computer Science, vol 14344. Springer, Cham. https://doi.org/10.1007/978-3-031-50594-2_1
Download citation
DOI: https://doi.org/10.1007/978-3-031-50594-2_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-50593-5
Online ISBN: 978-3-031-50594-2
eBook Packages: Computer ScienceComputer Science (R0)