Next Article in Journal
Operators Obtained by Using Certain Generating Function for Approximation
Next Article in Special Issue
Attribute Based Pseudonyms: Anonymous and Linkable Scoped Credentials
Previous Article in Journal
A VIKOR-Based Linguistic Multi-Attribute Group Decision-Making Model in a Quantum Decision Scenario
Previous Article in Special Issue
Balancing Privacy Risk and Benefit in Service Selection for Multiprovision Cloud Service Composition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Revisiting the Polynomial-Time Equivalence of Computing the CRT-RSA Secret Key and Factoring

1
College of Information and Intelligence Engineering, Zhejiang Wanli University, Ningbo 315100, China
2
School of Information Science and Technology, University of Science and Technology of China, Hefei 230027, China
Mathematics 2022, 10(13), 2238; https://doi.org/10.3390/math10132238
Submission received: 21 May 2022 / Revised: 17 June 2022 / Accepted: 24 June 2022 / Published: 26 June 2022
(This article belongs to the Special Issue Recent Advances in Security, Privacy, and Applied Cryptography)

Abstract

:
The Rivest–Shamir–Adleman (RSA) cryptosystem is currently the most influential and commonly used algorithm in public-key cryptography. Whether the security of RSA is equivalent to the intractability of the integer factorization problem is an interesting issue in mathematics and cryptography. Coron and May solved the above most fundamental problem and proved the polynomial-time equivalence of computing the RSA secret key and factoring. They demonstrated that the RSA modulus N = p q can be factored in polynomial time when given RSA key information ( N , e , d ) . The CRT-RSA variant is a fast technical implementation of RSA using the Chinese Remainder Theorem (CRT), which aims to speed up the decryption process. We focus on the polynomial-time equivalence of computing the CRT-RSA secret key and factoring in this paper. With the help of the latest partial key exposure attack on CRT-RSA, we demonstrate that there exists a polynomial-time algorithm outputting the factorization of N = p q for e d p , e d q < N 3 / 2 when given the CRT-RSA key information ( N , e , d p , d q ) . We apply Coppersmith’s lattice-based method as a basic mathematical tool for finding the small root solutions of modular polynomial equations. Furthermore, we provide validation experiments to illustrate the correctness of the CRT-RSA modulus factorization algorithm, and show that computing the CRT-RSA secret key and factoring its modulus is polynomial-time equivalent by using concrete numerical examples.

1. Introduction

Rivest, Shamir, and Adleman proposed the first practical public-key cryptosystem named the RSA algorithm [1]. This algorithm just involves the elementary number-theoretic operations and is easy to compute and implement. Thus, RSA is widely studied in the field of information security and serves as an influential public-key cryptographic algorithm utilized by international standardization organizations. The RSA cryptosystem consists of a key generation algorithm, an encryption algorithm, and a decryption algorithm, which are described as follows.
Key Generation. 
Randomly select two prime numbers p , q of the same bit-size and compute the modulus N = p q along with its Euler’s totient function φ ( N ) = ( p 1 ) ( q 1 ) . Randomly select 0 < e < φ ( N ) satisfying gcd ( e , φ ( N ) ) = 1 as the public key and compute d e 1 mod φ ( N ) as the private key.
Encryption. 
Alice transforms a plaintext message into m Z N and computes c m e mod N as the corresponding ciphertext.
Decryption. 
Bob receives a ciphertext c and calculates c d mod N . Bob extracts the transformed m and recovers the original plaintext message.
The correctness of the encryption and decryption algorithms is ensured by Euler’s Totient Theorem. Since both the public key e and the private key d are calculated in the exponent position, they are mentioned as the public and private exponents, respectively.
The hardness assumption of the RSA algorithm is the intractability of the integer factorization problem [2]. There is still no known polynomial-time algorithm that can factor sufficiently large integers using current classical computers. So there is no known effective attack against the RSA algorithm. However, on the other hand, RSA with small private exponents have been proven to be insecure when using Wiener’s continued fraction-based attack [3] and Coppersmith’s lattice-based attack [4]. A series of cryptanalytic researches on RSA and its variants were subsequently developed based on the lattice-based method, see the literature [5,6,7,8,9,10,11,12]. One of these works related to the hardness assumption of RSA is the polynomial-time equivalence proof of computing the RSA secret key and factoring [8,13]. The main contribution is applying the lattice-based method to prove that there exists an algorithm that can output the factorization of the modulus N = p q in polynomial time when given ( N , e , d ) .
In fact, in the public key cryptography standard PKCS #1 [14], the CRT-RSA algorithm is a fast technical implementation of RSA. Here CRT-RSA refers to the RSA variant using the Chinese Remainder Theorem, which was proposed in [15]. The Chinese Remainder Theorem formulates the solution to simultaneous linear congruences and is specified as follows.
Theorem 1.
Let m 1 , m 2 , , m k be mutually coprime positive integers, and let a 1 , , a k be integers. Then the following system of linear congruences
x a i mod m i
has a unique solution in the sense of modulo M = i = 1 k m i . Let M i = M / m i for i = 1 , , k , then the unique solution is
x = i = 1 k a i M i ( M i 1 mod m i ) mod M .
Since the RSA modulus N = p q is the product of two prime numbers, we consider the case of k = 2 , i.e., the system of linear congruences is x a 1 mod p and x a 2 mod q . In this case, the solution expression is more concise.
x = ( a 1 + ( ( a 2 a 1 ) × ( p 1 mod q ) mod q ) × p ) mod p q .
For a ciphertext c = m e mod N , the decryption algorithm works in the following strategy. One first does a partial decryption operation to recover m p = c d mod p , m q = c d mod q , and then use the Chinese Remainder Theorem to combine the above two parts to recover m. Since p and q are coprime, one applies the Formula (1) that yields
m = ( m p + ( ( m q m p ) × ( p 1 mod q ) mod q ) × p ) mod p q .
It can be further simplified as
m = ( m p + p ( ( m q m p ) p 1 mod q ) ) mod N .
Let d p e 1 mod ( p 1 ) and d q e 1 mod ( q 1 ) , by Fermat’s Little Theorem we have
m p = c d p c d mod p , m q = c d q c d mod q .
Thus, d p , d q are called CRT exponents and used as private exponents instead of d. The above Formula (2) is known as Garner’s algorithm [16]. Theoretically speaking, the decryption efficiency of the modular operations can be accelerated by a factor of four due to the reduction of the modulus from N to p or q. We summarize the CRT-RSA cryptosystem as follows.
Key Generation. 
Randomly select two prime numbers p , q of the same bit-size and compute the modulus N = p q and its Euler’s totient function φ ( N ) = ( p 1 ) ( q 1 ) . Randomly select 0 < e < φ ( N ) satisfying gcd ( e , φ ( N ) ) = 1 as the public key and compute d p e 1 mod ( p 1 ) , d q e 1 mod ( q 1 ) as the private key.
Encryption. 
Alice transforms a plaintext message into m Z N and computes c m e mod N as the corresponding ciphertext.
Decryption. 
Bob receives a ciphertext c and calculates m p = c d p mod p , m q = c d q mod q . Bob extracts m = ( m p + p ( ( m q m p ) p 1 mod q ) ) mod N and recovers the original plaintext message.
Cryptanalysis of the CRT-RSA algorithm also attracts many researchers. The small CRT-exponent attack was originally presented as an open problem in Wiener’s attack [3]. The first cryptanalytic result was given in [6], which was effective for unbalanced primes p and q. Subsequently, Jochemsz and May [17] proposed the small CRT-exponent attack for balanced primes when the attack range is d p , d q < N 0.073 . It was further improved to d p , d q < N 0.091 in [12] and shortly afterwards to d p , d q < N 0.122 [18]. In addition, the partial-key-exposure attacks such as [19,20,21,22,23] were studied due to the consideration of partial leakage of the CRT-RSA private key. From the implementation aspect, side-channel attacks such as [24,25,26,27,28] were proposed by exploiting the side-channel information leakage during the running process of the CRT-RSA algorithm.
Unlike the above attacks, we focus on the intrinsic security of CRT-RSA, i.e., its mathematical hardness assumption. From the theoretical research aspect, it is interesting to investigate the polynomial-time equivalence of computing the CRT-RSA secret key and factoring its modulus. Therefore, the research problem is stated as follows.
If the CRT-RSA key information ( N , e , d p , d q ) is given as input, does there exist a polynomial-time algorithm that can output the factorization of N? Furthermore, is it possible that the CRT-exponents reach the natural constraint d p , d q < N 1 / 2 for e N ?
It is well known that d p and d q can be efficiently inferred from the factorization of N = p q and the public exponent e. Hence, it suffices to show that the above problem is solvable to conclude that computing the CRT-RSA secret key and factoring the modulus are polynomial-time equivalent. Our main goal is to demonstrate and design a polynomial-time algorithm outputting the factorization of N for given CRT-RSA key information ( N , e , d p , d q ) . The specific goal is to further enlarge the attack range of CRT exponents d p , d q . We study how to use improved analysis techniques to carry out attacks on CRT-RSA from the perspective of its intrinsic security, namely the polynomial-time equivalence of computing the CRT-RSA secret key and factoring its modulus.
Inspired by the latest partial key exposure attack on CRT-RSA [23], we show an optimized polynomial-time equivalence of computing the CRT-RSA secret key and factoring. To be specific, we give a positive answer to the above research problem based on the partial key exposure attack on CRT-RSA. A polynomial-time factoring algorithm is presented for the given CRT-RSA key information ( N , e , d p , d q ) , which outputs the factorization result of N = p q . Technically speaking, the factoring algorithm involves an error term gcd ( N 1 , 2 t e ) for t : = log 2 ( max ( d p , d q ) ) . This term may equal to O ( 1 ) , which is negligible compared to e , d p , d q in the most favorable case, and asymptotically leads to the natural constraint d p , d q < N 1 / 2 for e N . Moreover, we provide validation experiments in the form of numerical examples.
Our contribution mainly includes a new factoring algorithm and an improved attack result, which are summarized as follows.
  • We study the security of CRT-RSA concerning its mathematical hardness assumption and propose an improved polynomial-time algorithm of factoring the CRT-RSA modulus.
  • We verify the correctness and validity of the proposed CRT-RSA modulus factorization algorithm with numerical computer experiments and always successfully obtain the factorization results.
  • We further discuss the advantages and disadvantages of our approach with several comparisons to properly assess the proposed factoring attack.
