311
Views
0
CrossRef citations to date
0
Altmetric
Computer Science

The improved algorithm to limit scope for recovering private key in Multi-Prime RSA by utilizing Quantum Fourier Transform

Article: 2301149 | Received 11 Sep 2023, Accepted 27 Dec 2023, Published online: 13 Jan 2024

Abstract

Rivest–Shamir–Adleman (RSA) is widely recognized as one of the most effective and well-known public key encryption techniques. This technology has the capability for both data encryption and digital signature purposes. The private key is the primary target for unauthorized individuals attempting to damage the security of the RSA. In fact, recovering the private key becomes a challenging task when only the modulus and the public key are disclosed. The aim of this research is to present a methodology that may be employed to retrieve the private key and other alternative keys. This methodology is specifically designed to recover the plaintext through modular exponentiation. Periodic result from Quantum Fourier Transform (QFT) is an important part of this method. The process is split into two steps. In the first step, QFT is used in a quantum environment to find the periodic result of modular exponentiation. This result is then used to find the private key and alternative keys in a classical computing setting. When considering the generation of modulus from multiple primes, it is imperative to note that Shor’s algorithm requires a minimum of two factoring steps to get the expected outcomes. On the other hand, the proposed method may be executed in a single step. Furthermore, the odd periodic outcome that is not solvable by Shor’s algorithm can be chosen to find the results by using the proposed method. In addition, this approach can also reveal other keys that may be considered as possible candidates for the private key. The experimental results emphasize the effectiveness of the utilized method in accurately identifying the private key and possible alternative candidates when implemented in instances of lower size. Moreover, the periodic outcome ensures accurate achievement of objectives in classical computing; it is different from Shor’s algorithm, which must generate a new periodic outcome when the result is not in the condition.

1. Introduction

RSA, known as Rivest–Shamir–Adleman (Rivest et al., Citation1978) is well-known public key cryptography in the field of modern cryptography. The flexibility is based on the mathematical complexity associated with breaking down large numbers into prime factors. RSA, developed by R. L. Rivest, A. Shamir and L. Adleman in 1978, enables secure online transactions, ensures confidentiality and provides authentication (Diffie & Hellman, Citation1976). It operates by generating a public key for encryption and a private key for decryption. Due to the complexity of prime factorization, which becomes increasingly difficult with larger numbers, the security strength of RSA has demonstrated remarkable resilience against classical computers. This has solidified RSA’s significance as a valuable instrument for protecting the confidentiality and integrity of sensitive data in the digital age (Paar & Pelzl, Citation2010). Although many factoring algorithms, including Trial division (Nidhi et al., Citation2014), Fermat’s Factorization (McKee, Citation1999) and their improvements (Somsuk & Tientanopajai, Citation2017; Somsuk, Citation2018; Tahir et al., Citation2021; Wu et al., Citation2014), Pollard’s rho algorithm (Pollard, Citation1978), Quadratic Sieve (Lenstra et al., Citation1982), General Number Field Sieve (GNFS) (Hamdi et al., Citation2014) and Elliptic Curve Factorization (Pollard, Citation1974), have been presented, it is important to note that none of these methods relying on classical computer have demonstrated the ability to efficiently solve this problem within polynomial time.

Shor’s algorithm, which was first proposed by P. Shor (Citation1994), represents an important development in the field of quantum computing. The utilization of this method provides a robust approach for factorizing extremely large numbers with exponential efficiency in comparison with standard approaches. This algorithm exploits the foundational principles of quantum superposition and entanglement to efficiently execute the factorization of composite numbers, a task that provides an important challenge for traditional computers. The importance of Shor’s algorithm is in its relevance to RSA encryption, because its capacity to effectively factorize large numbers presents a potential threat to the security of RSA. Nevertheless, in cases when it is necessary to utilize multiple primes, exceeding two prime numbers, for the generation of both the public key and private key, the implementation of Shor’s algorithm requires at least two processes. Furthermore, if the result of the periodicity test is an odd number, it is essential to repeat the procedure using a different base.

The aim of this research is to propose an approach for identifying the private key or prospective alternate keys that could serve as the private key. The implementation consists of two distinct parts. The first phase of the analysis involves the computation of a periodic result using Quantum Fourier Transform (QFT). In fact, the result of this method may appear as either an odd or even number. Furthermore, in situations where RSA requires the use of several prime factors for generating keys, the incorporation of the quantum component enables the efficient calculation of the periodic output in one step, therefore decreasing the computational burden inside the quantum domain. In contrast, the following section is concerned with the classical computer. The periodic outcome serves as an essential parameter. The core principle involves the recognition of a wide range of values that may serve as the private key.

