Abstract
Several RSA variants enforce a constraint between their public and private keys through the relation , where p and q are the prime factors of their RSA modulus . In this paper, we introduce a novel attack on RSA variant schemes where the public exponent satisfies an equation of the form , with sufficiently small , , in a scenario where the attacker has access to an approximation of one of the prime factors. Our new attack utilizes Coppersmith’s method, combined with lattice basis reduction techniques, to efficiently recover the prime factors of the RSA modulus in these scenarios. This method offers a significant improvement over prior attacks on RSA variants with small private exponents or partial prime information.
1. Introduction
Following the publication of the groundbreaking work of Diffie and Hellman [1], the first public-key scheme was introduced by Rivest, Shamir, and Adleman [2]. This system is known as RSA and remains widely used in practical applications. Its security is rooted in computationally hard problems, particularly the integer factorization problem. The cryptosystem involves generating two large prime numbers p and q with equal bit lengths, and producing the RSA modulus . A public exponent is an integer e selected so that it is prime relative to , where denotes the Euler totient function. The private exponent d is defined as the inverse of e modulo , satisfying the key equation . The public key comprises , while the private key consists of . For a message m such that , encryption is achieved using . Decryption then recovers m via .
Encryption and decryption processes can be computationally expensive with large numbers, and using small exponents can improve the efficiency of RSA. However, in 1990, Wiener [3] established that RSA is susceptible to attacks when . Later, Boneh and Durfee [4] refined this limit up to . These findings have spurred ongoing efforts to enhance the efficiency and security of RSA, leading to the development of various alternative variants. Noteworthy examples include CRT-RSA [5] and Multi-Prime RSA [6]. Additionally, other modifications and variants of the RSA scheme have emerged, wherein the Euler totient function is substituted with different formulations.
In 1995, Kuwakado et al. [7] proposed a variant of the RSA cryptosystem that utilizes singular cubic curves, specifically curves with the equation , where is the RSA modulus, and b is an integer in . In this scheme, the public exponent e is chosen such that , where . The private exponent d is determined by the congruence .
In 2002, Elkamchouchi et al. [8] introduced an RSA variant using the arithmetic of the ring of Gaussian integers . This cryptosystem employs moduli of the form , with Gaussian prime numbers and . The central key equation governing the encryption and decryption process is given by . Notably, when and are both prime integers, this relation reduces to .
In 2003, Said and Loxton [9] presented a modified version of the LUC cryptosystem [10]. In this scheme, the modulus is , where p and q are prime numbers, and the public exponent e and the private exponent d are constrained by the equation , where represents a generalized Euler totient function.
The RSA cryptosystem and its variants are used in several real-world applications, to secure email communications, e-commerce, digital signatures and verifications, VPNs and network security, and digital certificates such as TLS [11]. As a consequence, any attack on RSA and its variants is closely scrutinized by security specialists and cryptography system designers.
Besides Wiener’s attack [3] and its refinement by Boneh and Durfee [4], a range of other attacks have been developed for the various RSA variants.
In [12], Peng et al. examined the equation , where and , using Coppersmith’s method. Their findings improved upon previous attacks and demonstrated that if , the factorization of the modulus N can be achieved in polynomial time.
In 2024, Feng et al. [13] proposed a novel partial prime exposure attack on RSA variants defined by the key equation . They demonstrated that if is an RSA modulus, where is an approximation of p with , and if and , then the factorization of N can be efficiently determined under the following conditions:
1.1. Our Contribution
In the attack proposed by Feng et al. [13], the key strategy for breaking the schemes with the equation
involves transforming the key equation into a modular polynomial equation of the form
By solving this equation, the extracted solution satisfies
where and are approximations of the primes p and q, respectively. This enabled them to break the schemes in some scenarios.
In this paper, we extend the work of Feng et al. [13] by transforming the extended key equation
into the generalized modular equation
We demonstrate how the solution of this modular equation can be applied to attack the RSA variants characterized by the key equation whenever two parameters u and z exist such that and are sufficiently small, in addition to a known approximation of one of the RSA prime factors.
Notice that the equation is a generalization of the standard key equation , and the private exponent d and u are related by the formula
As a byproduct, we design a polynomial-time algorithm for attacking the mentioned schemes for a significantly broader range of public exponents compared to existing methods.
1.2. The Structure of the Paper
The remainder of this paper is organized in five sections. Section 2 presents some necessary preliminaries. Section 3 introduces our novel attack. Section 4 offers a comparison between our attack and existing ones. Section 5 presents two detailed numerical experiments that demonstrate the effectiveness of our proposed attack. Finally, Section 6 concludes the paper.
2. Preliminaries
In this section, we present fundamental results and important concepts that are pertinent to our main result.
2.1. Useful Lemmas
Given a positive integer of the form with , the following result provides the limiting values for p and q in relation to N, as well as the prime sum (see [14]).
Lemma 1.
Let p and q be prime numbers satisfying and . Then, one finds that
The subsequent result shows that, given an approximation of p for a modulus , one can also approximate both q and (see [13]).
Lemma 2.
Let be the product of two prime numbers p and q with . Assume that is a known approximation of p with . Then, approximates q, and
2.2. Schemes with the Key Equation
In 1995, Kuwakado et al. [7] introduced a cryptographic scheme utilizing a specific elliptic curve, defined by the equation
where represents an RSA modulus. In this scheme, the public key is represented by the pair , with e chosen to satisfy
The private key is , where d is determined such that
The encryption of the message is performed by computing
after which the ciphertext is obtained by applying the encryption operation e to on the elliptic curve.
Decryption is carried out by first computing
and then applying the decryption operation d to on the curve to recover the original plaintext .
In 2002, Elkamchouchi et al. [8] proposed a cryptosystem in which arithmetic operations are carried out over , the ring of Gaussian integers, rather than the standard integers. In this scheme, the modulus is a standard , and the public and private exponents are related by . For encryption, the plaintext is transformed into the ciphertext , and the decryption is performed using .
In [9,15], alternative RSA variants were introduced, where the modulus is expressed as , and the exponents e and d are interlinked by the key equation
2.3. Lattice Reduction and Coppersmith’s Technique
Lattices are fundamental mathematical structures that play a crucial role in various branches of mathematics. They can be understood as discrete subgroups of finite-dimensional vector spaces. Formally, a Euclidean lattice is defined as follows:
Definition 1.
Let be ω linearly independent vectors with . The Euclidean lattice spanned by is the set
The collection is termed a basis for the lattice , with ω and d corresponding to the rank and dimension of the lattice, respectively. When , the lattice is said to have full rank.
A matrix representation of a lattice can be described as follows: Let be the matrix whose rows correspond to the basis . Then, an element belongs to if, and only if, there exists such that The quantity defined by is referred to as the determinant of the lattice, where denotes the transpose of the basis matrix . For a lattice of full rank, the determinant simplifies to the form
It is a known fact that a lattice of rank has infinitely many bases, each consisting of vectors and having an identical determinant. Nevertheless, identifying a basis made up of short vectors is a computationally difficult task, particularly as the lattice dimensions grow.
In 1982, Lenstra, Lenstra, and Lovász [16] proposed the LLL algorithm, a polynomial-time method for computing a reduced basis with relatively short vectors. The following theorem, derived from [17], outlines the properties of a reduced basis generated by the LLL algorithm:
Theorem 1.
For any lattice defined by a basis . The LLL algorithm produces a reduced basis , such that
for every .
Prior to 1996, polynomials of the form were typically solved when the modulus M had a known factorization, employing techniques like the Chinese Remainder Theorem and the properties of finite fields. In 1996, Coppersmith [18] presented an innovative approach for determining small roots of modular polynomial equations of the form
even when the factorization of the modulus M was not available. This breakthrough was extended to multivariate polynomials, which are expressed as
where . The Euclidean norm related to this polynomial is expressed as
In 1997, Howgrave-Graham [19] revisited Coppersmith’s technique and proposed a new technique for finding small roots. This advance provided a key result that became foundational in the field.
Theorem 2
(Howgrave-Graham). Let be a multivariate polynomial in with no more than ω monomials. Let e and μ be positive integers. Then, the following statements
- 1.
- ,
- 2.
- ,
- 3.
- For all , ,
imply that .
In systems involving more than two variables, extensions of Coppersmith’s method typically depend on heuristic approaches. For the purposes of this study, we make the following assumption [4,12,20,21]:
Assumption 1.
The polynomials generated by the LLL algorithm are algebraically independent.
Based on this assumption, the unique solution to the system of polynomial equations for , can be computed using methods such as the Gröbner basis or resultant computations.
3. Main Results
In this section, we introduce an efficient technique for breaking RSA variants characterized by the generalized key equation
The New Attack
Theorem 3.
Let denote an RSA public key where , , and . Suppose that there are two parameters, and , such that , with . Assume also that p is approximated by with an error bound of , where . If
then the factorization of N can be performed in polynomial time.
Proof.
Let be a close approximation of p such that . By Lemma 2, the value serves as an approximation for q, satisfying the bounds
Let x be an integer satisfying . This can be rewritten as
Write for
As a consequence, the triplet
is a solution of the equation
To compute the root , we employ an extended version of Coppersmith’s method. This involves analyzing the polynomial equation
where
Let . Then, , where
Building on Coppersmith’s method, we introduce an additional parameter , which will be optimized, along with two integers and w, where . We then define the following list of polynomials:
where
and, in the computations, the term is replaced by .
Given that is a root of the equation
Then, by defining , the triplet satisfies the equation . Furthermore, we observe that
for all .
In Coppersmith’s technique, it is important to establish the bounds , , , and such that
Using and assuming that , we obtain the following estimate:
To obtain a bound for , we suppose
so that In addition to , the corresponding bounds are given by
Next, we construct the lattice represented by the matrix whose rows consist of the coefficient vectors of the polynomials . A lower triangular matrix can be formed by considering the following criteria: The rows of this matrix correspond to the polynomials and are arranged lexicographically, assuring that
if , or if and , or if , , and . Similarly, the columns are represented by the monomials , and the lexicographical ordering is as follows:
if , or if and , or if , , and .
A typical example of the lattice basis matrix for and
using , is provided in Table 1. The symbol ★ marks the non-zero entries.
Table 1.
The lattice basis matrix for .
By construction, the lattice basis matrix is lower triangular, and each diagonal entry takes the form for some combination belonging to . This shows that the determinant of the lattice can be expressed as
with , , , , , and
In order to optimize , we replace it with , and to facilitate the computations, we adopt the approximation for a real number x. Consequently, the exponents , , , , , along with the lattice dimension , are governed by the following relations:
The LLL algorithm is applied to reduce the matrix M, yielding a reduced matrix that preserves the determinant. From this reduced matrix, we construct polynomials , where , each of which satisfies the congruence
In order to find the solution, we establish a connection between Theorems 1 and 2, concentrating on the scenario where . Thus, we set
By combining with (2), this simplifies to
By considering the dominant terms in (3) along with the bounds in (1), and neglecting smaller values, we obtain
in which the optimal value for is
To ensure that , the parameters must satisfy
Plugging in (5), we arrive at
Solving the former inequation for , we obtain
Using the assumption and (6), we obtain
In addition, given that and , the inequality
is satisfied if .
Afterward, we select four reduced and algebraically independent polynomials, denoted as for . By solving the system of equations for over the integers, using either the Gröbner basis approach or resultant techniques, we can extract
Finally, solving the system and , we can recover p and q. This concludes the proof. □
A consequence of Theorem 3 is the following result, which concerns the case where the modulus is the product of two primes, p and q, with a sufficiently small difference .
Corollary 1.
Let denote an RSA public key where , with , and . Assume the existence of two parameters, and , such that , where . Furthermore, suppose that the prime difference is small, with . If
then we can recover p and q in polynomial time.
Proof.
Assume that . According to Lemma 1, we have , which implies that
This suggests that is a close approximation of p, with . Applying Theorem 3, we can factor under the conditions
This completes the proof. □
4. Comparison with the Existing Attacks
In this section, we compare the bounds of our attack with those of previous approaches.
4.1. Comparison with Peng et al.’s Attack
In [12], Peng et al. proposed an attack against the RSA variants based on the key equation
They demonstrated that the system is vulnerable when , , and . This represents the optimal bound for attacks targeting small private exponents in such schemes. This bound can be obtained by taking and . As a consequence, our attack can be seen as an extension of the attack of Peng et al.
4.2. Comparison with Feng et al.’s Attack
In [13], Feng et al. introduced an attack on cryptographic systems defined by the key equation . They showed that for a modulus , where , , and with being an approximation of p, the scheme becomes susceptible to attack when . This vulnerability threshold is derived by setting in Theorem 3, highlighting that the approach of Feng et al. is a particular case within the broader framework presented in our methodology.
Additionally, the number of exponents e of size that are prone to the attack of Feng et al. can be approximated by
where is a small positive parameter representing the exponents that are not coprime with .
Alternatively, the quantity of the weak exponents e of size associated with our attack can be expressed as
Hence,
By setting , and observing , where , an upper bound for this quantity is determined by summing the possible values of within the interval for each u satisfying . This results in
where we utilized the established result . Thus,
where is a small positive constant representing the integers u that are not coprime with . This bound greatly exceeds the number of exponents e of size that are susceptible to the attack introduced by Feng et al. [13].
5. Experimental Results
In this section, we provide two small numerical examples to demonstrate that our new method successfully breaks the RSA variants where previous methods fail, and present a table to show that it also works for large examples of real-world size. The computations were carried out using SageMath 10.4 [22] on a PC running Ubuntu 22.04.3 LTS, equipped with an Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz (4 cores) and 8.00 GB of RAM.
5.1. A Numerical Example with a Sufficiently Small Prime Gap
This numerical example illustrates how Theorem 3 can be leveraged to break the schemes when the difference between the RSA primes is sufficiently small.
Let us examine the following public parameters, with N being a 300-bit number and e being a 591-bit number
This implies that , with .
From Corollary 1, the quantity provides an estimate for p, such that
The computation of subsequently results in
The goal here is to solve the modular equation
where
More specifically, we have
To implement the approach specified in Theorem 3, an attacker without knowledge of u, z, and, p can try different values for , , and . Assume that , , and such that , and . These values satisfy the necessary inequalities of Theorem 3, namely
and
Next, we set the bounds
The lattice is constructed by choosing and and using the coefficient vectors of the polynomials , where
, and the substitution is also applied. The sets and are defined by
The lattice has a dimension of . After applying the LLL reduction algorithm, an output of 50 polynomials is obtained. By leveraging the Gröbner basis method, four polynomials are extracted and solved over the integers, providing the desired solution
Combining with gives
The LLL algorithm and Gröbner basis computations were completed in under s. Notice that
where
The hypotheses as well as are well satisfied as outlined in the proof of Theorem 3.
Next, one can compute the private exponent corresponding to e via
Hence,
Observe that with .
To experimentally validate the comparisons made in Section 4, we observed that , where .
Feng et al. [13] proposed an optimal bound for breaking RSA schemes, given by , where defines the threshold for partial prime exposure attacks. In the numerical example considered here, we calculate , which is smaller than . This result demonstrates that Feng’s method is ineffective in compromising the system in this particular case.
In the same manner, the optimal bound for small private exponent attacks, as proposed by Peng et al. [12], is . In our case, we compute , which is also smaller than . This shows that their method is not sufficient to break the systems in this particular instance.
5.2. A Numerical Example Highlighting the Use of a Proper Approximation
In this numerical example, we illustrate the process of recovering RSA primes when an integer that is near one of the RSA primes is accessible.
Consider the following public parameters, where N is a 602-bit number and e is a 1203-bit number
As a result, we obtain , where . Suppose that serves as an approximation for p
In addition,
Using the same approach as before, we set , , and , assuming that , , and , also setting and , for which the lattice has dimension 21. This yields
and
By applying the Gröbner basis technique, we choose four of these polynomials and find their integer solution, resulting in
By combining with , we obtain
The LLL algorithm and Gröbner basis computations were executed in less than 1 seconds. It is noteworthy that
where
The conditions and are both fulfilled, as shown in the proof of Theorem 3.
The private exponent corresponding to e is
Notice that with .
To rigorously validate the comparisons presented in Section 4, we note that
Next, we begin by considering the optimal bound for small private exponent attacks, as established by Peng et al. [12]. This bound is given by
For the parameters of our case, we compute
which is smaller than . This result demonstrates that Peng et al.’s method is inadequate for breaking the system in this particular instance.
Similarly, the optimal bound proposed by Feng et al. [13] is expressed as
where represents the threshold for partial prime exposure attacks. For the numerical example under consideration, we calculate
and since this value is smaller than , we conclude that Feng et al.’s method is also ineffective in compromising the systems for this particular case.
5.3. Experiments with Large Examples
We applied the procedure described in Theorem 3 to examine cases where the public key involves large values. By conducting a series of computational tests, we successfully resolved the modular equation
where
This method enables an efficient factorization of the modulus when an amount of the most significant bits of p is available. Moreover, the conditions and are satisfied, which demonstrates that the optimal bounds in the literature [12,13] fail to break these RSA variants.
The outcomes of these experiments are presented in Table 2, where each row specifies the corresponding parameters:
Table 2.
Experiments for various values of .
- represents the bit-length of the value n.
- is a parameter where holds.
- denotes a parameter such that .
- is defined through the relation .
- corresponds to a parameter satisfying .
- is a parameter satisfying .
- denotes the number of known most significant bits of p.
- and are parameters involved in the construction of the lattice , which has dimension as shown in Theorem 3.
- refers to the computation time in seconds required for executing the LLL algorithm and the Gröbner basis computation.
6. Conclusions
In this paper, we presented an enhanced cryptanalytic approach that builds upon Coppersmith’s method and incorporates lattice basis reduction. We applied this technique to analyze several variants of RSA where the modulus is , the modified totient function is , and the generalized key equation is . Our method successfully enables the factorization of the RSA modulus N in polynomial time, even for real-world examples on a large scale. Our method works in the scenario where an amount of the most significant bits of p is known, and the unknown parameters in the equation are suitably small. Our method extends all methods where the equation is with small d. In addition, the results of this paper highlight the superiority of our attack over existing techniques that are not based on quantum computation, especially in scenarios involving small private exponents and partial prime information.
Author Contributions
Conceptualization, M.R. and A.N.; methodology, M.R. and A.N.; software, M.R.; validation, M.R., A.N. and M.Z.; formal analysis, M.R. and A.N.; investigation, M.R. and A.N.; resources, M.R. and A.N.; data curation, M.R. and A.N.; writing—original draft preparation, M.R.; writing—review and editing, M.R. and A.N.; visualization, M.R. and A.N.; supervision, M.R., A.N. and M.Z.; project administration, M.R., A.N. and M.Z. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| RSA | Rivest, Shamir, Adleman |
| CRT | Chinese Remainder Theorem |
| LLL | Lenstra, Lenstra, and Lovász |
References
- Diffie, W.; Hellman, M. New directions in cryptography. IEEE Trans. Inf. Theory 1976, 22, 644–654. [Google Scholar] [CrossRef]
- Rivest, R.; Shamir, A.; Adleman, L. A Method for Obtaining digital signatures and public-key cryptosystems. Commun. ACM 1978, 21, 120–126. [Google Scholar] [CrossRef]
- Wiener, M. Cryptanalysis of short RSA secret exponents. IEEE Trans. Inf. Theory 1990, 36, 553–558. [Google Scholar] [CrossRef]
- Boneh, D.; Durfee, G. Cryptanalysis of RSA with private key d less than N0.292, Advances in Cryptology-Eurocrypt’99. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1592; pp. 1–11. [Google Scholar]
- Quisquater, J.J.; Couvreur, C. Fast decipherment algorithm for RSA public-key cryptosystem. Electron. Lett. 1982, 18, 905–907. [Google Scholar] [CrossRef]
- Collins, T.; Hopkins, D.; Langford, S.; Sabin, M. Public Key Cryptographic Apparatus and Method. US Patent #5,848,159, 8 December 1998. [Google Scholar]
- Kuwakado, H.; Koyama, K.; Tsuruoka, Y. A New RSA-Type Scheme Based on Singular Cubic Curves with equation y2 ≡ x3 + bx2 (mod N). IEICE Trans. Fundam. 1995, 78, 27–33. [Google Scholar]
- Elkamchouchi, H.; Elshenawy, K.; Shaban, H. Extended RSA cryptosystem and digital signature schemes in the domain of Gaussian integers. In Proceedings of the The 8th International Conference on Communication Systems, Singapore, 28–28 November 2002; Volume 1, pp. 91–95. [Google Scholar]
- Said, M.R.M.; Loxton, J. A cubic analogue of the RSA cryptosystem. Bull. Aust. Math. Soc. 2003, 68, 21–38. [Google Scholar] [CrossRef]
- Smith, P.J.; Lennon, M.J.J. LUC: A New Public Key System. In Proceedings of the ninth IFIP International Symposium on Computer Security, Toronto, ON, Canada, 12–14 May 1993; pp. 103–117. [Google Scholar]
- Boneh, D. Twenty years of attacks on the RSA cryptosystem. Notices Amer. Math. Soc. 1999, 46, 203–213. [Google Scholar]
- Peng, L.; Hu, L.; Lu, Y.; Wei, H. An improved analysis on three variants of the RSA cryptosystem. Int. Conf. Inf. Secur. Cryptol. 2016, 10143, 140–149. [Google Scholar]
- Feng, Y.; Nitaj, A.; Pan, Y. Partial prime factor exposure attacks on some RSA variants. Theor. Comput. Sci. 2024, 999, 114549. [Google Scholar] [CrossRef]
- Nitaj, A. Another Generalization of Wiener’s Attack on RSA; Africacrypt 2008 LNCS; Vaudenay, S., Ed.; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5023, pp. 174–190. [Google Scholar]
- Castagnos, G. An efficient probabilistic public-key cryptosystem over quadratic fields quotients. Finite Fields Their Appl. 2007, 13, 563–576. [Google Scholar] [CrossRef]
- Lenstra, A.K.; Lenstra, H.W. Lovász, L. Factoring polynomials with rational coefficients. Math. Ann. 1982, 261, 513–534. [Google Scholar] [CrossRef]
- May, A. New RSA Vulnerabilities Using Lattice Reduction Methods. Ph.D. Thesis, University of Paderborn, Paderborn, Germany, 2003. [Google Scholar]
- Coppersmith, D. Small solutions to polynomial equations, and low exponent RSA vulnerabilities. J. Cryptol. 1997, 10, 233–260. [Google Scholar] [CrossRef]
- Howgrave-Graham, N. Finding small roots of univariate modular equations revisited. In Proceedings of the IMA International Conference on Cryptography and Coding, LNCS 1355, Cirencester, UK, 17–19 December 1997; Springer: Berlin/Heidelberg, Germany, 1997; pp. 131–142. [Google Scholar]
- Jochemsz, E.; May, A. A Strategy for Finding Roots of Multivariate Polynomials with New Applications in Attacking RSA Variants; ASIACRYPT 2006, LNCS 4284; Springer: Berlin/Heidelberg, Germany, 2006; pp. 267–282. [Google Scholar]
- Zheng, M.; Kunihiro, N.; Yao, Y. Cryptanalysis of the RSA variant based on cubic Pell equation. Theor. Comput. Sci. 2021, 889, 135–144. [Google Scholar] [CrossRef]
- The Sage Developers: SageMath, the Sage Mathematics Software System (Version 10.4) (2025). Available online: https://www.sagemath.org (accessed on 8 April 2025).
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. |
© 2025 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/).