The rest of this paper is organized as follows. Section 2 introduces the lattice-based method, which is used as a basic mathematical tool to solve the research problem. Section 3 first reviews the latest partial key exposure attack on CRT-RSA and gives a refined theorem with more flexible parameters. Then we propose an improved polynomial-time equivalence of computing the CRT-RSA secret key and factoring. Both the CRT-RSA key computation algorithm and the CRT-RSA modulus factorization algorithm are presented. Finally, the validation experiments are provided in the form of numerical examples. We compare our results with previous studies and discuss the advantages and disadvantages of the proposed algorithms in Section 4. Section 5 concludes this paper.

2. Materials and Methods

We introduce the lattice-based method, which consists of the lattice reduction algorithm [29] and Coppersmith’s techniques [4]. Generally speaking, a lattice is a discrete additive subgroup in R n that is defined as follows.
Definition 1.
Let 1 ω n and b 1 , , b ω R n be a set of linearly independent vectors. The lattice L generated by b 1 , , b ω is the set containing all linear combinations of the vectors with integer coefficients.
L : = Z b 1 + + Z b ω = i = 1 ω z i b i : z i Z .
The vector set b 1 , , b ω is called a basis of the lattice L . Further, n is the lattice dimension, ω is the lattice rank, and L is full-rank if ω = n . For i = 1 , , ω , each basis vector can be written as b i = ( b i 1 , , b i n ) in the form of row vectors, thus forming a basis matrix B = b i j ω × n .
Definition 2.
The fundamental parallelepiped of L is defined as P ( L ) : = B x : x [ 0 , 1 ) n , where B is any basis matrix of the lattice L . The lattice determinant is defined as the volume of the fundamental parallelepiped.
det ( L ) : = det ( B B T ) ,
where B T is the transpose matrix of B . Thus, it follows that the determinant of a full-rank lattice L  is
det ( L ) = det ( B B T ) = det ( B ) det ( B T ) = | det ( B ) | ,
where det ( B ) is the determinant of the basis matrix B .
The lattice determinant does not depend on a particular basis matrix since it is an invariant of the lattice itself. A lattice can usually be generated by many different basis matrices. More concretely, any two basis matrices of the same lattice can be converted to each other using a unimodular matrix. Unless otherwise specified, the lattices in this paper are full-rank.
The famous Lenstra–Lenstra–Lovász (LLL) lattice reduction algorithm was proposed in [29]. Though this algorithm cannot directly output the shortest lattice vector, it outputs the approximately shortest basis vectors in polynomial time. In other words, the length of the output vectors does not exceed a certain multiple of the shortest vector, and the LLL algorithm usually works better in practice. The works [29,30] show the following lemma for the upper bound estimation of the approximately shortest vectors output by the LLL algorithm.
Lemma 1
(LLL). Let v 1 , , v ω be a set of basis vectors output by the LLL algorithm running on the lattice L . We have
| v 1 | , , | v i | 2 ω ( ω 1 ) 4 ( ω + 1 i ) det ( L ) 1 ω + 1 i , i = 1 , , ω .
Its time complexity is O ω 6 ( log B ) 3 that is polynomial in the lattice dimension ω and the length of the input vectors B.
Coppersmith presented how to solve modular or integer polynomial equations based on the LLL algorithm [31,32]. The core idea is to construct solvable equations over the integers, which are represented as short basis vectors in the lattice. Meanwhile, the short basis vectors can be efficiently found by the LLL algorithm.
We describe the specific problem of solving modular polynomial equations as follows. Let R be a known positive integer, and let v ( x 1 , , x k ) be a multivariate polynomial. The goal is to find small root solutions of v ( x 1 , , x k ) mod R , i.e., to solve v ( x 1 , , x k ) 0 mod R under | x i | X i , where X i is the upper bound on the absolute value of the variable x i related to the small root solution. It is required is to maximize the upper bound X i on the unknown variables, while keeping the time complexity polynomial in the input parameters.
Before describing the strategy of solving modular polynomial equations, we define the polynomial norm. For a certain k-variable polynomial v ( x 1 , , x k ) = a i 1 , , i k x 1 i 1 x k i k , the non-zero coefficients a i 1 , , i k are related to the corresponding monomials x 1 i 1 x k i k . The polynomial norm is defined as follows.
Definition 3.
Let v ( x 1 , , x k ) = a i 1 , , i k x 1 i 1 x k i k with a i 1 , , i k 0 be a k-variable polynomial. Its norm is defined as
v ( x 1 , , x k ) : = a i 1 , , i k 2 1 / 2 .
Howgrave-Graham [33] further improved on Coppersmith’s original techniques. The following lemma is used for determining whether the small root solution of a modular polynomial equation also holds on the integers, i.e., whether the modular condition can be eliminated.
Lemma 2
(Howgrave-Graham). Let v ( x 1 , , x k ) Z [ x 1 , , x k ] be a k-variable integer polynomial containing ω monomials. When the following conditions are satisfied, v ( x 1 , , x k ) = 0 also holds over the integers.
1. 
v ( x 1 , , x k ) 0 mod R , | x 1 | X 1 , , | x k | X k ,
2. 
v ( X 1 x 1 , , X k x k ) < R / ω .
The basic idea of solving k-variable polynomials is to construct k algebraically with independent polynomials sharing the same small root over the integers. Hence, one can extract the final solution by the Gröbner basis computation [34]. By applying Lemma 2, the problem of solving modular polynomial equations can be turned to solving integer equations. Further, by combining Lemma 1, one can solve a given modular polynomial equation under certain conditions. The lattice-based method constructs a set of shift polynomials sharing the same root modulo R and then transforms the derived polynomials into integer equations in a specific way. Technically speaking, a lattice-basis matrix is generated from the coefficient vectors of the shift polynomials, which spans an ω -dimensional lattice. The LLL algorithm is applied to obtain the approximately shortest basis vectors, which are later transformed into polynomial equations. If the corresponding polynomial norm is small enough, then the derived equation also holds over the integers. We summarize the process of solving k-variable polynomial equations using the lattice-based method as follows.
  • The first step is to construct the set of shift polynomials P for given modular polynomials f 1 ( x 1 , , x k ) , , f n ( x 1 , , x k ) containing k unknown variables and a given modulus M. For 0 i 1 , , i n m N and j 1 , , j k N , the basic form of a shift polynomial is defined as
    p i ( x 1 , , x k ) : = f 1 i 1 f n i n · x 1 j 1 x k j k · M m ( i 1 + + i n ) , 1 i ω .
    Thus, all polynomials in P have the same root ( x 1 , , x k ) mod M m , where the modulus is R = M m .
  • The second step is to use b i denoting the row vector transformed from the coefficient vectors of the shift polynomial p i ( X 1 x 1 , , X k x k ) when substituting X i x i for x i . The lattice L = i = 1 ω z i b i : z i Z is constructed by the lattice basis matrix B = ( b i j ) ω × ω . Then apply the LLL algorithm to the lattice L and extract the first many approximately shortest vectors v 1 , , v from the output. The output vectors are transformed into a system V of integer equations v 1 ( x 1 , , x k ) , , v ( x 1 , , x k ) , whose roots also hold over the integers.
  • The third step is extract the desired small root solution. If the derived polynomials v i ( x 1 , , x k ) are mutually algebraically independent, the system of integer equations V can be solved by applying the Gröbner basis computation. At this point, the small root solution ( x 1 , , x k ) of the original modular polynomials is obtained.