The rest of the paper is structured in the following form. Section 2 provides an extensive review of relevant research, containing significant works that include RSA, Quantum computing, QFT and Shor’s algorithm. Section 3 presents the proposed method that utilizes the periodic outcome derived from the quantum component to calculate the private key, as well as alternative keys that can potentially serve as the decryption key in replacement of the private key. Section 4, the experimental results and analyses are presented. The final portion will address that aspect of the conclusion.

2. Related works

This section aims to present a comprehensive examination of four essential domains of understanding: RSA, quantum computing, QFT and Shor’s algorithm.

2.1. RSA cryptography

RSA is the public key cryptography. The benefit is in its efficient utilization of prime factorization complexity to guarantee secure data transmission and digital identification. It serves as the foundation for ensuring secure online transactions, implementing digital signatures (Somsuk &Thakong, Citation2020; Yang et al., Citation2021), and facilitating the exchange of secret information (Vishwakarma & Gupta, Citation2021; Wahab et al., Citation2021). The possible impact on the security assumptions of RSA could be influenced by the emergence of computational paradigms and advanced methodologies. Moreover, RSA constitutes an algorithm that exhibits substantial resistance against attacks employing classical computer algorithms, such as factorization or brute force attack (Somsuk, Citation2022, Citation2021).

In truth, confidentiality and authentication are two crucial features of information security in the context of the RSA. Confidentiality refers to the securing of information to prevent unauthorized access or disclosure. It is accomplished by the process of encrypting data utilizing the public key of the intended receiver, followed by the subsequent decryption of the encrypted data using the private key. Moreover, authentication refers to the process of validating the identity of an individual, device, or institution. The utilization of digital signatures is integral to the functionalities of RSA. Therefore, the process of authentication plays an essential part in defending the integrity and validity of data. The application of this method engenders confidence among recipients by providing confidence that the received data is unmodified and originated from the claimed sender.

RSA consists of three primary components in its implementation. The initial aspect relates to the procedure of generating the essential components, including the modulus, the public key, and the private key. Assuming, n = iZ+pi where pi represents a prime number and n stands as the modulus, a situation involving several prime numbers occurs when the number of prime factors exceeds two. Subsequently, Euler function (Φ (n)) can be computed from Φ(n) = iZ+(pi1). Following toward, the selection of the public key, denoted as e, can be made while adhering to a certain condition: 1 < e < Φ(n) and gcd(e, Φ(n)) = 1. The last step in this process is to compute the private key, d, from e*d mod Φ(n) = 1. The next step involves the encryption procedure, where the plaintext is encoded by employing the following equation: c = me mod n, where m is the plaintext and c is the ciphertext. The final step entails the decryption procedure, attempting to recover the plaintext by employing the equation: m = cd mod n. The original message will be recovered after the decrypting process is finished.

At present, there is not an efficient algorithm within the fields of digital technology that is able to destroy RSA in polynomial time. However, if the ongoing development of quantum computers reaches a state of perfection, it is possible that the RSA encryption method might be compromised by the utilization of specific algorithms designed for quantum computers, such as Shor’s algorithm.

2.2. Overview of quantum computing

Quantum computing shows a significant progression in computational capabilities, employing the principles of quantum mechanics to fundamentally transform approaches for information processing (Harrow et al., Citation2009). In contrast to classical bits, quantum bits, also known as qubits, contain the unusual property to be able to exist simultaneously in several states. The possible applications of quantum computing include a wide range of disciplines, including the optimization of intricate systems, the simulation of quantum processes, the study of encryption and the development of new drugs. In addition, Shor’s algorithm, a factorization method implemented on a quantum device, is attracting attention due to its potential to compromise classical cryptography systems such as RSA.

However, the field of quantum computing is presently in its early stages of development, encountering several challenges such as the demand for stable qubits and the requirement for error correction systems (Majumdar & Sur-Kolay, Citation2020). Therefore, the complete achievement for the potential of quantum computers to effectively compromise RSA has not been achieved at yet. The security of RSA encryption relies on the assumption that classical computers face significant challenges in factoring huge numbers into their prime factors. This assumption remains resilient and reliable.

2.3. Quantum Fourier Transform

