1. Introduction
Background. The approximate common divisor (ACD) problem was firstly studied by Howgrave-Graham [
1]. Further interest in this problem was inspired by the proposal of fully homomorphic encryption (FHE) due to Van Dijk et al. [
2], as well as 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 general approximate common divisor (GACD) and the problem of partial approximate common divisor (PACD). Both of them take as inputs polynomially 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 FHE scheme [
3] of which the security is proved relied on PACD, rather than on GACD.
The original papers [
1,
2] presented a few possible lattice attacks on the GACD problem, including orthogonal lattices (OL) method, simultaneous diophantine approximation (SDA) method, and multivariate polynomial equations (MP) method. Further cryptanalytic work was done by [
4,
6,
7,
8,
9,
10,
11,
12,
13,
14]. Among these work, the OL algorithm due to Ding and Tao [
8] is ingenious by using the well-know LLL algorithm for twice to accurately recover the error vector
. After mapping the given GACD instances into a lattice
, the first calling LLL is to find suitable
short vectors
for establishing the equations
where
Then, a new lattice
is constructed by using the base vectors of the solution space of (
1), and the second calling LLL is to recover the error vector
accurately. With 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 [
8], it is an
amazing thing that why the first calling LLL over
should give solutions for (
1), and they claimed that a theoretical proof would be a very significant result. Another merit of the Ding-Tao’s method is that the setting on the related parameters is simple and this makes the implementation of OL attacks towards 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
.
Motivation and Contributions. With further experiments on the Ding-Tao’s 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 LLL could also be saved. Moreover, we find that even for failure executions of the Ding-Tao’s 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
in the Ding-Tao’s algorithm, so that we need to build lattice and call LLL for only once, and the success rate for recovering
p reaches
, under the merged condition
Note that (
2) also implies
, no matter whether
holds.
Second, based on the above modification, we give a proof on why in our algorithm AIOL, the only once calling LLL will give us solutions for . This can be viewed as a theoretical answer towards the Ding-Tao’s amazing question;
Third, we give the possible differences between the recovered of 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 remained 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 beriefly; In
Section 3, the orthogonal lattice based approach, 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 agreeent 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 ; The logarithmic notation log always takes 2 as the base, while denotes the smallest integer not less r.
Definition 1 (ACD Distribution).
Given , let p be an η-bit odd integer, the ACD distribution, , is an efficiently sampleable distribution define as follows:
Definition 2 (GACD Problem). Given access to an ACD distribution as a 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 a 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 the 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) (Size condition) , for all ;
(2) (Lovász condition) , for all , where .
Definition 5 (Geometric Series Assumption [
15]).
Given Gram-Schmidt basis ,
for , where is called GSA constant.
The Geometric Series Assumption (GSA) means the length of Gram-Schmidt basis
with LLL reduction decays geometrically with quotient
and indicates
Theorem 1. [16] Given a 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.
3. Orthogonal Lattice (OL) based approach
3.1. The basic idea of OL algorithm
Nguyen and Stern [
17] 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
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 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 indefinite equations (
1).
Second, find small positive integer solutions to (
15). At present, the common way to find the small solutions is to construct the lattice
with basis matrix
and then employ the LLL algorithm to reduce the basis matrix
, with the hope of that the first output is the vector
. However, at present, what can meet this expectation are experimental conditions, and there is still a lack of theory.
Let the general solution formula of (
15) be
where
is a special solution of (
15),
are integers,
is a basis of integer solution space for the corresponding homogeneous linear equations.
Let
, then
where
are integers. Obviously, when
, (
9) = (
8). Reduce the lattice
to
:
To facilitate finding
, consider the explicit vectors
. It’s easy to deduce that only one of them is the solution to (
15).
Let
is the solution to (
15), and if
, then
is probably equal to
. With this in mind, Ding and Tao [
8] found the conditions that the algorithm can work well (theoretically not proved):
In addition, if , we find an interesting thing 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. So, 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, 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
Output: The approximate greatest common divisor p.
1. Randomly choose . And then constract a lattice with the basis
2. Reduce lattice by calling the LLL algorithm with . Let the reduced basis be , where
3. Collect short vectors from so that , , where . And then, solve the following Diophantine equations with t unknowns :
4. Rewrite the integer solutions of ( 15) as follows:
where is a special solution of the Diophantine equations, are integers, is a basis of integer solution space for the corresponding homogeneous linear equations.
5. Let .
6. Compute .
|
Through the proof in the next section, it can be seen that when the condition
or equivelently
holds, the algorithm AIOL will successfully recover
p.
3.3. The proof of AIOL algorithm
Lemma 1. For ∀, if , then the equation (15) holds.
Proof. Let
,
, then
Thus
Since
Therefore, there is no modular
N operation and
. So
.
We also have
To prove that (
6) holds, suppose
, so
but
This is a contradiction. The equations (
6) and (
15) hold. Then Lemma 1 holds. □
Lemma 2.
If the number t of samples satisfies
then LLL reduction basis vectors is valid for the construction of equation (15).
Proof. For the
-th LLL reduction basis vector
, whose length can be estimated
According to Lemma 1, equation (
15) holds when (
26) is true. □
Based on the above two lemmas, the following theorem can be obtained.
Theorem 2. When GACD parameters satisfy (17) or (18) and the number of samples satisfy (13), then we construct the equation (15) to be true.
Proof. From the condition (
26), the length of LLL reduction basis vectors satisfies Lemma 2, then LLL reduction basis vectors is valid for the constrction of the equation (
15). Combined the above two lemmas, we simiplify the inequation and ignore some small terms to get the following bound of sample numbers
t. The specific process is as follows: take the logarithm base 2 on both sides of (
26) to obtain:
Remove some smaller items of (
28),
, we have
Sort out the formula (
29), we get
then
By solving the inequality (
31), we can get
In summary, when conditions (
18) and (
32) hold, the algorithm can recover
p successfully. Note that the condition
comes from the third step of AIOL where we need to collect at least 2 short vectors for building the required Diophantine equations. Then the condition (
13) is true. Hence,Theorem 2 holds. □
4. Experiments and Comparisons
In this section, we conduct experiments towards our algorithm AIOL, as well as the Ding-Tao’s algorithm. The experimental environment is specified as below: Intel(R) Core (TM) Processor i5-1235U CPU (1.30 GHz) with 16 GB of memory, Windows 10 OS, and Maple 2021 coding language.
The experiments are organized as two steps. Firstly, to test the effects on relaxation on conditions of and t, we adopt the following settings on the related parameters:
Fix ;
Let respectively;
For each case of setting on
, running the Ding-Tao’s algorithm and our AIOL algorithm for 100 times for different
(resp.
t) around the upper (resp. lower) bound of
(resp.
t) given by the Ding-Tao’s condition (
11) and our condition (
13,
18), respectively.
Then, for each case, collect the success rate for recovering the hidden common divisor
p, as well as the maximal
(resp. the minimal
t) that enables the related algorithms work. These results are summaried in
Table 1, where the symbol ’–’ indicates that in this case the related failed to work out.
The overall success rate of our algorithm is 100%, which is observably higher than that of in the Ding-Tao’s algorithm, under the same settings on
and a similar scale of
t. Moreover, even for bigger settings on
in AIOL, the success rates are still higher than those of obtained by the Ding-Tao’s algorithm for the smaller settings on
.
1
The condition on
given by the Ding-Tao’s condition (
11) is
irrelevant, considering for
and
, the maximal values of
for ensuring the Ding-Tao’s a high success rate are 103 and 30, respectively. They 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 the maximal values of
for ensuring AIOL success are almost same with the bound given by (
18).
The condition on
t given by the Ding-Tao’s condition (
11) is rigorous
in the sense that for even small
t, our tests on the Ding-Tao’s algorithm failed, whereas the condition on
t given by (
13) in AIOL is
loose since for even small
t, our algorithm still works well. At present, we have no idea to give a tight bound on choicing
t for the AIOL algorithm.
Secondly, to test the scalability, as well as the speed, we adopt the settings according to experiments given by Ding and Tao in [
8]. That is,
Fix and ;
Let respectively;
In Ding-Tao’s algorithm, let
respectively, according to what was given in [
8], while in our algorithm AIOL,
t is set to
respectively – calculated according to the condition given by (
13).
Then, for each case, we run Ding-Tao’s algorithm and our algorithm respectively, and then collect the running time for getting correct results in
Table 2. (Note that for conveniences doing comparisons, partial data on the running time in Ding-Tao’s paper [
8] is referenced here.)
Both our algorithm AIOL and the Ding-Tao’s algorithm have good performance in scalability in the parameter . Moreover, the AIOL algorithm can find the correct solutions with even smaller t, this in turn means less space cost for storing the ACD samples.
With the sample computational environments (i.e. MAPLE coding on an Intel i5 CPU with 1.30 GHz clocks), our AIOL algorithm runs much quicker than the Ding-Tao’s algorithm, under the same settings on and .
Ding-Tao’s tests given in [
8] (i.e. MAGMA coding on two Quad-Core Intel Processor Q9400 CPUs with 2.66 GHz clocks) are much quicker than our tests on both AIOL and the Ding-Tao’s algorithm. We think that this might be mainly attributed to the differences of computational environments.
5. Conclusions
The interest in the general approximate common divisor (GACD) problem is excited by the possibility of building fully homomorphic encryptions over integers, though many such kind of cryptographic constructions were broken. In fact, from an even abstract point, the GACD problem can be viewed as a learning-with-error (LWE) version of the greatest common divisor (GCD) problem over the 1-dimension lattice . Although we know that all lattice problems are easy for 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 GACD. Compared with the Ding-Tao’s OL method, the parameter conditions for suit for AIOL is relaxed, and the experiments show that the success rate of AIOL is enhanced observably.
Author Contributions
Conceptualization, Ran Y., Wang L. and Cao Z.; Methodology, Ran Y., Wang L. and Cao Z.; Validation, Pan Y. and Wang L.; Writing—original draft preparation, Ran Y.; Writing—review and editing, Ran Y., Wang L.; Code implementation, Ran Y. and Wang L.; Supervision and project administration, Pan Y.
Funding
This research is partially supported by the National Natural Science Foundation of China (NSFC) (62272040).
Conflicts of Interest
The authors declare no conflict of interest.
References
- N. Howgrave-Graham. Approximate integer common divisors. Cryptography and Lattices. Springer Berlin Heidelberg, 2001: 51–66.
- M. Van Dijk, C.Gentry, S. Halevi, V. Vaikuntanathan, Fully homomorphic encryption over the integers, in: H. Gilbert (ed.), Advances in Cryptology–EUROCRYPT 2010, Lecture Notes in Comput. Sci. Springer, Berlin, Heidelberg, 2010, 6110: 24–43.
- J. S. Coron, A. Mandal, D. Naccache, M. Tibouchi, Fully homomorphic encryption over the integers with shorter public keys, in: P. Rogaway (ed.), Advances in Cryptology-CRYPTO 2011, Lecture Notes in Comput. Sci, Springer, Berlin, Heidelberg, 2011, 6841: 487–504.
- J. S. Coron, D. Naccache, M. Tibouchi. Public Key Compression and Modulus Switching for Fully Homomorphic Encryption over the Integers. In D. Pointcheval and T. Johansson (ed.), EUROCRYPT’12, Springer LNCS, 2012, 7237: 446–464.
- J. H. Cheon, D. Stehlé. Fully Homomorphic Encryption over the Integers Revisited. In E. Oswald and M. Fischlin (eds.), EUROCRYPT’15, Springer LNCS, 2015, 9056: 513-536.
- Y. Chen, P. Q. Nguyen. Faster algorithms for approximate common divisors: Breaking fully homomorphic encryption challenges over the integers. Advances in Cryptology-EUROCRYPT 2012. Springer Berlin Heidelberg, 2012: 502–519.
- H. Cohn, N. Heninger. Approximate common divisors via lattices. In proceedings of ANTS X, vol. 1 of The Open Book Series, 2013: 271–293.
- J. Ding, C. Tao. A New Algorithm for Solving the General Approximate Common Divisors Problem and Cryptanalysis of the FHE Based on the GACD problem. Cryptology ePrint Archive, Report 2014/042, 2014.
- S. Gebregiyorgis. Algorithms for the Elliptic Curve Discrete Logarithm Problem and the Approximate Common Divisor Problem. PhD thesis, The University of Auckland, Auckland, New Zealand, 2016.
- S. Galbraith, S. Gebregiyorgis, S. Murphy. Algorithms for the approximate common divisor problem. LMS Journal of Computation and Mathematics. 19(A), 2016.: 58-72. [CrossRef]
- Xiaoling Yu, Yuntao Wang, Chungen Xu, Tsuyoshi Takagi. Studying the Bounds on Required Samples Numbers for Solving the General Approximate Common Divisors Problem. 2018 5th International Conference on Information Science and Control Engineering. [CrossRef]
- J. Xu, S. Sarkar, L. Hu, Revisiting orthogonal lattice attacks on approximate common divisor problems and their applications. Cryptology ePrint Archive, 2018.
- J. H. Cheon, W. Cho, M. Hhan, Algorithms for CRT-variant of approximate greatest common divisor problem. Journal of Mathematical Cryptology, 2020, 14(1): 397–413. [CrossRef]
- W. Cho, J. Kim, C. Lee. Extension of simultaneous Diophantine approximation algorithm for partial approximate common divisor variants. IET Information Security, 2021, 15(6): 417–427. [CrossRef]
- Claus-Peter Schnorr. Lattice reduction by random sampling and birthday methods. In STACS 2003, 20th Annual Symposium on Theoretical Aspects of Computer Science, Berlin, Germany, February 27–March 1, Proceedings, 2003: 145-156.
- J. Hoffstein, J. Pipher, and J. H. Silverman. An Introduction to Mathematical Cryptography. Springer Publishing Company, 2nd edition, 2014.
- P. Q. Nguyen and Jacques Stern. The Two Faces of Lattices in Cryptology. In J. Silverman (ed.), Cryptography and Lattices, Springer LNCS 2146, 2001: 146–180.
1 |
Intuitively, the bigger , the more errors involved in the given ACD samples, and this in turn means the harder for solving the given GACD instances. |
Table 1.
Experiments and Comparisons: Conditions on and Success rate ().
Table 1.
Experiments and Comparisons: Conditions on and Success rate ().
|
Ding-Tao |
AIOL |
(11) |
|
t (11) |
|
succ % |
(18) |
|
t (13) |
|
succ % |
300 |
79 |
103 |
11 |
11 |
|
137 |
137 |
35 |
17 |
|
400 |
79 |
91 |
12 |
12 |
|
134 |
134 |
34 |
19 |
|
500 |
79 |
80 |
13 |
13 |
|
131 |
132 |
39 |
23 |
|
1000 |
79 |
30 |
16 |
16 |
|
122 |
123 |
54 |
33 |
|
1500 |
79 |
– |
19 |
– |
– |
115 |
115 |
60 |
40 |
|
2000 |
79 |
– |
21 |
– |
– |
109 |
109 |
72 |
46 |
|
Table 2.
Experiments and Comparisons: Scalability and Speed ().
Table 2.
Experiments and Comparisons: Scalability and Speed ().
|
Ding-Tao |
AIOL |
|
t |
time (s)1
|
time (s)2
|
|
|
time (s)2
|
5000 |
450 |
18 |
2.386 |
207.09 |
450 |
10 |
40.15 |
10000 |
450 |
40 |
91.447 |
7436.85 |
450 |
20 |
1162.34 |
15000 |
450 |
59 |
749.179 |
61767.34 |
450 |
29 |
3793.10 |
20000 |
450 |
85 |
4245.879 |
141303.98 |
450 |
38 |
32651.77 |
|
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 (http://creativecommons.org/licenses/by/4.0/).