When obtaining the first number of basis vectors using the LLL algorithm, to ensure that the polynomial equations related to the basis vectors satisfy the solvable conditions, we have 2 ω ( ω 1 ) 4 ( ω + 1 ) det ( L ) 1 ω + 1 < R / ω . Since we always have ω R , the following simplified condition is obtained by omitting the lower error terms,
det ( L ) < R ω .
To make the lattice determinant det ( L ) easy to compute, it is generally required that the basis matrix B is of lower or upper triangular form. Therefore, during the construction of shift polynomials, it is necessary to ensure that each new shift polynomial p i introduces exactly one new monomial λ i . Hence, the lattice determinant is calculated by accumulating the monomials on the diagonal of the lattice basis matrix. We have det ( L ) = | det ( B ) | = i = 1 ω | λ i ( X 1 , , X k ) | .
The solution of multivariate polynomials using the lattice-based method is heuristic, so we note that its feasibility relies on the following heuristic assumption. Although the LLL algorithm guarantees that the reduced basis vectors are linearly independent, it cannot guarantee the algebraic independence of the transformed polynomials. On the other hand, similar to other cryptanalytic researches on RSA and its variants using the lattice-based method, the following assumption always holds in the validation experiments.
Assumption 1.
The system of integer equations related to the approximately shortest basis vectors output by the LLL algorithm can be efficiently solved. The small root solution can be extracted in polynomial time by the Gröbner basis computation.

3. Results

We aim to propose a polynomial-time algorithm outputting the factorization of N for given CRT-RSA key information ( N , e , d p , d q ) by using the latest partial key exposure attack. To do so, we modify solving the factoring problem into conducting the partial key exposure attack. In other words, we extract two primes p and q for known LSB components of the CRT-exponents (i.e., the LSB components are exactly d p , d q themselves if let the MSB components be 0). We follow the lattice-based method and briefly review the partial key exposure attack on CRT-RSA.
The partial key exposure attack on CRT-RSA [23] implicitly shows the existence of a factoring algorithm, which takes given CRT-RSA key information ( N , e , d p , d q ) as input and outputs the factorization of N = p q for d p , d q < N 1 / 2 and e N . Therefore, we explicitly design a polynomial-time algorithm that outputs the factorization of N for d p , d q < N 1 / 2 and e N . From a mathematical standpoint, we simplify the complicated and redundant attack analysis in [23] and further present a refined theorem in order to fit the factoring problem on CRT-RSA. To be specific, we concentrate on the error term that appears in the mathematical derivation process. We carefully analyze and reduce the influence of this error term and hence obtain attack results that are better than previous studies [23,35].

3.1. Partial Key Exposure Attack on CRT-RSA

Recently, May, Nowakowski, and Sarkar [23] proposed an improved partial key exposure attack on CRT-RSA, which is based on the small CRT exponent attack working for d p , d q < N 0.122 of [18]. This attack applies to the range N 0.122 < d p , d q < N 0.5 , which smoothly covers the full interval of the CRT exponents. Let N = p q be the CRT-RSA modulus, where p and q are prime numbers of the same bit-size. Assume that the public exponent is e N α , the CRT-exponents are d p , d q N β . The CRT-exponents can be written as d p = d p * 2 t + d ˜ p , d q = d q * 2 t + d ˜ q , where t N and the LSB components d ˜ p , d ˜ q N β δ are known, whereas the MSB components d p * , d q * N δ are unknown. Then, there exists a polynomial-time algorithm that outputs the secret information p , q using the given partial key exposure.
According to d p e 1 mod ( p 1 ) and d q e 1 mod ( q 1 ) , we have
e d p = k ( p 1 ) + 1
e d q = ( q 1 ) + 1
for two positive integers k , N . Since the sizes of e, d p , d q , p, and q are known, the upper bounds on k and are estimated as
k , < max e d p p 1 , e d q q 1 = Θ N α N β N 1 / 2 = Θ N α + β 1 / 2 .
Applying the Formula (4), we have f x p , y p : = x p y p 1 + 1 = x p y p x p + 1 , whose root is ( k , p ) mod e . In addition, multiplying the Formula (5) by p and rearranging it gives
p e d q = p ( q 1 ) + p = N p + p = N ( 1 ) + N p ( 1 ) .
Similarly, we have g y p , z p : = y p z p N z p N , whose root is ( p , 1 ) mod e . Moreover, the Equations (4) and (5) can be rewritten as k p = k 1 + e d p and q = 1 + e d q . Multiplying them together gives k N = ( k 1 ) ( 1 ) + ( k 1 ) e d q + e d p ( 1 ) + e 2 d p d q , and we obtain
( N 1 ) k ( 1 ) + N k + ( 1 ) = e d q ( k 1 ) + d p ( 1 ) + e d p d q .
Therefore, we have h x p , z p : = ( N 1 ) x p z p + N x p + z p , whose root is ( k , 1 ) mod e . Combining the above modular polynomials, we obtain the following system of polynomial equations,
f x p , y p , z p = x p y p x p + 1 = 0 , g x p , y p , z p = y p z p N z p N = 0 , h x p , y p , z p = ( N 1 ) x p z p + N x p + z p = 0 .
Their common root is ( k , p , 1 ) mod e .
Considering the special algebraic relationship between the unknown variables, we use six variables, namely x p , x q , y p , y q , z p , z q instead of three variables. In this case, the relevant elements in certain monomials of the original polynomials need to be converted algebraically as follows.
y p y q N , x p 1 x q , x q + 1 x p , z p + 1 z q , z q 1 z p .
Thus, we obtain linear polynomials after the conversion,
f x p , x q , y p , y q , z p , z q : = x p y p x q , g x p , x q , y p , y q , z p , z q : = y p z p N z q , h x p , x q , y p , y q , z p , z q : = N x p z q x q z p .
Combining known values d ˜ p and d ˜ q , the polynomials involved in the partial key exposure attack are as follows.
f ˜ x p , x q , y p , y q , z p , z q : = x p y p x q e d ˜ p g ˜ x p , x q , y p , y q , z p , z q : = y p z p N z q + e d ˜ q y p h ˜ x p , x q , y p , y q , z p , z q : = N x p z q x q z p e 2 d ˜ p d ˜ q e d ˜ p z p e d ˜ q z q .
The root is ( x p , x q , y p , y q , z p , z q ) = ( k , k 1 , p , q , 1 , ) mod 2 t e , and the corresponding upper bounds are x p , x q , z p , z q X = N α + β 1 / 2 , and y p , y q Y = N 1 / 2 .
We apply the lattice-based method to extract ( x p , x q , y p , y q , z p , z q ) . The first step is to construct the shift polynomials. Before that, we need to define the monomial set, whose elements are contained in the shift polynomials. The monomial set is closely related to the columns of the lattice basis matrix in the second step, and directly affects the alignment of the matrix rows.
Definition 4.
Let m Z + . The monomial set M ˜ is defined as
M ˜ = x p a y p b z p c 0 a m , 0 c m , 0 b 2 m .
To facilitate the exposition of the lattice construction, it is additional to define M M ˜ as
M = x p a y p b z p c 0 a m , 0 c m , 0 b a + c .
Furthermore, M ˜ = M 1 M 2 M 3 M 4 M 5 is partitioned using five disjoint subsets as follows.
M 1 : = x p a y p b z p c M a c , b c a , M 2 : = x p a y p b z p c M a > c , b < a c , M 3 : = x p a y p b z p c M x p a y p b z p c M 1 M 2 , a + b + c 0 mod 2 , M 4 : = x p a y p b z p c M x p a y p b z p c M 1 M 2 M 3 , M 5 : = x p a y p b z p c M ˜ x p a y p b z p c M .
The shift functions and the corresponding shift polynomials are defined based on the monomial sets M ˜ and M .
Definition 5.
The shift functions are defined as follows.
E f ( a , b , c ) : = 0 , x p a y p b z p c M 1 b , x p a y p b z p c M 2 ( a + b c ) / 2 , x p a y p b z p c M 3 ( a + b c + 1 ) / 2 , x p a y p b z p c M 4 a , x p a y p b z p c M 5 E g ( a , b , c ) : = b , x p a y p b z p c M 1 0 , x p a y p b z p c M 2 ( a + b + c ) / 2 , x p a y p b z p c M 3 ( a + b + c 1 ) / 2 , x p a y p b z p c M 4 c , x p a y p b z p c M 5 E h ( a , b , c ) : = a , x p a y p b z p c M 1 c , x p a y p b z p c M 2 ( a b + c ) / 2 , x p a y p b z p c M 3 ( a b + c 1 ) / 2 , x p a y p b z p c M 4 0 , x p a y p b z p c M 5 E x ( a , b , c ) : = a b c , x p a y p b z p c M 2 0 , x p a y p b z p c M 1 M 3 M 4 M 5 E z ( a , b , c ) : = a b + c , x p a y p b z p c M 1 0 , x p a y p b z p c M 2 M 3 M 5 . 1 , x p a y p b z p c M 4
For a given monomial x p a y p b z p c M ˜ , the corresponding shift polynomial is determined as
p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q : = f ˜ E f g ˜ E g h ˜ E h x p E x z p E z ( 2 t e ) 2 m E f + E g + E h .
It is known that all the shift polynomials p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q have the common root ( k , k 1 , p , q , 1 , ) mod ( 2 t e ) 2 m . The shift polynomials are further adapted by using the algebraic relation Formula (7). We construct the updated shift polynomials under the following induced transformation rules.
Definition 6.
Let u be a polynomial defined over x p , x q , y p , y q , z p , z q . tr ( u ) is defined as the updated polynomial after the following transformation rules.
1. 
For all monomials, y p y q are converted to N,
2. 
For monomials without y p , x p are converted to x q + 1 and z p are converted to z q 1 ,
3. 
For monomials with y p , x q are converted to x p 1 and z q are converted to z p + 1 .
  • Thus, tr ( u ) contains only monomials of the form x p a y p b z p c and x q a y q b z q c , i.e., variables with subscripts p and q do not appear in a monomial at the same time.