QFT (Song et al., Citation2018; Wang et al., Citation2007) is a linear transformation that operates on qubits and serves as the quantum counterpart of the Discrete Fourier transform (DFT) (Rocca et al., Citation2022). QFT stands as a fundamental concept within the field of quantum computing. Based on the fundamental principles of quantum mechanics, QFT arises as a powerful instrument for various computing tasks, including modular exponentiation and factoring (Kulkarni & Kaushik, Citation2019). This research paper examines the considerable significance of QFT within the field of cryptography, factorization problem. An example can be observed in Shor’s algorithm, wherein the QFT effectively finds the period of a periodic function, which is a crucial stage in the process of factoring large integers. Furthermore, quantum simulation, optimization issues, and quantum phase estimation are further instances where QFT has been successfully employed, demonstrating its adaptability.

In this study, the utilization of QFT is selected as a method for identifying repetitive patterns to address the problem of retrieving the private key and other keys that could potentially serve as candidates for a private key in Multi-Prime RSA configurations.

In fact, the mathematical representation of QFT in relation to n qubits of quantum states |x and |y is defined as follows: (1) QFT|xn=(12ny = 02n1e2πixy2n)|yn(1)

2.4. Shor’s algorithm

Shor’s algorithm, proposed by P. Shor in 1994, stands as a remarkable breakthrough in quantum computing. It addresses a fundamental problem in number theory: the factorization of large integers into their prime components. This has crucial implications for cryptography, as the security of many classical encryption methods relies on the difficulty of factoring large numbers. Prior to the development of Shor’s algorithm, classical algorithms had significant challenges in efficiently factoring large integers. However, Shor’s algorithm demonstrated that a quantum computer could solve this problem exponentially faster than any classical computer. By exploiting the unique properties of qubits and quantum parallelism, Shor’s algorithm can compute the prime factors in polynomial time, a feat considered intractable for classical computers. In fact, Shor’s algorithm leverages two main principles: QFT and modular exponentiation. It uses these principles to transform the factorization problem into a period-finding problem (Zhang et al., Citation2007), which can be solved exponentially faster on a quantum computer.

Assume that n is generated from the multiplication between two prime numbers, there are two separate parts involved in the utilization of Shor’s technique for the retrieval two prime factors. These components consist of a quantum part and a classical part.

In the quantum domain, its purpose is to deduce the periodic outcome from the modular exponentiation equation.

Given, f(x) = ax mod n, 1 < a < n, the procedure for recovering the periodic result, r, is as follows:

Notation:

  1. The symbol is Hadamard gate to change the qubit to super position state

  2. The symbol is the measurement that a qubit will collapse in pure state

  3. Bf is to compute f(x) = ax mod n

  4. |0 is a single qubit that is equivalent to a 0

  5. |1 is a single qubit that is equivalent to a 1

shows the circuit utilized for determining the value of r in the quantum domain. The process involves a total of seven sequential phases, which are outlined as follows:

Figure 1. Quantum circuit to find periodic result of modular exponentiation.

Figure 1. Quantum circuit to find periodic result of modular exponentiation.

Step 1: |ψ1=|0m|0m

Step 2: |ψ2=Hm|ψ1=12nx=02n1|x|0m

Step 3: |ψ3=Bf|ψ2=12nx=02n1|x|axmod n

Step 4: Measure the 2nd Register to get |ψ4

Step 5: Normalize |ψ4 before using QFT to find |ψ5

Step 6: Measure |ψ5

Step 7: Repeat the process until r is found

After the value of r is determined, if r is an even number, it will be selected as the parameter for computation in the classical phase. On the other hand, the determination of r requires reassessment in cases when it is an odd integer. Assuming r is an even number, the next process will continue in the classical part by using the formulas below to find two prime factors: p1=gcd(ar21,n) and p2=gcd(ar2+1,n) where n = p1p2.

3. The proposed method

This study introduces a method for determining the value of d or identifying the other keys that can also recover the original plaintext. The methodology is divided into two main phases. The first step involves the quantum aspect, utilizing QFT to determine the periodic result. The next part is focused on studying the utilization of the resultant periodicity as a significant factor in the determination of a comprehensive collection that contains the variable d and its associated alternatives. In addition, in situations when the value of n is derived from the multiplication of many prime numbers, the method under consideration demonstrates superior effectiveness when compared to Shor’s algorithm. This assumption is based on the requirement of Shor’s algorithm to perform at least two consecutive factoring operations within the quantum component, whereas the proposed method necessitates a singular step to determine the periodic outcome.

Theorem 1:

