Abstract
The security of several fully homomorphic encryption (FHE) schemes depends on the intractability assumption of the approximate common divisor (ACD) problem over integers. Subsequent efforts to solve the ACD problem as well as its variants were also developed during the past decade. In this paper, an improved orthogonal lattice (OL)-based algorithm, AIOL, is proposed to solve the general approximate common divisor (GACD) problem. The conditions for ensuring the feasibility of AIOL are also presented. Compared to the Ding–Tao OL algorithm, the well-known LLL reduction method is used only once in AIOL, and when the error vector is recovered in AIOL, the possible difference between the restored and the true value of p is given. Experimental comparisons between the Ding-Tao algorithm and ours are also provided to validate our improvements.
Keywords:
general approximate common divisors; fully homomorphic encryption; lattice attack; orthogonal lattice MSC:
68W40
1. Introduction
Background. The approximate common divisor (ACD) problem was first studied by Howgrave-Graham [1]. Further interest in this problem was inspired by the proposal of fully homomorphic encryption (FHE) by Van Dijk et al. [2], as well as the cryptographic constructions proposed subsequently [3,4,5]. The security of these cryptosystems depends on the hardness assumption of the ACD problem and its variants.
The ACD problem is usually formulated in two ways: the problem of the general approximate common divisor (GACD) and the problem of the partial approximate common divisor (PACD). Both of these formulations polynomially take as inputs many samples with sufficiently small but non-zero and aim to work out the hidden common divisorp, while the latter is given an additional exact sample (i.e., ). Intuitively, the PACD problem is easier than GACD, considering that one can work out p directly if he/she knows the factorization of the additional sample , whereas the capability of integer factorization has no direct impact on the GACD problem. However, Van Dijk et al. pointed out that at present, there is no PACD algorithm that does not work for GACD [2]. And the usefulness of PACD has been demonstrated by a much more efficient construction of the FHE scheme [5], the security of which has been proven to rely on PACD rather than on GACD. The original papers [1,2] presented a few possible lattice attacks on the GACD problem, including the orthogonal lattices (OL) method, simultaneous diophantine approximation (SDA) method, and multivariate polynomial equations (MP) method. During the past decade, several related improvements and cryptanalytic works were proposed [6,7,8,9,10,11,12,13,14]. Detailed comparisons of these methods are summarized in Table 1. Further explanations on these methods are given below.
- SDA methods. The basic idea of SDA methods is to note that if is small, then the fraction is an instance of a simultaneous diophantine approximation to . Once is determined, can be computed from Hence,
- OL methods. The common objective of OL methods is to find some short vectors that are orthogonal to certain unknown referred vector(s) . The difference lies in the setting on , as well as the methods for finding such short objective vectors. At EuroCrypt 2010, Van Dijk et al. [2] described two OL methods. The first is to set with , and the second is to set and . About 4 years later, the second method was further improved by Ding and Tao [7] in the sense that they used only one referred vector . In this sequel, we mainly focus on this improved OL method. According to the shape of the basis of the working lattice , this kind of OL method can be further divided into two sub-categories: OL-∧, with a lower triangular matrix as the working lattice basis [8,9], and OL-∨, with an upper triangular matrix as the working lattice basis [7,9,10].
- MP methods. The origin of MP methods can be traced back to Howgrave’s work at CaLC 2001 [1], where the PACD problem was reduced to the problem of finding small roots of multivariate polynomial equations. This idea was further extended to suit the need to solve GACD [2,11,15,16]. The core idea of MP methods is to construct a t-element polynomial of degree n in the variables such that for a properly chosen n and k. Then, if , the equation holds over the integers. Eventually, to obtain , at least t algebraic independent target vectors were needed in order to be able to perform elimination to reduce to a univariate polynomial equation. After then, one can compute easily. If we have very limited PACD samples, the MP method has advantages in computational cost. However, if sufficiently many PACD samples are available, the process of searching the required algebraic independent target vectors has a huge cost. In this case, Galbraith et al. [8] suggested the use of linear polynomials in the MP method, and this, in turn, is essentially equivalent to the orthogonal lattice method.
Among the above work, the OL algorithm by Ding and Tao [7] is ingenious due to its use of the well-known LLL algorithm twice to accurately recover the error vector . After mapping the given GACD instances into a lattice , the first calling of the LLL algorithm is to find suitable short vectors for establishing the equations
where Then, a new lattice is constructed using the base vectors of the solution space of the above equation, and the second calling of the LLL algorithm is to recover the error vector accurately. Knowing , it is very easy to recover p, even for a primary school student, say, by using the extended Euclidean algorithm. According to Ding and Tao [7], it is an amazing thing that the first calling of the LLL algorithm over should find multiple short vectors of appropriate length to construct the equations, and they claimed that a theoretical proof would be a very significant result. Another merit of the Ding–Tao method is that setting the related parameters is simple, and this makes the implementation of OL attacks against GACD-based cryptosystems very easy in practice. For example, the lower bound of the number of samples t depends only on , and the length of the short vector depends only on t and .
Table 1.
Comparisons of methods for GACD.
Table 1.
Comparisons of methods for GACD.
| Comparative Results | SDA [8,12,17] | MP [1,11,16,18] | |
|---|---|---|---|
| OL Attack | |||
| OL-∧ [9] OL-∨ [9] | , [OL-∧] | SDA and OL-∧ with attack have similar performances. | MP is not better than OL-∧ with attack for practical cryptanalysis; both OL attacks have advantages over the MP approach. |
| is in general, [OL-∧, OL-∨]. | When is very small, OL-∧ with a rounding technique is the fastest. | The cases with in general and rounding techniques are more suitable for cases where is no longer extremely smaller than . |
Motivation and Contributions. the italics should be retained With further experiments on the Ding–Tao algorithm, we find that the actual effect of the algorithm is better than they claimed. In particular, we realize that the conditions and could be relaxed and merged, and the second calling of the LLL algorithm could also be saved. Moreover, we find that even for failure executions of the Ding–Tao algorithm, there is a high probability that the recovered p differs from the actual value by only 1 or very small numbers. Therefore, our motivation in this work is to propose an improved OL algorithm to reduce both space and time costs for solving the GACD problem. Our main contributions are summarized as follows:
- First, we modify the range of parameters and the length of the short target vector in the Ding–Tao algorithm so that we need to build lattice and call the LLL algorithm only once. The success rate for recovering p reaches under the merged conditionNote that this inequation also implies no matter whether holds.
- Second, based on the above modification, we give a proof on why, in our algorithm AIOL, the method of only calling the LLL algorithm once gives us the desired short vectors. This can be viewed as a theoretical answer to Ding and Tao’s amazing question.
- Third, we give the possible differences between the recovered p and the actual hidden common divisor when the error vector is recovered. Knowing these differences is, in turn, helpful for recovering p and thus expanding the scope of OL attacks.
Roadmap. The remaining contents are organized as follows. In Section 2, the formal definitions of the problems of GACD and PACD are given, and the lattice concepts and the LLL algorithm are introduced briefly. In Section 3, the orthogonal lattice-based approaches, including our improvements, for GACD are explored and developed in detail. Experiments and comparisons, as well as related discussions, are presented in Section 4. Finally, concluding remarks are given in Section 5.
2. Preliminaries
Throughout this paper, we make the following agreement on notations: capital boldface letters denote matrices, e.g., , while lowercase bold letters denote vectors e.g., ; let and be the inner product and the Euclidean length, respectively, and denote the transpose of matrix ; and the logarithmic notation log always takes 2 as the base, while denotes the smallest integer not less than r.
Definition 1
(ACD Distribution). Given , let p be an η-bit odd integer. Then, the ACD distribution, , is an efficiently sampleable distribution defined as follows:
Definition 2
(GACD Problem). Given access to an ACD distribution as an oracle, the objective of the general approximate common divisor (GACD) problem is to find p.
Definition 3
(PACD Problem). Given access to an ACD distribution as an oracle, with the restriction that the first output of is for some , the objective of the partial approximate common divisor (PACD) problem is to find p.
Remark 1.
Apparently, a PACD instance is a GACD by coincidence only with a probability that is negligible with respect to ρ.
Definition 4
(—LLL reduction basis). Given a lattice basis , the corresponding Gram–Schmidt basis , is a reduced basis if and only if the following two conditions are satisfied:
- (1)
- The size condition: , for all ;
- (2)
- The Lovász condition: , for all , where .
Definition 5
(Geometric Series Assumption [19]). Given the Gram–Schmidt basis ,
for , where is called GSA constant.
The geometric series assumption (GSA) means the length of the Gram–Schmidt basis with LLL reduction decays geometrically with the quotient and indicates
Theorem 1
([20]). Given an LLL reduction lattice basis , is the corresponding Gram–Schmidt basis. The following results hold:
- (1)
- ;
- (2)
- , for ;
- (3)
- , for ;
where , δ is the parameter in the Definition 4.
Theorem 2
([21]). The LLL basis reduction algorithm with the factor computes an LLL-reduced basis in polynomial time in the maximal bit-length of the coefficients of the input basis, the lattice rank n, and the space dimension m. Specifically, if is an input lattice basis, , then LLL runs in
bit operations under school multiplication.
3. Orthogonal Lattice (OL)-Based Approach
3.1. The Basic Idea of OL Algorithms
Nguyen and Stern [22] have demonstrated the usefulness of the orthogonal lattice in cryptanalysis, and this has been used in several ways to attack the ACD problem. The idea is to find the that is orthogonal to both and . Since , is orthogonal to , the task is to find linearly independent vectors shorter than any vector in to recover , and therefore p.
Based on the idea of Nguyen and Stern, the current idea is to find linearly independent vectors that are only orthogonal to . The core steps of the current OL algorithm include the following two steps.
First, find linearly independent vectors orthogonal to , that is,
Then, establish and solve the indefinite equation
Second, find small positive-integer solutions to the above equations. At present, the common way to find the small solutions is to construct a lattice with a basis matrix
and then employ the LLL algorithm to reduce the basis matrix with the hope that the first output is the vector . However, at present, only experimental conditions can meet this expectation, and there is still a lack of theory.
Let the general solution formula of the equations be
where is a special solution, are integers, and is a basis of the integer solution space for the corresponding homogeneous linear equations.
To facilitate finding , consider the explicit vectors . It is easy to deduce that only one of them is the solution to the equations.
Let be the solution to the equations, and if , then is probably equal to . With this in mind, Ding and Tao [7] found the conditions for which the algorithm can work well (theoretically not proved):
In addition, if , we find an interesting occurrence, which is that the recovery value is only 1 or a very small number different from the true value p in many cases of our experiment. And our experiments lead to the following general conclusions between p and :
Let Then,
where is the recovered value of p. Therefore, if , using vector , can be restored. And since is bounded, p can be restored by .
In summary, one of the outputs generated by the LLL algorithm can be used to recover under the appropriate conditions.
3.2. Our Proposal
In this part, an improved OL algorithm (Algorithm 1), AIOL, is described in detail.
| Algorithm 1 (AIOL): An improved OL algorithm for GACD. |
| Input: The GACD parameters , and t ACD samples , with t satisfying
1. Randomly choose and construct a lattice with the basis 3. Collect short vectors from so that , , where . Then, solve the following Diophantine equations with t unknowns : 5. Let . 6. Compute . |
Through the proof in the next section, it can be seen that when the condition
or, equivalently,
holds, the AIOL algorithm will successfully recover p.
3.3. The Proof of the AIOL Algorithm
Lemma 1.
For ∀ , if , then Equation (13) holds.
Proof.
Let , ; then,
Thus,
Since
Therefore, there is no modular N operation, and . Thus, .
We also have
To prove that holds, suppose , so
but
Lemma 1 gives an upper bound on the length of the desired vectors in the lattice that makes the the Equation (13) work.
Lemma 2.
If the number t of samples satisfies
then LLL reduction basis vectors are valid for the construction of Equation (13).
Proof.
According to Theorem 1, we consider the -th LLL reduction basis vector , whose length can be estimated as below:
Lemma 2 estimates the length of the -th vector output by the LLL algorithm and makes it fall within the range required by Lemma 1. Thus, the vectors found can be used to construct Equation (13).
Based on the above two lemmas, the following theorem can be obtained.
Theorem 3.
When GACD parameters satisfy
or
and the number of samples satisfy
then the equation
holds.
Proof.
From Condition (24), we can obtain that the length of the LLL reduction basis vectors satisfies Lemma 2. Thus, the LLL reduction basis vectors are valid for the construction of Equation (13). Combining the above two lemmas, we simplify the inequation and ignore some small terms to obtain the following bound of sample numbers t. The specific process is as follows. We take the logarithm base 2 on both sides of (24) to obtain:
Removing some smaller items of (26), , we have
By sorting out Formula (27), we obtain
Then,
Here, Conditions (15) and (16) are equivalent. By organizing Formula (16) into an inequality regarding , we can obtain
Notice that ; thus, solving Inequality (32) gives an upper bound on , .
3.4. The Complexity of the AIOL Algorithm
In the AIOL algorithm, the dominant computation is the LLL reduction of the lattice. Since only one appropriate set of N and t needs to be used at a time, the most complex calculations required of the AIOL algorithm are a single LLL lattice reduction. According to Theorem 2, the complexity of running the LLL lattice reduction algorithm is polynomial in , and t for . More specifically, let be a lattice of rank with the basis and . Then the number of bit operations needed by the LLL basis reduction in AIOL for is
or, equivalently,
under school multiplication, where t satisfies Formula (11).
Remark 2.
The above analysis suggests that the asymptotical complexity of our AIOL algorithm is higher than that of the Ding–Tao algorithm, where the bit complexity is under school multiplication (in [7], this complexity is given by . Here, we omit the constant 2 considering the effects of the leading symbol O). The reason is that in AIOL, the lattice parameter N is set to bits, which is much bigger than in the Ding–Tao algorithm, where N is set to γ bits.
4. Experiments and Comparisons
In this section, we conduct experiments on our algorithm AIOL, as well as the Ding–Tao algorithm. The experimental environment is specified as follows: an Intel Core i5-1235U CPU processor (1.30 GHz) with 16 GB of memory, Windows 10 OS, and Maple 2021 coding language.
The experiments are organized as follows. To test the effects of relaxation on conditions of the error length and the required number of samples t, we adopted the following settings on the related parameters:
- We fixed , i.e., the bit-length of the hidden common divisor p;
- Let and 2000, respectively;
- Then, for each case, we collected the success rate of recovering the hidden common divisor p, as well as the maximal (resp., the minimal t) that enables the related algorithms work. That is, and represent the upper bound of and the lower bound of t, respectively, when the corresponding algorithm can be used to recover p successfully.
The results of the first experiments are summarized in Table 2, where the symbol ‘–’ indicates that in this case, the related algorithm failed to work out. We can see that:
Table 2.
Experiments and comparisons: conditions on and success rate ().
- The overall success rate of our algorithm is 100%, which is observably higher than that of the Ding–Tao algorithm under the same settings of and a similar scale of t. Moreover, even for bigger settings of in AIOL, the success rates are still higher than those obtained by the Ding–Tao algorithm for the smaller settings of (intuitively, the bigger the value of , the more errors are involved in the given ACD samples, and this, in turn, means more difficulty in solving the given GACD instances).
- The condition on given by the Ding–Tao Condition (9) is irrelevant when considering that, for and , the maximal values of to ensure the Ding–Tao algorithm has a high success rate are 103 and 30, respectively. These are, respectively, either observably bigger or smaller than the given bound .
- The condition on given by AIOL is relaxed to the case of . And this condition is tight in the sense that for all these cases, the maximal values of to ensure the success of AIOL are almost same with the bound given by (16).
- The condition on t given by the Ding–Tao Condition (9) is rigorous in the sense that for even small values of t, our tests of the Ding–Tao algorithm failed, whereas the condition on t given by (11) in AIOL is loose since for even small t, our algorithm still works well. At present, we have no idea how to give a tight bound on choosing t for the AIOL algorithm.
Remark 3.
Our experiments also indicate that the running time of AIOL becomes longer with an increase in the parameters . Under the same settings of γ and ρ, decreasing t will reduce the computational cost significantly. This is the reason why our AIOL algorithm runs much faster than the Ding–Tao algorithm for the above experimental GACD instances.
5. Conclusions
Interest in the general approximate common divisor (GACD) problem has been excited by the possibility of building fully homomorphic encryptions over integers, though many such kinds of cryptographic constructions have been broken. In fact, from even an abstract point of view, the GACD problem can be viewed as a learning-with-error (LWE) version of the greatest common divisor (GCD) problem over the 1-dimensional lattice . Although we know that all lattice problems are easy to solve at low dimensions, more efforts are still needed to tackle the GACD problem. In this paper, an improved orthogonal lattice algorithm, AIOL, is proposed for solving the GACD problem. Compared with Ding and Tao’s OL method, the parameter conditions applicable to AIOL are relaxed, and the experiments show that the success rate of AIOL is enhanced observably.
Author Contributions
Conceptualization, Y.R., L.W. and Z.C.; methodology, Y.R., L.W. and Z.C.; validation, Y.P. and L.W.; writing—original draft preparation, Y.R.; writing—review and editing, Y.R. and L.W.; code implementation, Y.R. and L.W.; supervision and project administration, Y.P. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported in part by the National Key Research and Development Program of China (Grant No. 2020YFA0712300), the National Defense Basic Scientific Research program of China (Grant No. JCKY2020602B008), and the National Natural Science Foundation of China (Grant No. 62272040, 62132005).
Data Availability Statement
Available on request from the corresponding author.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Howgrave-Graham, N. Approximate integer common divisors. In Cryptography and Lattices; Silverman, J., Ed.; Springer: Berlin/Heidelberg, Germany, 2001; Volume 2146, pp. 51–66. [Google Scholar]
- Van Dijk, M.; Gentry, C.; Halevi, S.; Vaikuntanathan, V. Fully homomorphic encryption over the integers. In Advances in Cryptology–EUROCRYPT 2010; Gilbert, H., Ed.; Lecture Notes in Computer Sciences; Springer: Berlin/Heidelberg, Germany, 2010; Volume 6110, pp. 24–43. [Google Scholar]
- Coron, J.S.; Naccache, D.; Tibouchi, M. Public Key Compression and Modulus Switching for Fully Homomorphic Encryption over the Integers. In EUROCRYPT’12D; Pointcheval, D., Johansson, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7237, pp. 446–464. [Google Scholar]
- Cheon, J.H.; Stehlé, D. Fully Homomorphic Encryption over the Integers Revisited. In EUROCRYPT’15; Oswald, E., Fischlin, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9056, pp. 513–536. [Google Scholar]
- Coron, J.S.; Mandal, D.; Tibouchi, N.M. Fully homomorphic encryption over the integers with shorter public keys. In Advances in Cryptology-CRYPTO 2011; Rogaway, P., Ed.; Lecture Notes in Computers Sciences; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6841, pp. 487–504. [Google Scholar]
- Chen, Y.; Nguyen, P.Q. Faster algorithms for approximate common divisors: Breaking fully homomorphic encryption challenges over the integers. In Advances in Cryptology-EUROCRYPT 2012; Springer: Berlin/Heidelberg, Germany, 2012; pp. 502–519. [Google Scholar]
- Ding, J.; Tao, C. A New Algorithm for Solving the Approximate Common Divisor Problem and Cryptanalysis of the FHE based on GACD. Iacr Cryptol. Eprint Arch. 2014, preprint. [Google Scholar]
- Galbraith, S.; Gebregiyorgis, S.; Murphy, S. Algorithms for the approximate common divisor problem. LMS J. Comput. Math. 2016, 19, 58–72. [Google Scholar] [CrossRef]
- Xu, J.; Sarkar, S.; Hu, L. Revisiting orthogonal lattice attacks on approximate common divisor problems. Theor. Comput. Sci. 2022, 911, 55–69. [Google Scholar] [CrossRef]
- Yu, X.; Wang, Y.; Xu, C.; Takagi, T. Studying the Bounds on Required Samples Numbers for Solving the General Approximate Common Divisors Problem. In Proceedings of the 2018 5th International Conference on Information Science and Control Engineering, Zhengzhou, China, 20–22 July 2018. [Google Scholar]
- Cohn, H.; Heninger, N. Approximate common divisors via lattices. In Proceedings of the ANTS X: Proceedings of the Tenth Algorithmic Number Theory Symposium, San Diego, CA, USA, 9–13 July 2012; Volume 1, pp. 271–293. [Google Scholar]
- Gebregiyorgis, S. Algorithms for the Elliptic Curve Discrete Logarithm Problem and the Approximate Common Divisor Problem. PhD Thesis, The University of Auckland, Auckland, New Zealand, 2016. [Google Scholar]
- Cheon, J.H.; Cho, W.; Hhan, M. Algorithms for CRT-variant of approximate greatest common divisor problem. J. Math. Cryptol. 2020, 14, 397–413. [Google Scholar] [CrossRef]
- Cho, W.; Kim, J.; Lee, C. Extension of simultaneous Diophantine approximation algorithm for partial approximate common divisor variants. IET Inf. Secur. 2021, 15, 417–427. [Google Scholar] [CrossRef]
- Takayasu, A.; Kunihiro, N. Better Lattice Constructions for Solving Multivariate Linear Equations, Modulo Unknown Divisors; Boyd, C., Simpson, L., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 7959, pp. 118–135. [Google Scholar]
- Takayasu, A.; Kunihiro, N. Better Lattice Constructions for Solving Multivariate Linear Equations Modulo Unknown Divisors. IEICE Trans. 2014, 6, 1259–1272. [Google Scholar] [CrossRef]
- Lagarias, J.C. The computational complexity of simultaneous Diophantine approximation problems. SIAM J. Comput. 1985, 14, 196–209. [Google Scholar] [CrossRef]
- Lepoint, T. Design and Implementation of Lattice-Based Cryptography. In Cryptography and Security; Ecole Normale Supérieure de Paris (ENS Paris): Paris, France, 2014. [Google Scholar]
- Schnorr, C.-P. Lattice reduction by random sampling and birthday methods. In Proceedings of the STACS 2003, 20th Annual Symposium on Theoretical Aspects of Computer Science, Berlin, Germany, 27 February–1 March 2003; pp. 145–156. [Google Scholar]
- Hoffstein, J.; Pipher, J.; Silverman, H.H. An Introduction to Mathematical Cryptography, 2nd ed.; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
- Nguyen, P.Q.; Valle, B. The LLL Algorithm: Survey and Applications; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Nguyen, P.Q.; Stern, J. The Two Faces of Lattices in Cryptology. In Cryptography and Lattices; Silverman, J., Ed.; Springer: Berlin/Heidelberg, Germany, 2001; pp. 146–180. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).