The second step is to construct the lattice-basis matrix B . To do this, we need to define the monomial order and the polynomial order, which are used to arrange the order of columns and rows in the lattice-basis matrix. When we generate the lattice-basis matrix, a polynomial p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q is first multiplied by some extra variables and then transformed by Definition 6. Finally, the upper bounds on the unknown variables are substituted and the polynomials are arranged in a one-to-one correspondence with the monomial order.
Definition 7.
The monomial order is defined as follows.
x p a 1 y p b 1 z p c 1 x p a 2 y p b 2 z p c 2 c 1 < c 2 c 1 = c 2 , a 1 < a 2 c 1 = c 2 , a 1 = a 2 , b 1 < b 2
The lattice basis matrix B and the polynomial order (namely the matrix row) are defined in the following way. The i-th column is related to the monomial λ [ a , b , c ] , which is x q a y q b / 2 z q c for even b and x p a y p b / 2 z p c for odd b. The parameters a , b , c are taken from the i-th smallest monomial x p a y p b z p c in M ˜ . For x p a y p b z p c M , the i-th row is associated with the coefficient vector of polynomial tr p ˜ [ a , b , c ] · y q b / 2 X x p , X x q , Y y p , Y y q , X z p , X z q . For x p a y p b z p c M 5 with even b, the i-th row takes tr p ˜ [ a , b , c ] · y q ( a + c ) / 2 · y q ( b a c ) / 2 X x p , X x q , Y y p , Y y q , X z p , X z q . For x p a y p b z p c M 5 with odd b, it takes tr p ˜ [ a , b , c ] · y q ( a + c ) / 2 · y p ( b a c ) / 2 X x p , X x q , Y y p , Y y q , X z p , X z q . Then the lattice basis matrix B is lower triangular.
We then apply the lattice reduction algorithm to L generated by the basis matrix B . The first few approximately shortest basis vectors v i of the output are converted to polynomial form v i , which make up the system of integer equations V . The third step is to solve the above system of integer equations. We apply the Gröbner basis computation to extract ( k , k 1 , p , q , 1 , ) . At this point, we finally obtain the secret information p and q. Under the above lattice-based solution process, we present the following theorem.
Theorem 2.
Let N = p q be a sufficiently large CRT-RSA modulus, where p and q are prime numbers of the same bit-size. Assume that the public exponent is e N α , the CRT exponents are d p , d q N β . The CRT exponents are written as d p = d p * 2 t + d ˜ p and d q = d q * 2 t + d ˜ q , where t N and the LSB components d ˜ p , d ˜ q N β δ are known, whereas the MSB components d p * , d q * N δ are unknown. Then given ( N , e , d ˜ p , d ˜ q ) and ensuring gcd ( N 1 , 2 t e ) = O ( 1 ) , if the condition
δ < 3 2 α 2 β 10
holds then p and q can be computed in polynomial time in log N .
Proof. 
We construct the lattice-basis matrix B and generate the ω -dimensional full-rank lattice L . Hence, each diagonal element b i , i of B contains the powers of 2 t e , X, Y, and N, ( N 1 ) , which are expressed as
b i , i = ( 2 t e ) E 1 , i X E 2 , i Y E 3 , i N E 4 , i ( N 1 ) E 5 , i .
To simplify the computation of the lattice determinant, we should multiply the polynomials of the rows by the following appropriate multiplicative inverse
N E 4 , i N 1 gcd ( 2 t e , N 1 ) E 5 , i 1 mod ( 2 t e ) 2 m
to eliminate the effect of powers of N and ( N 1 ) . The updated diagonal elements are b i , i * = ( 2 t e ) E 1 , i X E 2 , i Y E 3 , i gcd ( 2 t e , N 1 ) E 4 , i * . Meanwhile, the root solution remains ( k , k 1 , p , q , 1 , ) mod ( 2 t e ) 2 m . Since it is assumed that gcd ( 2 t e , N 1 ) = O ( 1 ) in the most favorable case, its influence can be ignored. The lattice determinant is calculated asymptotically as det ( L ) = | det ( B ) | = ( 2 t e ) s e X s X Y s Y , where the corresponding exponents are calculated as follows.
s e = i = 1 ω E 1 , i = x p a y p b z p c M ˜ 2 m E f ( a , b , c ) E g ( a , b , c ) E h ( a , b , c ) = 7 3 m 4 + o m 4 , s X = i = 1 ω E 2 , i = x p a y p b z p c M ˜ ( a + c ) = 2 m 4 + o m 4 , s Y = i = 1 ω E 3 , i = x p a y p b z p c M ˜ b 2 = m 4 + o m 4 .
On the other hand, the dimension of the lattice L is
ω = x p a y p b z p c M ˜ 1 = ( m + 1 ) 2 ( 2 m + 1 ) = 2 m 3 + o m 3 .
We apply the condition (3), i.e., det ( L ) < ( 2 t e ) 2 m ω . By substituting 2 t = N β δ , e = N α , X = N α + β 1 / 2 and Y = N 1 / 2 , we have
( α + β δ ) · 7 3 m 4 + α + β 1 2 · 2 m 4 + 1 2 · m 4 < ( α + β δ ) · 4 m 4 + o m 4 .
After simplification, we obtain δ < ( 3 2 α 2 β ) / 10 . The running time mainly depends on the LLL algorithm, while the running time of the Gröbner basis computation is negligible in comparison. Thus, its time complexity is O ω 6 ( log B ) 3 = O m 21 ( log N ) 3 . Because m is a fixed number for generating the lattice, the time complexity is polynomial in log N .    □
We elaborate on the details of the lattice-basis matrix in the partial key exposure attack on CRT-RSA and present the specific attack algorithm. Furthermore, to understand Theorem 2 and the order of columns and rows in the lattice construction more intuitively, we give a toy example of the lattice basis matrix for m = 1 .
Example 1.
According to Definition 7, the lattice basis matrix B for m = 1 is shown in Table 1, where e ˜ : = 2 t e and f ˜ , g ˜ , h ˜ are the derived polynomials to be solved.
It is clear that the lattice basis matrix B is indeed a lower triangular matrix, and that each new shift polynomial p ˜ i introduces only one new monomial λ i .
We present the partial key exposure attack on CRT-RSA in Algorithm 1, which is denoted by A ( N , e , 2 t , d ˜ p , d ˜ q ) .
Algorithm 1 The partial key exposure attack algorithm A ( N , e , 2 t , d ˜ p , d ˜ q ) .
Input: 
CRT-RSA modulus N, public exponent e, 2 t and known LSBs d ˜ p , d ˜ q
1:
f ˜ x p , x q , y p , y q , z p , z q x p y p x q e d ˜ p
2:
g ˜ x p , x q , y p , y q , z p , z q y p z p N z q + e d ˜ q y p
3:
h ˜ x p , x q , y p , y q , z p , z q N x p z q x q z p e 2 d ˜ p d ˜ q e d ˜ p z p e d ˜ q z q
4:
M ˜ m Z +
{construct the monomial set}
5:
E f , E g , E h , E x , E z M ˜
{generate shift exponents}
6:
p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q f ˜ E f g ˜ E g h ˜ E h x p E x z p E z ( 2 t e ) 2 m E f + E g + E h
7:
B p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q
{generate the lattice basis matrix}
8:
v i B
{compute reduced basis vectors}
9:
V v i
{construct the equation system}
10:
( k , k 1 , p , q , 1 , ) V
{extract the desired root}
11:
return p and q
Output: 
The factorization of N = p q