Assigning, i, j, k and h Z, where k > j, j and k is the first and second minimal integers that are larger than 0, mjr+1 mod n = mkr+1 mod n = m and jr + 1 mod e = kr + 1 mod e = 0, then (2) (jr + 1)+ hr2mod e =0(2) where r2 = (k–j)r is the periodic to find d

Proof:

After the period of r is determined, it may be shown that m0 mod n = mr mod n = m2r mod n = m3r mod n = = 1, therefore m1 mod n = mr+1 mod n = m2r+1 mod n = m3r+1 mod n = = m.

From,   jr + 1 mod e = 0

And,     kr + 1 mod e = 0

Then,   (kr + 1)–(jr + 1) mod e = 0

Or,

     (k–j)r mod e = 0

Because,   r2 = (k–j)r,

Then,   r2 mod e = 0

Or,     hr2 mod e = 0, where h Z  

Therefore, it implies that:

(jr + 1) + hr2 mod e = 0                                                              

In fact, the information in EquationEquation (2) will be utilized to determine the value of d in Theorem 2.

Theorem 2:

Assigning h Z, d can be recovered by using EquationEquation (3) (3) d=(jr+1)+hr2e(3)

Proof:

From,  m = cd mod n = (me)d mod n = med mod n

From Theorem 1,

mjr + 1 mod n = m and mkr + 1 mod n = m, k > j

It implies that,

m(k-j)r+1 mod n = m

Or,    mh(kj)r+1 mod n = m

Then,

m(j + h(kj))r+1 mod n = m

Or,    mjr+1+h(kj)r mod n = m

Because, r2 = (k–j)r,

m(jr+1)+hr2 mod n = m

Then, 

  ed = (jr + 1) + hr2

Because (jr + 1) + hr2 mod e = 0, then it implies that the result of d = (jr+1)+hr2e is certainly an integer.

Therefore,   d = (jr+1)+hr2e                                                

In fact, after finding r in quantum computing process, the algorithm to find d in classical computer is as follows:

Assuming di = {d0, d1, d2, di-1}, t = (jr+1)e and u = hr2e, it implies that d0=t,d1=t+u,d2=t+2u,,di1=t+(i1)u

Therefore, Algorithm 1 is the method to recover di.

Algorithm 1:

The Proposed Method (Classical Part)

Input: n, e, r

Output: di = {d0, d1, d2, di-1}, i Z and one of the members is the private key

  1. Find j which is the minimal integer that jr + 1 mod e = 0 and mjr+1 mod n = m

  2. Find k which is the second minimal integer (k > j) that kr + 1 mod e = 0 and mkr+1 mod n = m

  3. tjr + 1

  4. r2(k–j)r

  5. w ← 1

  6. ste

  7. ur2e

  8. d0s

  9. While s is less than n Do

  10. ss + u

  11. dws

  12. ww + 1

  13. End While

  14. Remove dw-1

If di is identified, it could be verified that one of the elements in di is equivalent to d. To determine the value of d, it is imperative to carefully choose multiple plaintext values and thereafter validate their correspondence with the goal through the utilization of di.

Example 1:

Assuming n = 77, e = 7 and m = 9, after r is calculated by using Shor’s algorithm in quantum part (r = 15), Find di

←Sol: From Algorithm 1,

Step 1: j = 6, (jr + 1 = 6(15) + 1 = 91, 91 mod 7 = 0)

Step 2: k = 13, (kr + 1 = 13(15) + 1 = 196, 196 mod 7 = 0)

Step 3–8: t = 91, r2 = 105, w = 1, s = 13, u = 15 and d0 = 13

Loop 1: 13 < 77 (the condition is true)

Step 10–12: d1 = s = 28 and w = 2

Loop 2: 28 < 77 (the condition is true)

Step 10–12: d2 = s = 43 and w = 3

Loop 3: 43 < 77 (the condition is true)

Step 10–12: d3 = s = 58 and w = 4

Loop 4: 58 < 77 (the condition is true)

Step 10–12: d4 = s = 73 and w = 5

Loop 5: 75 < 77 (the condition is true)

Step 10–12: d5 = s = 88 and w = 6

Loop 6: 88 < 77 (the condition is false)

Therefore di = {13, 28, 43, 58, 73}

Example 2:

Assuming n = 77, e = 7 and m = 19, after r is calculated by using Shor’s algorithm in quantum part (r = 30), Find di

←Sol: From Algorithm 1,

Step 1: j = 3, (jr + 1 = 3(30) + 1 = 91, 91 mod 7 = 0)

