Abstract
In this paper, we present a novel method to solve trivariate polynomial modular equations of the form Our approach integrates Coppersmith’s method with lattice basis reduction to efficiently solve the former equation. Several variants of RSA are based on the cubic Pell equation , where f is a cubic nonresidue modulus . In these variants, the public exponent e and the private exponent d satisfy with . Moreover, d can be written in the form with any satisfying . In this paper, we apply our method to attack the variants when and when and are suitably small. We also show that our method significantly improves the bounds of the private exponents d of the previous attacks on the variants, particularly in the scenario of small private exponents and in the scenarios where partial information about the primes is available.
1. Introduction
In 1978, Rivest, Shamir, and Adleman [1] proposed a number theoretic system, called RSA, as the first public key cryptosystem. It is highly significant in terms of its practical applications. Its security is based on hard mathematical problems such as the integer factorization problem. In the RSA cryptosystem, two large prime numbers p and q of equal bit size are generated, and the RSA modulus is then computed. Next, a public exponent e is selected to satisfy , where is the Euler’s totient function. This enables computation of the private exponent d, which is the inverse of e modulo , that is, d satisfies the modular equation . The equation is well defined and called the key equation. The public key consists of the pair , whereas is the private key. For a plaintext m such that , the encryption is done by computing . The decryption of the ciphertext c is performed by calculating . It is well known that the encryption time is , while the decryption time is .
To enhance the performance of RSA, small private exponents are tempting to use. However, in 1990, Wiener [2] showed that one can break RSA for private exponents . This bound was later improved by Boneh and Durfee [3] up to .
In 1996, Coppersmith [4] proposed a polynomial time algorithm to find small roots of modular polynomial equations of the form , where , and M is an integer of unknown factorization. As a consequence, Coppersmith showed that one can break RSA if the public exponent is 3 under some constraints. Since then, Coppersmith’s method has been generalized to polynomials with more variables.
In 1998, Boneh and Durfee [3] presented an attack on RSA by transforming the key equation into a specific equation . They used Coppersmith’s method to extract the root and then factored the modulus N in polynomial time. As a significant result, they improved Wiener’s bound up to .
To enhance both security and efficiency in RSA, alternative schemes have been proposed. Some of these variants retain the same modulus but modify the Euler totient function , replacing it with m as in [5], or with , as in [6,7,8,9].
Recently, Feng et al. [10] proposed a new method to solve the modular polynomial equation , where . Their method is based on Coppersmith’s method and lattice-based reduction. They showed that , , , and
Thus, one can find x and y in polynomial time. They used their method to break some RSA variants by performing a partial prime exposure attack. They proved that if is an RSA modulus, is an approximation of p such that , and satisfies the key equation with , then the factorization of N can be found under the conditions
Observe that a private exponent d can be written in the form with any , satisfying and . From the modular equation , one gets , and consequently, .
In this paper, we transform the modular equation into an equation of the form and present a method to find its small solutions . We then apply our method to attack the variants when , and and are suitably small.
As a byproduct, we revisit the work of Feng et al. [10] by presenting a different approach for solving the generalized equation . We prove that if , , , , , and , one can find x, y, and z in polynomial time. This improves the bound of Feng et al. [10] for . Notice that their method becomes a particular case of our method if and .
The organization of the paper is as follows. In Section 2, we present some useful preliminaries. In Section 3, we introduce the new method to find the small roots of the equation . In Section 4, we compare our method with the method of Feng et al. [10] In Section 5, we apply the method to break the RSA variant. In Section 6, we compare our attack with the existing attacks. In Section 7, we conduct numerical experiments to confirm the effectiveness of our new method. Finally, we conclude the paper in Section 8.
2. Preliminaries
In this section, we introduce essential results and key concepts that are relevant to our approach.
2.1. The Cubic Pell Curve
Let N be a positive integer and f be a noncubic residue in . The cubic Pell curve is defined by the equation
The set of the integers satisfying (1) form a group where the addition of two points and is defined by
The neutral element is , and the inverse of is given by .
The use of the cubic Pell curve in cryptography was first proposed by Murru and Saettone in [5]. The proposed scheme is a variant of the RSA scheme, and the key equation is of the form .
2.2. Useful Lemmas
Let denote an RSA modulus with . The result that follows specifies the bounds for p and q using N.
Lemma 1
([11]). Let p and q be two prime numbers such that and . Then,
and
The result below demonstrates that, given an approximation of p for a modulus , it is possible to approximate both q and .
Lemma 2
([10]). Let represent an RSA modulus, where . Suppose is an approximation of p such that . Then, the quantity is an approximation of q, and the following inequalities hold
2.3. RSA Variants with the Key Equation
In 2003, Said and Loxton [9] introduced , an enhanced version of the LUC cryptosystem that leverages the third-order linear recurrence of the Lucas function for both encryption and decryption. The system operates with a modulus , where p and q are distinct primes. It employs a public exponent e and a private exponent d, which satisfy the congruence relation . Here, is an extension of Euler’s totient function, which can take forms such as or .
In 2018, Murru and Saettone [5] developed a variant of RSA that incorporates a novel arithmetic operation ⊙ based on the cubic Pell equation . In this context, , and f is defined as a cube nonresidue modulo of both p and q. The public exponent e is selected such that . The private exponent d fulfills the condition .
Encryption within this framework transforms a plaintext message into the ciphertext , while decryption retrieves the original plaintext via .
2.4. Lattice Basis Reduction
In the geometry of numbers, lattices serve as fundamental mathematical structures, representing discrete subgroups within finite-dimensional vector spaces.
Specifically, when the vector space in question is , a lattice can be formally defined as follows.
Definition 1.
Let ω and d be positive integers such that . Consider as ω linearly independent vectors in . The lattice spanned by is the set of all integer linear combinations of these vectors, that is,
The set is called a basis of the lattice . The positive integers d and ω are referred to as the dimension and rank of the lattice , respectively. If , the lattice is said to have full rank.
A lattice can be represented by a matrix , where the rows of correspond to the basis vectors . The determinant of the lattice is defined as
where denotes the transpose of . For a full-rank lattice, the determinant simplifies to
It is well known that a lattice of rank admits infinitely many bases, which are all composed of vectors and sharing the same determinant (see [12]). However, finding a basis consisting of short vectors is a computationally difficult problem, especially as the lattice’s dimension increases.
In 1982, Lenstra, Lenstra, and Lovász [12] introduced the LLL algorithm, which provides an efficient polynomial-time method for finding a reduced basis with relatively short vectors. The following theorem, adapted from [13], quantifies the properties of a reduced basis produced by the LLL algorithm.
Theorem 1
([13]). Let be a lattice spanned by a basis . The LLL algorithm computes a reduced basis , satisfying
for each .
2.5. Coppersmith’s Method
Cryptanalysis frequently involves solving polynomial equations. In 1996, Coppersmith [4] introduced a powerful method for efficiently finding small roots of modular polynomial equations of the form , even when the factorization of the modulus N is unavailable. Over time, this approach has been extended to multivariate polynomials expressed as
where the coefficients are integers. The Euclidean norm of such a polynomial is defined as
In 1997, Howgrave-Graham [14] enhanced Coppersmith’s method, presenting a new approach for identifying small roots. This breakthrough led to a fundamental result that became a cornerstone in the field.
Theorem 2
([14]). Let be a multivariate polynomial containing at most ω monomials. For positive integers e and m, assume that the following conditions hold:
- 1.
- ;
- 2.
- ;
- 3.
- For each , .
Then, holds over the integers.
When working with systems involving more than two variables, extensions of Coppersmith’s method often rely on heuristic techniques. For this work, we make the following assumption [3,15,16,17].
Assumption 1.
The polynomials derived using the LLL algorithm are algebraically independent.
Under this assumption, the unique solution satisfying the system of polynomial equations for can be determined using methods such as Gröbner basis computations or resultants.
3. Solving the Trivariate Polynomial Equation
In this section, we present our method to solve the equation and present a numerical example to show the details.
3.1. Solving the Equation
Theorem 3.
Let N and e be two positive integers. Let be a monic polynomial with degree 2. Suppose there exist three integers , , and such that , with , , , and . Then, one can find , , and in polynomial time if and
Proof.
Write and put . We use Coppersmith’s method [4] to solve the equation . Let be an integer and be a parameter to be optimized. Let . Then, , where
Next, consider the polynomial
where in one of the two disjoint sets
Setting , then the former polynomials satisfy
To apply Coppersmith’s ideas, the starting point is to consider the lattice spanned by the matrix whose rows are the coefficient vectors of the polynomials , where X, Y, Z, and W are positive integers to be determined later. For , we can structure the lattice basis matrix in a left triangular form by arranging the rows according to the tuples in lexicographical order. Specifically, we say that if , or if and , or if , and . Similarly, we order the monomials that correspond to the columns of the matrix. Table 1 presents a typical example with and . The star entries are nonzero terms which do not contribute to the determinant.
Table 1.
The lattice basis matrix for , where a ★ represents an nonzero entry.
Since the matrix of the lattice is triangular, then its determinant is of the form
To compute the former exponents, we need to define the function defined by
To simplify the computations, we approximate and . Then, the dominant parts of the former parameters, as well as of the dimension of the lattice, satisfy
Let , , , and . To obtain a bound of , we suppose so that . Hence, the bounds X, Y, Z, and W can be defined in terms of N as follows:
Next, we combine Theorem 2 and Theorem 1 with by setting
In addition to (2), this gives
Substituting , , , , and , the former inequality can be simplified as
where is a small positive constant related to m and N. The optimal value for t is . To satisfy , the following parameters should hold:
The former inequality implies that . Plugging in (6), we get
for a small . Solving the inequality for , we get
Combining with (7), we get for that
By utilizing four reduced, algebraically independent polynomials , , , and , one can determine the values of by solving the system of equations over the integers. This can be achieved through the application of Gröbner basis methods or resultant techniques, thereby completing the proof. □
3.2. A Numerical Example
Consider the following parameters:
imply that , with
The goal here is to find a small solution of the equation , with . To apply Theorem 3, we set , and . Hence, the conditions of Theorem 3 are satisfied, namely, and . Together with the bound , we take
Let . The lattice is built by the coefficients of the polynomials
where in one of the two disjoint sets
and each term is replaced by . The lattice has dimension . Applying the LLL algorithm to the lattice yields a reduced matrix, from which we derive 40 polynomials. A computation of the Gröbner basis then provides the solution
Both the LLL algorithm and Gröbner basis method took less than one second. Notice that , and then the bound of Feng et al. [10] is , which is lower than our bound .
4. Comparison with the Method of Feng et al. [10]
In 2024, Feng et al. [10] solved the modular equation . They showed that if and , then one can find x and y if
In our method, we can solve the equation whenever and . This shows that the range of is larger their range. Let us compare the bounds of . Denote by the difference between our bound and their bound.
If , we can retrieve their bound by setting in Theorem 3. This shows that their method is a special case of ours.
If , their bound is
For , a simple calculation yields
which shows that our bound is better that their bound.
For , a straightforward computation gives
which shows again that our bound is better than theirs.
5. Application of the New Method
In this section, we apply Theorem 3 to break RSA variants with a key equation of the form .
Theorem 4.
Let be an RSA public key with , , and . Suppose there are three integers , , and such that , and . If is a known approximation of p such that , with , , and , then the modulus N can be factored in polynomial time.
Proof.
Let be an approximation of p such that . According to Lemma 2, the integer is an approximation of q such that
If , then the equation can be rewritten as a modular one, namely, , where , , and
On the other hand, using , and assuming that , we get
Also, we have . To apply Theorem 3, we need a bound for . We assume so that . Then, by applying Theorem 3 for and , the inequality leads to , and the conditions , turn to . After finding the root and using the values of and , we get p and q. This concludes the proof. □
6. Comparison with the Former Attacks
In this section, we compare our attack with the former attacks in terms of the bounds.
6.1. Comparison with the Attack of Zheng et al. [17]
In [17], Zheng et al. proposed an attack targeting the RSA variant introduced by Murru and Saettone [5], which is based on the key equation They showed that the system is vulnerable when , , and . This represents the optimal bound for small private exponent attacks on this scheme.
Let denote the difference between the bound established in Theorem 4, and then we have . Then,
By fixing , it follows that , confirming that our bound is always better than theirs.
6.2. Comparison with the Attack of Feng et al. [10]
In [10], Feng et al. proposed an attack on the cryptographic scheme introduced by Murru and Saettone [5], refining the earlier results of Zheng et al. [17]. They demonstrated that for , , , and , where is an approximation of p, and the scheme becomes vulnerable if . Notably, this bound can be obtained by setting in Theorem 4, indicating that Feng et al.’s method is a specific instance of the more general framework presented in our approach.
On the one hand, the number of exponents e of size that are vulnerable to this attack can be approximated by
where is a small positive value that reflects the exponents that are not coprime with .
On the other hand, the number of weak exponents e of size relative to our attack is given by
This implies that
Let . Then, , with . The upper bound for this count is obtained by summing the number of possible values of in the interval for each such that . This gives
where we used the known result . Consequently,
where is a small positive constant accounting for the integers that are not coprime with . This bound is significantly larger than the number of exponents e of size that are vulnerable to the attack proposed by Feng et al. [10].
7. Experimental Results
In this section, we verify the validity of our proposed attacks. The experiments were carried out employing the HPC-MARWAN cluster [18] using SageMath software (version 10.0). HPC-MARWAN is a cluster dedicated to scientific research, providing computational power and storage capacity, deployed by the National Center for Scientific and Technical Research (CNRST) in Morocco.
We showcase the effectiveness of our method in breaking the RSA variant. We also highlight that our attack retains its efficacy even when both the public exponent e and the private exponent d are approximately of size , which is a scenario in which existing attacks fail to be effective.
7.1. A Detailed Example for Theorem 4 with the Equation
Here are the following public values to consider: and . Furthermore, we have
This yields , with . Additionally, provides an approximation of q, where
The objective is to find a small solution to the equation
where the coefficients A and B are given by
Specifically, we have
To apply the method outlined in Theorem 4, we assume the following conditions , , and , where , , and . It is important to note that these conditions satisfy the requirements of Theorem 4, specifically
This establishes the bounds
Setting and , we construct a lattice of dimension using the previous methodology. By applying the LLL algorithm, we obtain a reduced matrix from which we derive 65 polynomials. Utilizing the Gröbner basis method, we then select the first four polynomials and solve them over the integers. This process yields the following solution
Consequently, can be computed using
Note that the conditions and are satisfied, as stipulated in Theorem 4. The LLL algorithm and the Gröbner basis method were executed in less than nine seconds. Using and , we obtain
Observe that e is of the form
Then, we can compute , and obtain
Hence with .
Notice that the condition established by Feng [10] for breaking the system is given by , which represents the optimal bound for partial prime exposure attacks. In this numerical example, we find that . This shows that their method cannot be broken the system in this particular instance.
Similarly, the optimal bound for small private exponent attacks is given by , as presented by Zheng et al. [17]. In our example, we find that . This indicates that their method is insufficient to break the system in this instance.
7.2. Experiments for Theorem 4 for Large Public Keys
We implement the method outlined in Theorem 4 using large values for the public key . Through a series of experiments, we solve the equation , where
This approach allows us to factor the modulus efficiently when the most significant bits of p are known. The experiments are summarized in Table 2 where the parameters in each column are defined as follows.
Table 2.
Experimental results by exposing the most significant bits of p.
- stands for the number of bits of x.
- is a parameter satisfies .
- is the parameter for which .
- is defined by .
- is a parameter such that .
- is the parameter defined by .
- stands for the number of known bits of p.
- m and t are parameters for constructing the lattice with dimension .
- Time is specified for the time in seconds required to perform both the LLL algorithm and the Gröbner basis method.
Table 2 presents our experimental results when the most significant bits of the prime factor p of are known. These results are related to the method of Theorem 4.
8. Conclusions
In this paper, we introduced a novel approach for solving the generalized equation , where x, y, and z are small unknown integers, and . Our method builds upon Coppersmith’s technique and leverages lattice basis reduction. Furthermore, we applied this approach to the cryptanalysis of the RSA variants based on the cubic Pell equation, represented as . Notably, our technique enabled the factorization of the RSA modulus in polynomial time. This research demonstrates that our attack improves upon previous methods such the method of Feng et al. [10] and the method of Zheng et al. [17], targeting small private exponent attacks and partial prime exposure attacks.
Author Contributions
Conceptualization, M.R., A.T. and A.N.; methodology, M.R., A.T. and A.N.; software, M.R.; validation, M.R., A.T., 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. and A.N.; writing—review and editing, M.R., A.T. and A.N.; visualization, M.R., A.T. and A.N.; supervision, M.R., A.N. and M.Z.; project administration, M.R., A.N., A.T. 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
Data sharing is not applicable.
Acknowledgments
This work utilized the computational resources of HPC-MARWAN, made available by the National Center for Scientific and Technical Research (CNRST) in Rabat, Morocco.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| RSA | Rivest, Shamir, Adleman |
| LLL | Lenstra, Lenstra, and Lovász |
| CNRST | Centre National de la Recherche Scientifique et Technique |
| Euler’s totient function | |
| cubic totient function |
References
- 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. In Advances in Cryptology—Eurocrypt’99; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1999; Volume 1592, pp. 1–11. [Google Scholar]
- Coppersmith, D. Small solutions to polynomial equations, and low exponent RSA vulnerabilities. J. Cryptol. 1997, 10, 233–260. [Google Scholar] [CrossRef]
- Murru, N.; Saettone, F.M. A Novel RSA-Like Cryptosystem Based on a Generalization of the Rédei Rational Functions. In Number-Theoretic Methods in Cryptology; Kaczorowski, J., Pieprzyk, J., Pomykala, J., Eds.; NuTMiC 2017; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 10737, pp. 91–103. [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]
- Elkamchouchi, H.; Elshenawy, K.; Shaban, H. Extended RSA cryptosystem and digital signature schemes in the domain of Gaussian integers. In Proceedings of the 8th International Conference on Communication Systems, ICCS 2002, Singapore, 28 November 2002; IEEE: Piscataway, NJ, USA, 2002; Volume 1, pp. 91–95. [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]
- Said, M.R.M.; Loxton, J. A cubic analogue of the RSA cryptosystem. Bull. Aust. Math. Soc. 2003, 68, 21–38. [Google Scholar] [CrossRef]
- 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. In Africacrypt 2008; Vaudenay, S., Ed.; LNCS; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5023, pp. 174–190. [Google Scholar]
- 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. PhD Thesis, University of Paderborn, Paderborn, Germany, 2003. [Google Scholar]
- Howgrave-Graham, N. Finding small roots of univariate modular equations revisited. In Proceedings of the IMA International Conference on Cryptography and Coding, Cirencester, UK, 17–19 December 1997; LNCS. Springer: Berlin/Heidelberg, Germany, 1997; Volume 1355, pp. 131–142. [Google Scholar]
- Jochemsz, E.; May, A. A strategy for finding roots of multivariate polynomials with new applications in attacking RSA variants. In Proceedings of the ASIACRYPT 2006, Shanghai, China, 3–7 December 2006; LNCS. Springer: Berlin/Heidelberg, Germany, 2006; Volume 4284, pp. 267–282. [Google Scholar]
- Peng, L.; Hu, L.; Lu, Y.; Wei, H. An improved analysis on three variants of the RSA cryptosystem. In Proceedings of the International Conference on Information Security and Cryptology, Beijing, China, 4–6 November 2016; Springer: Berlin/Heidelberg, Germany, 2016; Volume 10143, pp. 140–149. [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]
- HPC-MARWAN, National Center for Scientific and Technical Research (CNRST), Rabat, Morocco. Available online: http://hpc.marwan.ma/index.php/en/ (accessed on 5 May 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/).