3.2. Polynomial Time Equivalence of Computing the CRT-RSA Secret Key and Factoring

We show an explicit demonstration on the polynomial-time equivalence of computing the CRT-RSA secret key and factoring by invoking the partial key exposure attack algorithm A ( N , e , 2 t , d ˜ p , d ˜ q ) . It is specified in the following theorem.
Theorem 3.
Let N = p q be a sufficiently large CRT-RSA modulus, where p and q are prime numbers of the same bit size. Let e be the public exponent and d p , d q be the corresponding CRT-exponents. Then the following statements hold under the condition e d p , e d q < N 3 / 2 and ensuring gcd ( N 1 , 2 t e ) = O ( 1 ) .
  • Given ( N , e , p , q ) , d p and d q can be computed in polynomial time,
  • Given ( N , e , d p , d q ) , p and q can be computed in polynomial time.
When e N is close to the CRT-RSA modulus, the CRT-exponents satisfies the natural constraint d p , d q < N 1 / 2 (or d p d q < N ).
Note that the error term gcd ( N 1 , 2 t e ) is derived from the proof of Theorem 2. To simplify the lattice determinant computation, we multiply each row polynomial by an appropriate multiplicative inverse, i.e., (11) to eliminate the effect of powers of N and ( N 1 ) . However, gcd ( N 1 , 2 t e ) is at least equal to 2 and hence its influence cannot be completely eliminated. We further check whether the assumption gcd ( N 1 , 2 t e ) = O ( 1 ) holds in Section 4. From an algorithmic perspective, this error term gcd ( N 1 , 2 t e ) affects the computation efficiency. To achieve the same attacking effect, a larger error term requires lattices with higher dimension and hence the corresponding factoring attack takes more time.
Proof. 
We divide the proof into two parts. One part proves that knowing ( N , e , p , q ) is sufficient to compute d p and d q in polynomial time. The other part proves that known ( N , e , d p , d q ) is sufficient to compute p and q in polynomial time. According to the key generation algorithm, we have d p e 1 mod ( p 1 ) , d q e 1 mod ( q 1 ) . When ( N , e , p , q ) is known, the values of e 1 mod ( p 1 ) and e 1 mod ( q 1 ) can be computed by applying the extended Euclidean algorithm. It is shown in Algorithm 2 and denoted by E ( e , p 1 , q 1 ) .
Algorithm 2 The CRT-RSA key computation algorithm E ( e , p 1 , q 1 )
Input: 
CRT-RSA public exponent e, modulus factorization p and q
1:
( u 1 , u 2 , u 3 ) ( 0 , 1 , p 1 )
2:
( v 1 , v 2 , v 3 ) ( 1 , 0 , e )
3:
while v 3 > 0 do
4:
    r u 3 / v 3
5:
    ( u 1 , u 2 , u 3 ) ( u 1 , u 2 , u 3 ) r · ( v 1 , v 2 , v 3 )
6:
    ( u 1 , u 2 , u 3 ) ( v 1 , v 2 , v 3 )
7:
end while
8:
( u 1 , u 2 , u 3 ) ( 0 , 1 , q 1 )
9:
( w 1 , w 2 , w 3 ) ( 1 , 0 , e )
10:
while v 3 > 0 do
11:
    r u 3 / w 3
12:
    ( u 1 , u 2 , u 3 ) ( u 1 , u 2 , u 3 ) r · ( w 1 , w 2 , w 3 )
13:
    ( u 1 , u 2 , u 3 ) ( w 1 , w 2 , w 3 )
14:
end while
15:
return v 1 and w 1
Output: 
CRT-exponents d p = e 1 mod ( p 1 ) and d q = e 1 mod ( q 1 )
It is known that the time complexity of the modular inverse computation is O ( log N ) , so the CRT-RSA secret key computation algorithm E ( e , p 1 , q 1 ) can be done in polynomial time. To prove that knowing ( N , e , d p , d q ) is sufficient to compute p and q in polynomial time, we slightly modify the original problem into the form of the partial key exposure attack on CRT-RSA. Denoting t : = log 2 ( max ( d p , d q ) ) and letting d p * = d q * = 0 , we have leaked LSBs d ˜ p : = d p , d ˜ q : = d q . By calling the partial key exposure attack algorithm A ( N , e , 2 t , d ˜ p , d ˜ q ) , we can extract p and q in polynomial time. The specific algorithm is shown in Algorithm 3 and denoted by F ( N , e , d p , d q ) .
Algorithm 3 The CRT-RSA modulus factorization algorithm F ( N , e , d p , d q )
Input: 
CRT-RSA modulus N, public exponent e, CRT-exponents d p and d q
1:
t log 2 ( max ( d p , d q ) )
2:
d p * 0 , d q * 0
3:
d ˜ p d p , d ˜ q d q
4:
f ˜ x p , x q , y p , y q , z p , z q x p y p x q e d ˜ p
5:
g ˜ x p , x q , y p , y q , z p , z q y p z p N z q + e d ˜ q y p
6:
h ˜ x p , x q , y p , y q , z p , z q N x p z q x q z p e 2 d ˜ p d ˜ q e d ˜ p z p e d ˜ q z q
7:
M ˜ m Z +
{construct the monomial set}
8:
E f , E g , E h , E x , E z M ˜
{generate shift exponents}
9:
p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q f ˜ E f g ˜ E g h ˜ E h x p E x z p E z ( 2 t e ) 2 m E f + E g + E h
10:
B p ˜ [ a , b , c ] x p , x q , y p , y q , z p , z q
{generate the lattice basis matrix}
11:
v i B
{compute reduced basis vectors}
12:
V v i
{construct the equation system}
13:
( k , k 1 , p , q , 1 , ) V
{extract the desired root}
14:
return p and q
Output: 
The factorization of N = p q
The time complexity of the CRT-RSA modulus factorization algorithm depends mainly on the partial key exposure attack, which can be done in O ( ( log N ) 3 ) according to Theorem 2. Thus, F ( N , e , d p , d q ) runs in polynomial time in log N . However, Algorithm 3 partially answers the research problem. It remains to show that the CRT exponents satisfy the natural constraint, i.e., d p , d q < N 1 / 2 for e N . For this purpose, we further apply the judgment condition (10) in Theorem 2. Assume that e N α , d p , d q N β , d p * , d q * N δ , the partial key exposure attack on CRT-RSA works if
δ < 3 2 α 2 β 10 .
In Algorithm 3, we have the implication δ = 0 , which shows that
0 < 3 2 α 2 β 10 .
Hence, it follows that α + β < 3 / 2 , i.e., e d p , e d q < N 3 / 2 . The CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) is feasible for e N , and the CRT-exponents are in the range of d p , d q < N 1 / 2 . So far, our research goal is achieved. □

3.3. Validation Experiments