Step 2: k = 10, (kr + 1 = 10(30) + 1 = 301, 301 mod 7 = 0)

Step 3–8: t = 91, r2 = 210, w = 1, s = 13, u = 30 and d0 = 13

Loop 1: 13 < 77 (the condition is true)

Step 10–12: d1 = s = 43 and w = 2

Loop 2: 43 < 77 (the condition is true)

Step 10–12: d2 = s = 73 and w = 3

Loop 3: 73 < 77 (the condition is true)

Step 10–12: d3 = s = 103, w = 4

Loop 4: 103 < 77 (the condition is false)

Therefore di = {13, 43, 73}

The examples mentioned above demonstrate a significant implication: under the condition of constant values for e and n, distinct periods are observed for different plaintext. Therefore, it is apparent that the utilization of QFT is expected to yield frequent outcomes in the attempt to effectively reveal the private key. However, the task of deducing d necessitates a nuanced approach. In the process of selecting m values for implementation, it is crucial to pay careful attention to exclude numbers that do not accurately represent d. It is important to emphasize that the value potentially corresponding to d must consistently reflect in all occurrences of m. Given the inherent property of d as an odd number, the set is effectively purged of all even numbers, further refining the selection process.

Example 3:

Assuming n = 105, e = 5 and m = 23, after r is calculated by using Shor’s algorithm in quantum part (r = 12), Find di

Sol: From Algorithm 1,

Step 1: j = 2, (jr + 1 = 2(12) + 1 = 25, 25 mod 5 = 0)

Step 2: k = 7, (kr + 1 = 7(12) + 1 = 85, 85 mod 5 = 0)

Step 3–8: t = 25, r2 = 60, w = 1, s = 5, u = 12 and d0 = 5

Loop 1: 5 < 105 (the condition is true)

Step 10–12: d1 = s = 17 and w = 2

Loop 2: 17 < 105 (the condition is true)

Step 10–12: d2 = s = 29 and w = 3

Loop 3: 29 < 105 (the condition is true)

Step 10–12: d3 = s = 41 and w = 4

Loop 4: 41 < 105 (the condition is true)

Step 10–12: d4 = s = 53 and w = 5

Loop 5: 53 < 105 (the condition is true)

Step 10–12: d5 = s = 65 and w = 6

Loop 6: 65 < 105 (the condition is true)

Step 10–12: d6 = s = 77 and w = 7

Loop 7: 77 < 105 (the condition is true)

Step 10–12: d7 = s = 89 and w = 8

Loop 8: 89 < 105 (the condition is true)

Step 10–12: d8 = s = 101 and w = 9

Loop 9: 101 < 105 (the condition is true)

Step 10–12: d9 = s = 113 and w = 10

Loop 10: 113 < 105 (the condition is false)

Therefore di = {5, 17, 29, 41, 53, 65, 77, 89, 101}

In Example 3, the value of n is determined as 105, which can be expressed as the product of three prime numbers, 105 = (3)(5)(7). In the context of employing Shor’s algorithm for the retrieval of prime factors, it becomes imperative to address two distinct challenges within the quantum part. Specifically, when considering n as the product of three distinct primes, p1, p2, and p3, the primary challenge pertains to calculate both the combinations of p1p2 and p3. Additionally, the secondary challenge involves the determination of p1 and p2. In contrast, the proposed method requires the solution of a single quantum problem, demonstrating the efficiency and benefit inherent in its implementation.

4. Experimental results and analysis

In this section, comprehensive analysis is conducted on experimental findings obtained from smaller sample sizes, with a thorough examination of the given data. The decision to utilize lower numbers is determined by the current limitations within the quantum domain, which is still in its preliminary phases. On a contrasting note, for the classical counterpart, the selection of the BigInteger class from the Java library imparts an elegant solution, allowing for the manipulation of data without the confines of size limitations. The crucible of these experiments rests upon a computing environment featuring a 2.53 GHz Intel® Core i5 processor, accompanied by a robust 8 GB of RAM–orchestrating an environment where uniformity in parameter control is seamlessly maintained.

The outcomes of the dᵢ and computation time for n = 105 are presented in . This value is derived from the combination of three prime numbers, 3, 5 and 7. The experimental results provide on the reliability of time measurements across all possible combinations of the variables e and m. However, it becomes evident that the value of dᵢ is greatly affected by the selection of m. Furthermore, attempting to attain improved outcomes epitomizes the most advantageous track. This necessitates the inclusion of numerous m values for the implementation to achieve the desired outcome. Intriguingly, even when m remains constant, the number of members within dᵢ exhibits stability, despite being computed from varying e values.

Table 1. Diverse results of di and time calculations for n = 105 across varied public keys and plaintexts.

Furthermore, the data presented in provides clear support for the selection of r as a suitable parameter for calculating di using the proposed method. In contrast to Shor’s algorithm, it is necessary to compute the new value when an odd integer is present as r in the computation.

In addition, this research offers a unique methodology that involves a single computational process within quantum space. This contrasts with the operational procedure of Shor’s algorithm, which requires a minimum of two sequential actions to effectively navigate the complexities associated with three prime factors.

According to the data presented in this table, it can be concluded that the value of m = 23 is the best option for determining di, as it corresponds to the highest value of r.

Because of the small number of n = 105, an inclusive methodology has been employed for the implementation process. This approach includes all values of m, ranging from 2 to 104, while maintaining a fixed value of e for evaluating the results. Experimental results indicate that a wide range of numbers, spanning from 1 to n, demonstrate the capacity to serve as a private key. For example, when n is assigned as 105 and e is assigned as 11, it could be concluded that d is equal to 35. However, a range of alternative exponent values arises as potential options for consideration, including 11, 23, 47, 59, 71, 83 and 95. These values exhibit a smooth alignment with the set of di when they are coupled with 35, as shown in . It is obvious that all the values in the final row should be considered as potential private keys. Therefore, assume many values of m are chosen for the implementation with the same e and n. The members which occur in all di are high possible to be chosen as the private key.

presents the derivation of n = 2145, which is obtained through the multiplication of four distinct prime integers: 2145 = (3)(5)(11)(13). The experimental findings demonstrate a correlation with the patterns observed in . Despite the increasing number of prime numbers, the proposed method retains its inherent property of requiring a singular processing step within the quantum domain. It is important to note that, when compared to Shor’s algorithm, the proposed method effectively simplifies the computational process, resulting in a decrease of the quantum computational steps necessary for its execution.

Table 2. Diverse results of di and time calculations for n = 2145 across varied public keys and plaintexts.

However, according to the data presented in , choosing m = 113 as the value for calculating di is more advantageous compared to selecting m = 101, mostly because of the larger r value.Therefore, to identify the optimal outcome for di, it might be necessary to explore various values of m to determine the intersecting result across all di values.

Assigning, di1 is di of m1, di2 is di of m2, , din is di of mn, then di that all members are high possible to be the key for decryption process can be found by using EquationEquation (4). (4) di=di1di2din(4)

illustrates a comparison of the processes in the quantum phase between the proposed method and Shor’s Algorithm using three different problems. The proposed method demonstrates greater efficiency compared to Shor’s algorithm across these problems.

Table 3. Comparison the process in quantum phase between the proposed method and Shor’s algorithm.

In fact, the primary objective of this study is to present the utilization of Shor’s method in the quantum domain to obtain the periodic result, denoted as r. Subsequently, r is chosen to compute the set of di in the digital component through the utilization of the proposed method. The subsequent illustration serves to demonstrate the comprehensive approach to identify di, which is divided into two distinct components: the quantum part and the digital part. In the following example, di is derived from the parameters n = 15, e = 7, and m = 2.

4.1. Quantum part

Python and Qiskit (Mounica et al., Citation2021) and (Fortunato et al., Citation2022) have been chosen as the programming languages and frameworks, respectively, for the development of the quantum circuit designed to identify periodic results. Qiskit, an open-source software development kit (SDK) designed for quantum computing, was established by IBM Research. It enables users to engage with quantum computers at the level of pulses, circuits, and application modules. The different versions of each tool within the Qiskit framework for this study are presented below by using qiskit.__qiskit_version__ .

depicts the quantum circuit employed in the determination of the period of the function f(x) = 2x mod 15, utilizing the Qiskit framework. In this experimental study, a total of five qubits are allocated for the computational process. Following the completion of the measuring procedure, the value of r is revealed to be 4. As a result, this value serves as the primary determinant for the proposed method in the digital domain.

Figure 2. Shor’s algorithm in quantum part using Qiskit.

Figure 2. Shor’s algorithm in quantum part using Qiskit.

4.2. Digital part

The target will be disclosed by applying the proposed method. Indeed, when Algorithm 1 is implemented with the values r = 4, n = 15, m = 2 and e = 7, the resulting parameters are revealed as follows: j = 5, k = 12, t = 21, r2 = 28, w = 1, s = 3 and u = 4. Therefore, the set di = {3, 7, 11, 15, 19} can be computed iteratively.