We implement the CRT-RSA key computation algorithm E ( e , p 1 , q 1 ) and the CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) based on SageMath [36]. The experimental platform is a personal computer running Windows 10 with Intel(R) Core(TM) i5-10500 CPU 3.10 GHz and 8 GB RAM. All numbers in the validation experiments are randomly selected. We summarize the experimental results as follows. The CRT-RSA key computation algorithm E ( e , p 1 , q 1 ) outputs the modular inverse values e 1 mod ( p 1 ) and e 1 mod ( q 1 ) quite efficiently. The CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) runs with enough integer equations for solving the unknown variables and finally factors the modulus N. To be specific, after running the LLL algorithm, we can obtain a sufficient number of approximately shortest basis vectors to meet the requirements in the lattice-based method. The desired root can be efficiently extracted by transforming the lattice vectors into a system of integer equations and then applying the Gröbner basis computation.
As the CRT-RSA key computation algorithm is a direct call to the extended Euclidean algorithm, we focus on the CRT-RSA modulus factorization algorithm. In the experiments, we first choose an appropriate m to control the construction of the shift polynomials. We then construct the lattice basis matrix B and the ω -dimensional full-rank lattice L . The LLL algorithm is applied to L , and we transform the first few output vectors into a system of integer equations. We finally solve the system of integer equations using the Gröbner basis computation and extract the desired root.
The detailed experimental results are given in Table 2. The log 2 N column provides the bit size of the CRT-RSA modulus of the generated instance. The α log 2 N column provides the bit size of the public exponent e. The β log 2 N column provides the bit size of the CRT exponents in our attacks. The lattice settings for conducting the factoring algorithms are indicated by the m and ω columns. The time consumption (recorded in seconds) of the LLL algorithm and the Gröbner basis computation are given in the Time-column. Two particular numerical CRT-RSA examples are given in Examples 2 and 3.
Example 2.
In order to check the correctness and validity of the CRT-RSA modulus factorization algorithm, we choose the following specific parameters and generate the test example.
1. 
Randomly generate 512-bit prime numbers p, q and the modulus N = p q ,
2. 
Randomly generate 103-bit CRT exponents d p and d q ,
3. 
Generate the public exponent e based on above p, q and d p , d q ,
4. 
Denote the CRT-RSA key information as ( N , e , d p , d q ) .
The values of the numerical CRT-RSA example are as follows.
N = 114347036081803578673339388300699529343751209241907643180876 458206667330922848834036065664761789957008250918211860604774 566584479411936175341623770289022043707073762248864386282628 990346540436123901362681015966801988295462057535857497607361 768945381482239937653004859004894600582582900917446891506894 263052143 , e = 223240854903959329163056785473769020659799535319489715586782 390754702103216662596028424458821582218235232577019255075762 125125183259281313726576508416053530713656742151040100413422 917401393760099325929355604572256120456696898516220623395554 309873831847027002512654955273158052172095928389224394251597 30187731 , d p = 6793718331323137434420097081795 , d q = 5689304626278643905322268826251 .
In the CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) , we choose m = 4 , which means that we need to apply the LLL algorithm to the lattice L with ω = 245 . After running for almost 84221 s, the approximately shortest basis vectors that meet the solvable condition are obtained. The system of integer equations to be solved is then derived by transforming vectors into polynomials. We finally solve it by applying the Gröbner basis computation in less than one second and recover
p = 108638302771434350392709121078675710123453598877100622797142 999156910491518974867800775506243747756303770936993791366549 71732967591897327085997551822606809 , q = 105254807158005691967534136739997233691243442214073820398841 619002989698022942925837218623347529765489194410746175686245 27351967084444332562641383615278727 .
One may check that N = p q does hold, so the CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) successfully outputs the factorization of N = p q .
To show that the CRT-RSA key computation algorithm E ( e , p 1 , q 1 ) also runs in polynomial time, we use the above CRT-RSA example and apply extended Euclidean algorithm. It runs in less than one second and outputs
d p = 6793718331323137434420097081795 , d q = 5689304626278643905322268826251 .
Example 3.
In order to further check the correctness and validity of the CRT-RSA modulus factorization algorithm for smaller e and larger CRT exponents, we choose the following specific parameters and generate the test example.
1. 
Randomly generate 512-bit prime numbers p, q, and the modulus N = p q ,
2. 
Randomly generate 200-bit public exponent e,
3. 
Generate 768-bit CRT-exponents d p and d q based on above p, q, and e,
4. 
Denote the CRT-RSA key information as ( N , e , d p , d q ) .
The values of the numerical CRT-RSA example are as follows.
N = 156512694533516563511957875673047248424661607738276291458198 561587305961477716057755389974955796966826998822273532598444 073354133765045009506842533224118977797362970342863277332916 054340774252180351940497697856282577719012074116639472745869 837430174148381260146968287423827682202356316536216812133505 242483721 , e = 870234913689148331430538521742157308545604222372763981584709 , d p = 105054920889694313236643515475986229698560379691663463225512 302039400442603589508021349904320178302089471845434045075084 406806664103314275213793412703224020726768063140359644831769 2200027809366346806478596786324049639383282415416033 , d q = 148571987412482932015696111740202311634967482494902349345138 137535116614527333185153973996870696864633712947488523072563 209530823364587205330955760387748864552847890724262288611841 4037628097962124364926249633316687480099589768273565 .
In the CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) , we choose m = 3 , which means that we need to apply the LLL algorithm to the lattice L with ω = 112 . After running for almost 2482 s, the approximately shortest basis vectors that meet the solvable condition are obtained. The system of integer equations to be solved is then derived by transforming vectors into polynomials. We finally solve it by applying the Gröbner basis computation in less than one second and recover
p = 117661909776482824125451009716243933710550298018498329113532 519144170968368272845860632479094497702166147221073340778054 06168249462396739783087920487938303 , q = 133018998952878525725128760686837839812976256555609678813921 757867209306278453420877763154370943445528651863267874726515 62727232145095808167865245044585207 .
One may check that N = p q does hold, so the CRT-RSA modulus factorization algorithm F ( N , e , d p , d q ) successfully outputs the factorization of N = p q .
To show that the CRT-RSA key computation algorithm E ( e , p 1 , q 1 ) also runs in polynomial time, we use the above CRT-RSA example and apply extended Euclidean algorithm. It runs in less than one second and outputs d p and d q .

4. Discussion

To solve the proposed research problem, we apply the lattice-based method and present an improved CRT-RSA modulus factorization algorithm in Section 3.2. The correctness and validity of our factoring algorithm have been verified in Section 3.3. Our validation experiments always output the desired modulus factorization for small CRT-exponents. The running time depends on the particular lattice dimension and is in the range of 1 s to 10 6 s. Hence, the accuracy and speed of our factoring algorithm have been evaluated. Next, we discuss the difference between previous studies and ours and show the superiority of our approach.
Maitra and Sarkar [35] have proposed a factorization attack using lattice-based method when ( N , e , d p , d q ) are known. Assume that one has e N α , d p < N δ 1 , d q < N δ 2 and g : = gcd ( N 1 , e d p 1 , e d q 1 ) N γ . They demonstrated that N can be factored in polynomial time in log N when 2 α + δ 1 + δ 2 + 2 γ < 3 . For e N , i.e., α 1 , we have δ 1 + δ 2 < 1 2 γ . It implies that the above approach cannot reach the natural constraint since γ is not a negligible term.
Relatively speaking, our factoring algorithm involves an error term gcd ( N 1 , 2 t e ) instead of gcd ( N 1 , e d p 1 , e d q 1 ) and hence our result seems superior. To illustrate the superiority, we examine and compare gcd ( N 1 , e d p 1 , e d q 1 ) in [35] and gcd ( N 1 , 2 t e ) of ours. We choose 1024-bit CRT-RSA moduli and the corresponding CRT exponents of various bit sizes. The comparison results are given in Table 3. For the bit size of each CRT exponent, we randomly take 100 trials and calculate the average value.
We observe that our error term gcd ( N 1 , 2 t e ) equals to O ( 1 ) , i.e, negligible compared to e , d p , d q in most cases. Further, our error term is always less than the previous one gcd ( N 1 , e d p 1 , e d q 1 ) . Hence, our approach performs better than the previous work [35]. As shown in Figure 1, the attack upper bound log N d p d q of ours is closer to 1. Thus, our improvement further strengthens the modulus factoring attack on CRT-RSA when its key information is known.
To illustrate the relation of our work to the field of attacking CRT-RSA, we compare and classify recent related works as shown in Table 4. Our work further enriches cryptanalyses of CRT-RSA. To be specific, the work not only makes further improvements on factoring attacks, but also reveals the importance and correctness of the polynomial-time equivalence of computing the CRT-RSA secret key and factoring. It can be seen that factoring attack is a more essential security threat.
Notice that we experimentally verify our CRT-RSA modulus factorization algorithm for small CRT exponents. A limiting factor in achieving large CRT exponents is that we need to perform the lattice reduction algorithm with large lattice dimension in such cases. The running time increases rapidly, which leads to decreased attack efficiency, and is practically infeasible. This disadvantage can be eliminated with optimized lattice reduction algorithms and enhanced computing capability.

5. Conclusions

In this paper, we positively answer the research problem whether there exists a polynomial-time algorithm outputting the modulus factorization if given the CRT-RSA key information. Our work is summarized as follows.
  • We study the security of CRT-RSA concerning its mathematical hardness assumption. We propose the improved polynomial-time algorithm of factoring the CRT-RSA modulus with the help of partial key exposure attack on CRT-RSA.
  • Our asymptotic attack upper bound is superior to previous work [35]. Our factoring attack is a more essential security threat compared to others.
  • We verify the correctness and validity of the proposed CRT-RSA modulus factorization algorithm with numerical experiments. Our validation experiments always successfully output the factorization results for small CRT-exponents.
  • We discuss our results with several comparisons to properly assess the proposed factoring attack. Furthermore, we discuss the advantages and disadvantages of the proposed algorithm.
More concretely, under the condition that e d p , e d q < N 3 / 2 , the factoring algorithm takes the given CRT-RSA key information ( N , e , d p , d q ) as input and outputs the factorization of modulus N = p q in polynomial time. We transform the original factorization problem into a modular polynomial solution problem. We apply Coppersmith’s lattice-based method to find the root solution, which contains the prime factors of the modulus. Notice that the polynomial-time equivalence of CRT-RSA key computation and factorization is still not completely solved. One open problem is whether there exists a polynomial-time algorithm for factoring the CRT-RSA modulus in the case of e d p , e d q > N 3 / 2 .
Future research should be devoted to the development of optimized lattice-reduction algorithm in order to enhance the efficiency of the proposed factoring attack. In addition, hybrid attacks based on the proposed CRT-RSA modulus factorization algorithm is an interesting topic for future work.

Funding

This work was supported by the National Natural Science Foundation of China, grant numbers 62002335 and Ningbo Natural Science Foundation, grant number 2021J174.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Acknowledgments

We thank Julian Nowakowski for sharing the experimental code of the partial key exposure attack on CRT-RSA. We thank anonymous reviewers for their helpful and constructive comments that greatly improved this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rivest, R.L.; Shamir, A.; Adleman, L.M. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef]
  2. Boudot, F.; Gaudry, P.; Guillevic, A.; Heninger, N.; Thomé, E.; Zimmermann, P. The State of the Art in Integer Factoring and Breaking Public-Key Cryptography. IEEE Secur. Priv. 2022, 20, 80–86. [Google Scholar] [CrossRef]
  3. Wiener, M.J. Cryptanalysis of short RSA secret exponents. IEEE Trans. Inf. Theory 1990, 36, 553–558. [Google Scholar] [CrossRef] [Green Version]
  4. Coppersmith, D. Small Solutions to Polynomial Equations, and Low Exponent RSA Vulnerabilities. J. Cryptol. 1997, 10, 233–260. [Google Scholar] [CrossRef] [Green Version]
  5. Boneh, D.; Durfee, G. Cryptanalysis of RSA with Private Key d Less than N0.292. In Advances in Cryptology—EUROCRYPT ’99, Proceedings of the International Conference on the Theory and Application of Cryptographic Techniques, Prague, Czech Republic, 2–6 May 1999; Stern, J., Ed.; Springer: Berlin/Heidelberg, Germany, 1999; Volume 1592, pp. 1–11. [Google Scholar] [CrossRef] [Green Version]
  6. May, A. Cryptanalysis of Unbalanced RSA with Small CRT-Exponent. In Advances in Cryptology—CRYPTO 2002, Proceedings of the 22nd Annual International Cryptology Conference, Santa Barbara, CA, USA, 18–22 August 2002; Yung, M., Ed.; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2442, pp. 242–256. [Google Scholar] [CrossRef] [Green Version]
  7. Blömer, J.; May, A. New Partial Key Exposure Attacks on RSA. In Advances in Cryptology—CRYPTO 2003, Proceedings of the 23rd Annual International Cryptology Conference, Santa Barbara, CA, USA, 17–21 August 2003; Boneh, D., Ed.; Springer: Berlin/Heidelberg, Germany, 2003; Volume 2729, pp. 27–43. [Google Scholar] [CrossRef] [Green Version]
  8. May, A. Computing the RSA Secret Key is Deterministic Polynomial Time Equivalent to Factoring. In Advances in Cryptology—CRYPTO 2004, Proceedings of the 24th Annual International CryptologyConference, Santa Barbara, CA, USA, 15–19 August 2004; Franklin, M.K., Ed.; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3152, pp. 213–219. [Google Scholar] [CrossRef] [Green Version]
  9. Ernst, M.; Jochemsz, E.; May, A.; de Weger, B. Partial Key Exposure Attacks on RSA up to Full Size Exponents. In Advances in Cryptology—EUROCRYPT 2005, Proceedings of the 24th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Aarhus, Denmark, 22–26 May 2005; Cramer, R., Ed.; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3494, pp. 371–386. [Google Scholar] [CrossRef] [Green Version]
  10. Coron, J. Finding Small Roots of Bivariate Integer Polynomial Equations: A Direct Approach. In Advances in Cryptology—CRYPTO 2007, Proceedings of the 27th Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2007; Menezes, A., Ed.; Springer: Berlin/Heidelberg, Germany, 2007; Volume 4622, pp. 379–394. [Google Scholar] [CrossRef] [Green Version]
  11. Jochemsz, E.; May, A. A Polynomial Time Attack on RSA with Private CRT-Exponents Smaller Than N0.073. In Advances in Cryptology—CRYPTO 2007, Proceedings of the 27th Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2007; Menezes, A., Ed.; Springer: Berlin/Heidelberg, Germany, 2007; Volume 4622, pp. 395–411. [Google Scholar] [CrossRef] [Green Version]
  12. Takayasu, A.; Lu, Y.; Peng, L. Small CRT-Exponent RSA Revisited. In Part II, Advances in Cryptology—EUROCRYPT 2017—Proceedings of the 36th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Paris, France, 30 April 30–4 May 2017; Coron, J., Nielsen, J.B., Eds.; Springer International Publishing: Cham, Switzerland, 2017; Volume 10211, pp. 130–159. [Google Scholar] [CrossRef]
  13. Coron, J.; May, A. Deterministic Polynomial-Time Equivalence of Computing the RSA Secret Key and Factoring. J. Cryptol. 2007, 20, 39–50. [Google Scholar] [CrossRef] [Green Version]
  14. Moriarty, K.; Kaliski, B.; Jonsson, J.; Rusch, A. PKCS #1: RSA Cryptography Specifications Version 2.2. 2016. Available online: https://rfc-editor.org/rfc/rfc8017.txt (accessed on 20 May 2022).
  15. Quisquater, J.J.; Couvreur, C. Fast Decipherment Algorithm for RSA Public-Key Cryptosystem. Electron. Lett. 1982, 18, 905–907. [Google Scholar] [CrossRef]
  16. Garner, H.L. The Residue Number System. IRE Trans. Electron. Comput. 1959, 8, 140–147. [Google Scholar] [CrossRef]
  17. Jochemsz, E.; May, A. A Strategy for Finding Roots of Multivariate Polynomials with New Applications in Attacking RSA Variants. In Advances in Cryptology—ASIACRYPT 2006, Proceedings of the 12th International Conference on the Theory and Application of Cryptology and Information Security, Shanghai, China, 3–7 December 2006; Lai, X., Chen, K., Eds.; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4284, pp. 267–282. [Google Scholar] [CrossRef] [Green Version]
  18. Takayasu, A.; Lu, Y.; Peng, L. Small CRT-Exponent RSA Revisited. J. Cryptol. 2019, 32, 1337–1382. [Google Scholar] [CrossRef]
  19. Sarkar, S.; Maitra, S. Partial Key Exposure Attack on CRT-RSA. In Applied Cryptography and Network Security, Proceedings of the 7th International Conference, ACNS 2009, Paris-Rocquencourt, France, 2–5 June 2009; Abdalla, M., Pointcheval, D., Fouque, P., Vergnaud, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5536, pp. 473–484. [Google Scholar] [CrossRef]
  20. Lu, Y.; Zhang, R.; Lin, D. New Partial Key Exposure Attacks on CRT-RSA with Large Public Exponents. In Applied Cryptography and Network Security—Proceedings of the 12th International Conference, ACNS 2014, Lausanne, Switzerland, 10–13 June 2014; Boureanu, I., Owesarski, P., Vaudenay, S., Eds.; Springer International Publishing: Cham, Switzerland, 2014; Volume 8479, pp. 151–162. [Google Scholar] [CrossRef]
  21. Takayasu, A.; Kunihiro, N. Partial Key Exposure Attacks on CRT-RSA: Better Cryptanalysis to Full Size Encryption Exponents. In Applied Cryptography and Network Security—Proceedings of the 13th International Conference, ACNS 2015, New York, NY, USA, 2–5 June 2015; Revised Selected Papers; Malkin, T., Kolesnikov, V., Lewko, A.B., Polychronakis, M., Eds.; Springer International Publishing: Cham, Switzerland, 2015; Volume 9092, pp. 518–537. [Google Scholar] [CrossRef]
  22. Takayasu, A.; Kunihiro, N. Partial Key Exposure Attacks on CRT-RSA: General Improvement for the Exposed Least Significant Bits. In Information Security—Proceedings of the 19th International Conference, ISC 2016, Honolulu, HI, USA, 3–6 September 2016; Bishop, M., Nascimento, A.C.A., Eds.; Springer International Publishing: Cham, Switzerland, 2016; Volume 9866, pp. 35–47. [Google Scholar] [CrossRef]
  23. May, A.; Nowakowski, J.; Sarkar, S. Partial Key Exposure Attack on Short Secret Exponent CRT-RSA. In Advances in Cryptology—Proceedings of the ASIACRYPT 2021—27th International Conference on the Theory and Application of Cryptology and Information Security, Singapore, 6–10 December 2021; Part I; Tibouchi, M., Wang, H., Eds.; Springer International Publishing: Cham, Switzerland, 2021; Volume 13090, pp. 99–129. [Google Scholar] [CrossRef]
  24. Schindler, W.; Wiemers, A. Generic power attacks on RSA with CRT and exponent blinding: New results. J. Cryptogr. Eng. 2017, 7, 255–272. [Google Scholar] [CrossRef]
  25. Xu, S.; Lu, X.; Zhang, K.; Li, Y.; Wang, L.; Wang, W.; Gu, H.; Guo, Z.; Liu, J.; Gu, D. Similar operation template attack on RSA-CRT as a case study. Sci. China Inf. Sci. 2018, 61, 032111:1–032111:17. [Google Scholar] [CrossRef] [Green Version]
  26. Xu, S.; Wang, W.; Lu, X.; Guo, Z.; Liu, J.; Gu, D. Side channel attack of multiplication in GF(q)-application to secure RSA-CRT. Sci. China Inf. Sci. 2019, 62, 39105:1–39105:3. [Google Scholar] [CrossRef] [Green Version]
  27. Wan, W.; Chen, J.; Xia, J.; Zhang, J.; Zhang, S.; Chen, H. Clustering Collision Power Attack on RSA-CRT. Comput. Syst. Sci. Eng. 2021, 36, 417–434. [Google Scholar] [CrossRef]
  28. Kaedi, S.; Doostari, M.; Ghaznavi-Ghoushchi, M.B.; Yusefi, H. A New Side-Channel Attack on Reduction of RSA-CRT Montgomery Method Based. J. Circuits Syst. Comput. 2021, 30, 2150038:1–2150038:18. [Google Scholar] [CrossRef]
  29. Lenstra, A.K.; Lenstra, H.W.; Lovász, L. Factoring Polynomials with Rational Coefficients. Math. Ann. 1982, 261, 515–534. [Google Scholar] [CrossRef]
  30. May, A. New RSA Vulnerabilities Using Lattice Reduction Methods. Ph.D. Thesis, University of Paderborn, Paderborn, Germany, 2003. [Google Scholar]
  31. Coppersmith, D. Finding a Small Root of a Univariate Modular Equation. In Advances in Cryptology—EUROCRYPT ’96, Proceedings of the International Conference on the Theory and Application of Cryptographic Techniques, Saragossa, Spain, 12–16 May 1996; Maurer, U.M., Ed.; Springer: Berlin/Heidelberg, Germany, 1996; Volume 1070, pp. 155–165. [Google Scholar] [CrossRef] [Green Version]
  32. Coppersmith, D. Finding a Small Root of a Bivariate Integer Equation; Factoring with High Bits Known. In Advances in Cryptology—EUROCRYPT ’96, Proceedings of the International Conference on the Theory and Application of Cryptographic Techniques, Saragossa, Spain, 12–16 May 1996; Maurer, U.M., Ed.; Springer: Berlin/Heidelberg, Germany, 1996; Volume 1070, pp. 178–189. [Google Scholar] [CrossRef] [Green Version]
  33. Howgrave-Graham, N. Finding Small Roots of Univariate Modular Equations Revisited. In Cryptography and Coding, Proceedings of the 6th IMA International Conference, Cirencester, UK, 17–19 December 1997; Darnell, M., Ed.; Springer: Berlin/Heidelberg, Germany, 1997; Volume 1355, pp. 131–142. [Google Scholar] [CrossRef]
  34. Becker, T.; Weispfenning, V.; Kredel, H. Gröbner Bases—A Computational Approach to Commutative Algebra; Graduate Texts in Mathematics; Springer: Berlin/Heidelberg, Germany, 1993; Volume 141. [Google Scholar]
  35. Maitra, S.; Sarkar, S. On Deterministic Polynomial-Time Equivalence of Computing the CRT-RSA Secret Keys and Factoring. Def. Sci. J. 2012, 62, 122–126. [Google Scholar] [CrossRef] [Green Version]
  36. The Sage Developers. SageMath, the Sage Mathematics Software System (Version 9.0). 2021. Available online: https://www.sagemath.org (accessed on 20 May 2022).
  37. Somsuk, K. The Improvement of Elliptic Curve Factorization Method to Recover RSA’s Prime Factors. Symmetry 2021, 13, 1314. [Google Scholar] [CrossRef]
  38. Peng, L.; Takayasu, A. Generalized cryptanalysis of small CRT-exponent RSA. Theor. Comput. Sci. 2019, 795, 432–458. [Google Scholar] [CrossRef]
  39. Oonishi, K.; Kunihiro, N. Attacking Noisy Secret CRT-RSA Exponents in Binary Method. In Information Security and Cryptology—Proceedings of the ICISC 2018—21st International Conference, Seoul, Korea, 28–30 November 2018; Revised Selected Papers; Lee, K., Ed.; Springer International Publishing: Cham, Switzerland, 2018; Volume 11396, pp. 37–54. [Google Scholar] [CrossRef]
  40. Oonishi, K.; Huang, X.; Kunihiro, N. Improved CRT-RSA Secret Key Recovery Method from Sliding Window Leakage. In Information Security and Cryptology—Proceedings of the ICISC 2019—22nd International Conference, Seoul, Korea, 4–6 December 2019; Revised Selected Papers; Seo, J.H., Ed.; Springer International Publishing: Cham, Switzerland, 2019; Volume 11975, pp. 278–296. [Google Scholar] [CrossRef]
  41. Oonishi, K.; Kunihiro, N. Recovering CRT-RSA Secret Keys from Noisy Square-and-Multiply Sequences in the Sliding Window Method. In Information Security and Privacy—Proceeding of the 25th Australasian Conference, ACISP 2020, Perth, WA, Australia, 30 November—2 December 2020; Liu, J.K., Cui, H., Eds.; Springer International Publishing: Cham, Switzerland, 2020; Volume 12248, pp. 642–652. [Google Scholar] [CrossRef]