The Java code for determining di using the proposed method (Algorithm 1) is presented below. Indeed, the values of m, r, n, and e can be modified sequentially in line 22, 23, 24, and 25. In addition, the method find_MinValue() is utilized to calculate the values of j and k.

5. Conclusion

This article presents an improved method for recovering RSA’s private key or alternative keys through modular exponentiation, using the QFT to derive crucial periodic outcome. The process consists of two phases: utilizing QFT in a quantum computational framework to compute modular exponentiation results, and then leveraging the periodic result to determine private key or the other values which can be selected as the private key in a classical computational setting. Notably advantageous for cases with odd periodic results, the proposed method potentially requires a single step compared to Shor’s algorithm. Furthermore, it consistently reveals the private key set and uncovers potential alternative candidates. The use of QFT ensures precise classical target execution, distinguishing it from Shor’s algorithm. This methodology holds promise for enhancing cryptographic techniques, particularly in challenging scenarios where classical methods fall short, contributing to the security of RSA-based systems.

Disclosure statement

No potential conflict of interest was reported by the author.

Additional information

Notes on contributors

Kritsanapong Somsuk

Kritsanapong Somsuk is an associate professor at the Department of Computer and Communication Engineering, Faculty of Technology, Udon Thani Rajabhat University, Udon Thani, Thailand. He obtained his M.Eng. (Computer Engineering) from Department of Computer Engineering, Faculty of Engineering, Khon Kaen University, M.Sc. (Computer Science) from Department of Computer Science, Faculty of Science, Khon Kaen University and his Ph.D. (Computer Engineering) from Department of Computer Engineering, Faculty of Engineering, Khon Kaen University. The researcher’s area of study includes computer security, cryptography, integer factorization techniques quantum computing and Shor’s algorithm.

References

  • Diffie, W., & Hellman, M. (1976). New directions in cryptography. IEEE Transactions on Information Theory, 22(6), 644–654. https://doi.org/10.1109/TIT.1976.1055638
  • Fortunato, D., Campos, J., & Abreu, R. (2022). Mutation testing of quantum programs: A case study qith qiskit. IEEE Transactions on Quantum Engineering, 3, 1–17. https://doi.org/10.1109/TQE.2022.3195061
  • Hamdi, S. M., Zuhori, S. T., Mahmud, F., & Pal, B. (2014). A compare between Shor’s quantum factoring algorithm and general number field sieve. Proceedings of International Conference on Electrical Engineering and Information & Communication Technology, April 10–12, 2014 (pp. 1–6). IEEE.
  • Harrow, A. W., Hassidim, A., & Lloyd, S. (2009). Quantum algorithm for linear systems of equations. Physical Review Letters, 103(15), 150502. https://doi.org/10.1103/PhysRevLett.103.150502
  • Kulkarni, A., & Kaushik, B. K. (2019). Spin-torque-based quantum Fourier transform. IEEE Transactions on Magnetics, 55(11), 1–8. https://doi.org/10.1109/TMAG.2019.2931278
  • Lenstra, A. K., Lenstra, H. W., Jr., & Lovász, L. (1982). Factoring polynomials with rational coefficients. Mathematische Annalen, 261(4), 515–534. https://doi.org/10.1007/BF01457454
  • Majumdar, R., & Sur-Kolay, S. (2020). Special session: Quantum error correction in near term systems. Proceedings of International Conference on Computer Design, October 18–20, 2020 (pp. 9–12). IEEE.
  • McKee, J. (1999). Speeding Fermat’s factoring method. Mathematics of Computation, 68(228), 1729–1737. https://doi.org/10.1090/S0025-5718-99-01133-3
  • Mounica, G. R., Manimaran, G., Jerome, L. B., & Bhattacharjee, P. (2021). Implementation of 5-qubit approach-based Shor’s algorithm in IBM qiskit. Proceedings of IEEE Pune Section International Conference (PuneCon), December 16–19, 2021 (pp. 1–6). IEEE.
  • Nidhi, L., Anurag, P., & Shishupal, K. (2014). Modified trial division algorithm using KNJ-factorization method to factorize RSA public key encryption. Proceedings of the International Conference on Contemporary Computing and Informatics, November 27–29, 2014 (pp. 992–995). IEEE.
  • Paar, C., & Pelzl, J. (2010). Understanding cryptography: A textbook for students and practitioners. Springer Science & Business Media.
  • Pollard, J. M. (1974). Theorems on factorization and primality testing. Mathematical Proceedings of the Cambridge Philosophical Society, 76(3), 521–528. https://doi.org/10.1017/S0305004100049252
  • Pollard, J. M. (1978). Monte Carlo methods for index computation (mod p). Mathematics of Computation, 32(143), 918–924. https://doi.org/10.1090/S0025-5718-1978-0491431-9
  • Rivest, R. L., Shamir, A., & Adleman, L. (1978). A method for obtaining digital signatures and public-key cryptosystems. Communications of the ACM, 21(2), 120–126. https://doi.org/10.1145/359340.359342
  • Rocca, P., Tosi, L., Anselmi, N., & Massa, A. (2022). On the use of quantum Fourier transform for array antenna analysis. Proceedings of IEEE International Symposium on Antennas and Propagation and USNC-URSI Radio Science Meeting, July 10–15, 2022 (pp. 699–700). IEEE.
  • Shor, P. W. (1994). Algorithms for quantum computation: Discrete logarithms and factoring. Proceedings of the Annual Symposium on Foundations of Computer Science, November 20–22, 1994 (pp. 124–134). IEEE.
  • Somsuk, K. (2018). The improvement of initial value closer to the target for Fermat’s factorization algorithm. Journal of Discrete Mathematical Sciences and Cryptography, 21(7–8), 1573–1580. https://doi.org/10.1080/09720529.2018.1502737
  • Somsuk, K. (2021). A new methodology to find private key of RSA based on Euler totient function. Baghdad Science Journal, 18(2), 0338. https://doi.org/10.21123/bsj.2021.18.2.0338
  • Somsuk, K. (2022). The improved estimation of the least upper bound to search for RSA’s private key. KSII Transactions on Internet and Information Systems, 16(6), 2074–2093. https://doi.org/10.3837/tiis.2022.06.016
  • Somsuk, K., & Thakong, M. (2020). Authentication system for e-certificate by using RSA’s digital signature. TELKOMNIKA (Telecommunication Computing Electronics and Control), 18(6), 2948–2955. https://doi.org/10.12928/telkomnika.v18i6.17278
  • Somsuk, K., & Tientanopajai, K. (2017). An improvement of Fermat’s factorization by considering the last m digits of modulus to decrease computation time. International Journal of Network Security, 19(1), 99–111. https://doi.org/10.6633/IJNS.201701.19(1).11
  • Song, D., He, C., Cao, Z., & Chai, G. (2018). Quantum teleportation of multiple qubits based on quantum Fourier transform. IEEE Communications Letters, 22(12), 2427–2430. https://doi.org/10.1109/LCOMM.2018.2874025
  • Tahir, R. R. M., Asbullah, M. A., Ariffin, M. R. K., & Mahad, Z. (2021). Determination of a good indicator for estimated prime factor and its modification in Fermat’s factoring algorithm. Symmetry, 13(5), 735. https://doi.org/10.3390/sym13050735
  • Vishwakarma, S., & Gupta, N. K. (2021). An efficient color image security technique for IOT using fast RSA encryption technique. Proceedings of IEEE International Conference on Communication Systems and Network Technologies, June 18–19, 2021 (pp. 717–722). IEEE.
  • Wahab, O. F. A., Khalaf, A. A. M., Hussein, A. I., & Hamed, H. F. A. (2021). Hiding data using efficient combination of RSA cryptography, and compression steganography techniques. IEEE Access, 9, 31805–31815. https://doi.org/10.1109/ACCESS.2021.3060317
  • Wang, J., Chen, H., & Li, Z. (2007). The study of simulation technique of quantum compute and quantum Fourier transform. Proceedings of International Conference on Computer Supported Cooperative Work in Design, April 26–28, 2020 (pp. 1111–1115). IEEE.
  • Wu, M. E., Tso, R., & Sun, H. M. (2014). On the improvement of Fermat factorization using a continued fraction technique. Future Generation Computer Systems, 30(1), 162–168. https://doi.org/10.1016/j.future.2013.06.008
  • Yang, T., Zhang, Y., Xiao, S., & Zhao, Y. (2021). Digital signature based on ISRSAC. China Communications, 18(1), 161–168. https://doi.org/10.23919/JCC.2021.01.014
  • Zhang, W., Xu, C., Li, F., & Feng, J. (2007). A period-finding method for Shor’s algorithm. Proceedings of International Conference on Computational Intelligence and Security (pp. 778–780). IEEE.