Figure 1. The comparison of previous work and ours with respect to the attack upper bound. The horizontal axis stands for the bit size of CRT exponents and the vertical one stands for the logarithm of the attack bound.
Figure 1. The comparison of previous work and ours with respect to the attack upper bound. The horizontal axis stands for the bit size of CRT exponents and the vertical one stands for the logarithm of the attack bound.
Mathematics 10 02238 g001
Table 1. A toy example of the lattice basis matrix for m = 1 .
Table 1. A toy example of the lattice basis matrix for m = 1 .
1 y p y q x q x p y p x q y q z q y p z p y q z q x q z q x p y p z p x q y q z q
e ˜ 2 e ˜ 2
y p e ˜ 2 e ˜ 2 Y
y q e ˜ 2 e ˜ 2 Y
x q e ˜ 2 e ˜ 2 X
f ˜ e ˜ e ˜ X Y
f ˜ y q e ˜ e ˜ X Y
z p e ˜ 2 e ˜ 2 X
g ˜ e ˜ e ˜ X Y
g ˜ y q e ˜ e ˜ X Y
h ˜ e ˜ e ˜ X Y
f ˜ z p e ˜ e ˜ X 2 Y
f ˜ g ˜ z p X 2 Y
Table 2. Experimental results of our proposed factoring attack on CRT-RSA.
Table 2. Experimental results of our proposed factoring attack on CRT-RSA.
log 2 N α log 2 N β log 2 N m ω Time
512403842453
512512202534
512512303132424
102410051224511
102420076831122482
10241024103424584,221
2048250200024539
204820488025351
2048204820031307412
Table 3. The comparison of previous error term and ours.
Table 3. The comparison of previous error term and ours.
CRT-Exponents Bit-Size gcd ( N 1 , ed p 1 , ed q 1 ) gcd ( N 1 , 2 t e )
192536.18
25616.186.78
32019.223.9
38413.628.8
44814.082.26
51216.744.38
57618.53.1
64061.784.5
70418.527
76816.468.28
83226.025
89617.524.16
96021.44.76
102427.943.22
Table 4. The comparison and classification of related works and ours on cryptanalysis of CRT-RSA.
Table 4. The comparison and classification of related works and ours on cryptanalysis of CRT-RSA.
Related WorksAttack TypeUsed Method
ours, [35]factoring attacklattice-based method
[37]factoring attackelliptic curve method
[6,12,17,18,38]small CRT-exponent attacklattice-based method
[19,20,21,22,23]partial key exposure attacklattice-based method
[24,25,26,27,28]side-channel attackpower-based method
[39,40,41]key recovery attacktree-based method
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zheng, M. Revisiting the Polynomial-Time Equivalence of Computing the CRT-RSA Secret Key and Factoring. Mathematics 2022, 10, 2238. https://doi.org/10.3390/math10132238

AMA Style

Zheng M. Revisiting the Polynomial-Time Equivalence of Computing the CRT-RSA Secret Key and Factoring. Mathematics. 2022; 10(13):2238. https://doi.org/10.3390/math10132238

Chicago/Turabian Style

Zheng, Mengce. 2022. "Revisiting the Polynomial-Time Equivalence of Computing the CRT-RSA Secret Key and Factoring" Mathematics 10, no. 13: 2238. https://doi.org/10.3390/math10132238

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop