RSA private key decryption method and system based on quantum annealing packet optimization algorithm integer decomposition

By combining the quantum annealing grouping optimization algorithm with the quadratic residue sieving method, the range of prime numbers was narrowed and a simplified quantum annealing energy function was constructed. This solved the problems of hardware dependence and low efficiency in large integer factorization in existing technologies, and enabled efficient private key cracking.

CN120979666APending Publication Date: 2025-11-18SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511131117.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-13
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing technologies suffer from high hardware dependence, large efficiency fluctuations, and poor adaptability to integers of different sizes during large integer factorization. In particular, high-performance hardware support is required when factoring large integers, which affects the efficiency of private key cracking.

Method used

A quantum annealing grouping optimization algorithm is introduced in combination with the quadratic residue sieving method to narrow down the range of candidate prime numbers. The grouping solution is performed by constructing a universal quantum annealing energy function, which reduces the use of qubits and hardware requirements and simplifies the construction of the objective function.

Benefits of technology

It improves the efficiency of large integer factorization and the speed of private key cracking, reduces the requirements for quantum computer hardware, simplifies the solution process, and enhances the search efficiency of integer factorization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979666A_ABST
    Figure CN120979666A_ABST
Patent Text Reader

Abstract

The invention relates to an RSA private key decryption method and system based on quantum annealing grouping optimization algorithm integer decomposition, and the method comprises the steps: obtaining a target integer corresponding to an RSA private key, selecting all prime numbers of an arithmetic square root smaller than or equal to the target integer, and constructing an initial prime number set; calculating the Legendre symbol of each prime number in the initial prime number set, screening alternative prime numbers based on the Legendre symbols to form an alternative prime number set, and dividing the prime numbers in the alternative prime number set into a plurality of groups; constructing a general quantum annealing energy function, sequentially solving an optimal solution of each group based on the quantum annealing energy function, and obtaining an effective prime number factor based on the optimal solution; and calculating another effective factor based on the effective prime number factor, and performing RSA private key decryption by using the two effective factors. Compared with the prior art, the method has the advantages that the alternative prime numbers are grouped, each group is solved on the basis of a general simplified energy function, the situation that a complex objective function is constructed by depending on a multiplication table in the face of large-scale integers is avoided, and the decryption efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of RSA cryptography, in particular to an RSA private key decryption method and system based on quantum annealing grouping optimization algorithm integer factorization. BACKGROUND

[0002] Large integer factorization is simply to find two prime factors p and q of a given semiprime N through mathematical methods, that is, to solve N=p*q. Its core goal is to start from N and accurately restore the two prime factors that constitute it, which is a key step in the security analysis and cracking of the RSA public key cryptography system. RSA occupies a core position in modern cryptography, and its security is based on the mathematical difficulty of large integer factorization. The basic principle of RSA algorithm is to select two large prime numbers p and q, calculate their product N=p*q as the key parameter of the public key, and the private key is derived by decomposing N to restore p and q. Therefore, cracking large integer factorization is not only a pure mathematical problem, but also closely related to the security of cryptography in the fields of information security and national security. Large integer factorization belongs to the typical NP problem, which means that as the problem size increases, the computing resources required to solve the problem will increase exponentially. The number field sieve method is a typical algorithm in the field of traditional large integer factorization, which is an efficient means of decomposing large integers within a certain time, but as large integers continue to increase, this algorithm still faces the problem of high dependence on hardware requirements and storage capacity. Moreover, the number field sieve method highly depends on specific mathematical structures, and the efficiency of the algorithm will fluctuate significantly for integers of different sizes, resulting in a lack of universality. In order to solve the above problems, Chinese patent application CN113408732A provides a large integer factorization method based on quantum simulated annealing algorithm, which draws a binary multiplication table of large integer and divides it into columns, constructs a target function based on the binary multiplication table after division, and solves the large integer factorization result based on the target function. Although it solves the algorithm fluctuation caused by the size of the integer when using the number field sieve method, if a large enough integer appears, the target function constructed based on the binary table is extremely complex and still requires high-performance hardware for solving, which affects the efficiency of private key cracking.

[0003] Therefore, it is a technical problem to provide a method that can rely on a simple target function to achieve large integer factorization and improve the efficiency of private key cracking. SUMMARY

[0004] The purpose of the present application is to overcome the defects of the prior art and provide an RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization, which introduces a quadratic residue screening method before the quantum annealing algorithm to narrow the range of candidate prime numbers and greatly compress the candidate space for subsequent quantum annealing search, thereby accelerating the efficiency of finding prime factors from the source.

[0005] The object of the present application can be achieved by the following technical solutions.

[0006] According to a first aspect of the present application, there is provided an RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization, comprising:

[0007] obtaining a target integer corresponding to an RSA private key, selecting all prime numbers less than or equal to the arithmetic square root of the target integer, and constructing an initial prime number set;

[0008] calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol to form a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups;

[0009] constructing a general quantum annealing energy function, sequentially solving the optimal solution of each group based on the quantum annealing energy function, if the optimal solution can be divided by the target integer, then the corresponding optimal solution is an effective prime factor of the target integer factorization, and the solving is immediately stopped;

[0010] calculating another effective factor based on the effective prime factor, and using the two effective factors to perform RSA private key decryption.

[0011] As a preferred technical solution, the method for screening the candidate prime numbers is:

[0012] For the prime number 2, if a 2 ≡Nmod2, 0≤a≤r-1, then 2 is a quadratic residue of the target integer, i.e., 2 is a candidate prime number; wherein a represents an integer;

[0013] The Legendre symbol of an odd prime number is calculated using Euler's criterion, and its expression is:

[0014]

[0015] wherein N represents the target integer; r represents an odd prime number in the initial prime number set;

[0016] Based on the Legendre symbol, it is determined whether N is a quadratic residue of r, if so, then the corresponding r is a candidate prime number, i.e.:

[0017]

[0018] As a preferred technical solution, the general quantum annealing energy function is the sum of a constraint term and a target term,

[0019] wherein the constraint term is: H constraint =A(1-∑ i x i ) 2, A represents a constraint weight coefficient; x i represents a binary variable indicating whether the ith prime number in the group is selected, and x i = 1 represents being selected, and x i = 0 represents not being selected.

[0020] The target item is: H target = B∑ i (N mod z i ) 2 x i , B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group.

[0021] As a preferred technical solution, the method for solving the optimal solution is: converting the general quantum annealing energy function into a QUBO form, constructing a QUBO matrix based on the QUBO form, and using a quantum annealing algorithm to iteratively solve the solution corresponding to the lowest energy value, that is, the optimal solution, based on the QUBO matrix; the solution is a selection condition of prime elements in the group to be solved.

[0022] The QUBO form is:

[0023] H QUBO =∑ i [B(N mod z i ) 2 -A]x i +2A∑ i>j x i x j ,

[0024] Wherein, B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group; A represents a constraint weight coefficient; x i and x j represent binary variables indicating whether the ith and jth prime numbers in the group are selected.

[0025] As a preferred technical solution, the QUBO matrix is a symmetric matrix, and the matrix size is related to the number of elements in the group to be solved. Diagonal elements Q ii = B(N mod z i ) 2 -A, wherein B represents a penalty weight coefficient, N represents a target integer, z i represents the ith prime number in the group, and A represents a constraint weight coefficient; Non-diagonal elements Q ij = A.

[0026] According to the second aspect of the present application, there is provided an RSA private key decryption system based on quantum annealing grouping optimization algorithm integer factorization, comprising:

[0027] A data acquisition module acquires a target integer corresponding to an RSA private key

[0028] A data processing module performs: selecting all prime numbers less than or equal to the arithmetic square root of the target integer, constructing an initial prime number set; calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol to form a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups;

[0029] A quantum annealing algorithm module sequentially solves the optimal solution of each group in the data processing module based on a general quantum annealing energy function, and if the optimal solution can be divided by the target integer, the corresponding optimal solution is an effective prime factor of the target integer factorization, and the solving is immediately stopped, and the effective prime factor is output;

[0030] A private key decryption module: calculates another effective factor based on the effective prime factor, and performs RSA private key decryption using the two effective factors.

[0031] Compared with the prior art, the present application has the following beneficial effects:

[0032] 1) The present application limits the solving range of prime numbers to less than , and screens candidate prime numbers in this range using quadratic residue, screens out non-prime factor prime numbers, and groups the screened candidate prime number set according to the calculation requirement, and sequentially solves each group based on a general quantum annealing energy function. Not only does it narrow the solving range and improve the search efficiency of the optimal solution, but also because there is only one solution for prime factorization in the range of less than , when the optimal solution that can divide the target integer appears, the solving process can be immediately stopped, reducing the search times and improving the search efficiency of the optimal solution, thereby realizing efficient RSA private key decryption.

[0033] 2) In the present application, a simple quantum annealing energy function containing only the candidate prime number itself and its selected condition is constructed to realize the constraint RSA private key decryption process and punishment of the selected multiple prime number solution, without relying on the multiplication table of the target integer to construct a complex objective function, simplifying the RSA private key decryption process.

[0034] 3) In the present application, the number of candidate prime numbers in the group is limited to reduce the dependence on quantum bits, and the requirement for quantum computer hardware is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0035] Figure 1 is a method flowchart of the present application;

[0036] Figure 2 Flow chart for solving the quantum annealing algorithm of the present application. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the protection scope of the present application.

[0038] Embodiment 1

[0039] Nowadays, the algorithm generated by combining the traditional computer with the classical number theory method, such as the number field sieve described above, has been unable to solve the problem of large integer factorization, that is, the problem of hardware dependence and efficiency, which is a fact. Therefore, with the advent of quantum computing concept, people turn to the emerging field of quantum computing to solve the problem of integer factorization. Shor algorithm is one of the most representative large integer factorization algorithms in the field of quantum computing, which can complete large integer factorization in polynomial time by using quantum parallelism and quantum Fourier transform, and poses a great threat to RSA and other cryptographic systems in theory. Therefore, if we want to realize the decryption of RSA private key, we must rely on integer factorization, but the implementation of the above integer factorization algorithm highly depends on the hardware requirements of quantum computer, that is, a large number of quantum bits are needed, that is, the current quantum computing technology still faces the technical bottleneck of limited number of quantum bits.

[0040] In order to solve the above-mentioned technical problems, by introducing quantum annealing algorithm for integer factorization has become a new method, for integer factorization problem, the algorithm will "find the prime factor of N" into "minimize the energy function E(x)" optimization task, through quantum state evolution quickly positioning makes the energy minimum x, y value, namely prime factor p and q, it is an efficient quantum optimization algorithm, but still first in the hardware demand of quantum bits, and the existing method of quantum annealing energy function about integer factorization mostly needs to construct the multiplication table of the integer to be decomposed first, and then based on the multiplication table, the objective function is constructed, although it can reduce the complexity of the constructed objective function to a certain extent by column or block, but it will involve more unknown variables in the solving process, which increases the difficulty of solving, based on this, the quantum annealing algorithm and the quadratic residue screening algorithm are combined, and the prime number set is grouped, and the quantum annealing algorithm is used to find the target value prime factor for each group. In this way, the search range is reduced, and the use of quantum bits is also reduced, and the number of quantum bits only needs to be equal to the number of prime numbers in each group, and in the construction of the energy function, only the known candidate prime number itself and the unknown selected condition are involved, and multiple unknown variables are not involved in the calculation, so that the energy function is simplified.

[0041] In detail, the method provided by the present application has the process as shown in the figure Figure 1 The method provided by the present application has the process as shown in the figure

[0042] S1, obtaining the target integer corresponding to the RSA private key, selecting all prime numbers less than or equal to the arithmetic square root of the target integer, and constructing an initial prime number set.

[0043] In the present application, the Eratosthenes sieve method is used to obtain all prime numbers less than or equal to the arithmetic square root of the target integer, and the principle is: starting from 2, marking the multiples of each prime number as non-prime, and the remaining unmarked ones are prime numbers. For example, to find the prime numbers within 50, first mark the multiples of 2, i.e. 4, 6, 8…, then mark the multiples of 3, i.e. 6, 9, 12…, and then 5, 7, etc. Therefore, the final remaining 2, 3, 5, 7… are prime numbers.

[0044] And in the initial prime number set, all prime numbers are arranged in ascending or descending order.

[0045] S2, calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol, forming a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups.

[0046] S21, screening candidate prime numbers.

[0047] Before using quantum annealing algorithm, quadratic residue screening is introduced to narrow the range of candidate prime numbers, and the principle is based on the number theory property of quadratic residue, that is, for a large integer N=p*q, if a prime number r (r belongs to R1) is a factor of p or q, then N must be a quadratic residue of r, wherein R1 represents an initial prime number set.

[0048] The quadratic residue can be determined by Legendre symbol, and the formula is: a 2 ≡N mod r', 0<=a<=r'-1, but the calculation based on the above formula is relatively complex, and in the application, for the prime number 2, if a 2 ≡N mod 2, then 2 is a quadratic residue of the target integer; and for an odd prime number, the Legendre symbol is calculated by using Euler criterion, and the formula is:

[0049]

[0050] N represents a target integer; and r represents a prime number in an initial prime number set.

[0051] Based on the Legendre symbol, it is determined whether N is a quadratic residue of r, and if yes, the corresponding r is a candidate prime number, that is:

[0052]

[0053] S22, candidate prime number grouping.

[0054] If the integer corresponding to the RSA private key is a large-scale integer, in order to improve the cracking efficiency, the prime numbers in the candidate prime number set are grouped in the application, and the number of prime numbers in the grouping is set according to the calculation demand, for example, the existing candidate prime number set R2={r1, r2, r3, r4, r5, r6, r7}, and the corresponding calculation demand is that the number of quantum bits used in the solving process is not more than 5, then the groupings that can be obtained are: R 21 ={r1, r2, r3, r4, r5} and R 22 ={r6, r7}.

[0055] S3, constructing a general quantum annealing energy function, and sequentially solving the optimal solution of each grouping based on the quantum annealing energy function, if the optimal solution can be divided by the target integer, then the corresponding optimal solution is an effective prime factor of the target integer decomposition, and the solving is immediately stopped.

[0056] S31, constructing a general quantum annealing energy function.

[0057] In the application, the general quantum annealing energy function is the sum of the constraint term and the target term, that is, H 总 =H constraint +H target .

[0058] Wherein, the constraint term is: H constraint = A(1 -∑ i x i ) 2 , A represents a constraint weight coefficient, used to control the importance of the constraint term in the energy function; x i represents a binary variable indicating whether the i-th prime number in the group is selected, and x i = 1 indicates that it is selected, i.e. H constraint = 0; x i = 0 indicates that it is not selected, and when there are multiple x i = 1 or all x i = 0, H constraint > 0, i.e. the constraint term will punish those solutions that select multiple prime numbers or do not select any prime number, ensuring that the direct selection selects a prime number solution, and no constraint is made for the solution that only selects one prime number, because in step S1, the range of the solution of the present application is limited to less than or equal to the arithmetic square root of the target integer, and the integer factorization in this range has only one solution, so there is no need to constrain the solution that only selects one prime number.

[0059] The target term is: H target = B∑ i (N mod z r ) 2 x r , B represents a penalty weight coefficient, which can enhance the punishment for non-integer divisors; N represents the target integer; z i represents the i-th prime number in the group, which can enhance the punishment for non-integer divisors, when the prime number z i can divide N, then N mod z i = 0, so H target = 0 at this time; when z i cannot divide N, then N mod z i > 0, if x i = 1, then this term will increase the value of the energy function, thus punishing the solution of the prime number.

[0060] S32, quantum annealing algorithm solution.

[0061] The flow of this step is shown in Figure 2 , including:

[0062] S321, converting the general quantum annealing energy function into QUBO form.

[0063] For the constraint term, we have:

[0064] A(1 -∑ i x i ) 2 = A[1 2-2·1·∑ i x i +(∑ i x i ) 2 ],

[0065] where, because x i is a binary variable, there is (∑ i x i ) 2 =∑ i x i 2 +2∑ i<j x i x j =∑ i x i +2∑ i> j x i x j , where x j represents the binary variable of the jth prime number in the group.

[0066] So there is: A(1-∑ i x i ) 2 =A-A∑ i x i +2A∑ i>j x i x j , and the QUBO form is: H 总 =∑ i [B(N mod z i ) 2 -A]x i +A+2A∑ i>j x i x j , and the constant term can usually be ignored in the QUBO form, because the optimization goal is to minimize the energy, and the constant term does not affect the selection of variables, so the final form is: H QUBO =∑ i [B(N mod z i ) 2 -A]x i +2A∑ i>j x i x j , where B represents the penalty weight coefficient; N represents the target integer; z i represents the ith prime number in the group; A represents the constraint weight coefficient; x i and x j represent the binary variables of whether the ith and jth prime numbers in the group are selected.

[0067] S322, constructing a QUBO matrix of the to-be-solved grouping based on the QUBO form.

[0068] The QUBO matrix is a symmetric matrix, and the matrix size is related to the number of elements in the to-be-solved grouping, that is, if the number of prime numbers in the grouping is q, the size of the corresponding QUBO matrix is q x q.

[0069] For the diagonal elements of the QUBO matrix, the value is Q ii =B(N mod z i ) 2 -A, wherein B represents a penalty weight coefficient, N represents a target integer, z i represents the i th prime number in the grouping, and A represents a constraint weight coefficient; the value of the non-diagonal element is: Q ij =A.

[0070] The above QUBO matrix represents a quantum annealing algorithm optimization problem, and the energy corresponding to each solution is:

[0071] H=∑ i,j=1,i≠j x i ·Q ii +2·Q ij ·x i ·x j .

[0072] S323, based on the QUBO matrix, using the quantum annealing algorithm, inputting the matrix into the Qbsolv solver to iteratively solve the solution corresponding to the lowest energy value, that is, the optimal solution, and in the present application, each solution is a selection condition of the prime element in the to-be-solved grouping.

[0073] S324, optimal solution verification.

[0074] It is judged whether the optimal solution can be divided by the target integer, if yes, the corresponding optimal solution is the effective prime factor of the target integer decomposition, and the solving is immediately stopped.

[0075] If not, the next grouping is selected, and S322 is executed.

[0076] S4, calculating another effective factor based on the effective prime factor, and using the two effective factors to perform RSA private key decryption.

[0077] In addition, the present application also provides an RSA private key decryption system based on quantum annealing grouping optimization algorithm integer decomposition, which is used to implement the above method, comprising:

[0078] A data acquisition module acquires a target integer corresponding to an RSA private key

[0079] The data processing module performs: selecting all prime numbers less than or equal to the arithmetic square root of the target integer, constructing an initial prime number set; calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol, constructing a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups;

[0080] The quantum annealing algorithm module sequentially solves the optimal solution of each group in the data processing module based on a general quantum annealing energy function, and if the optimal solution can be divided by the target integer, the corresponding optimal solution is an effective prime factor of the target integer, and the solving is immediately stopped, and the effective prime factor is output.

[0081] The private key cracking module: calculates another effective factor based on the effective prime factor, and performs RSA private key decryption using the two effective factors.

[0082] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0083] Embodiment 2

[0084] In this embodiment, in order to verify the implementability and accuracy of the above method, an integer 143 extracted from a certain RSA private key is taken as a target integer for decomposition, and the constraint weight coefficient A in the quantum annealing algorithm is set to 100 and the penalty weight coefficient B is set to 1.

[0085] For 143, the search range is limited to the range less than Therefore, the initial prime number set should be the set of all prime numbers within 11.96, that is, R1{2, 3, 5, 7, 11}.

[0086] Now the initial prime number set R1{2, 3, 5, 7, 11} is screened based on quadratic residues, and the Legendre symbol of each prime number in the initial prime number set is calculated, that is:

[0087] When r1=2, a 2 ≡143mod2=1, that is, a 2 ≡1(mod2), this equation is established when a=1, so 2 is a quadratic residue of 143, and 2 is a candidate prime number.

[0088] When r2=3, a that is Therefore, 3 is not a quadratic residue of 143 and is screened out.

[0089] When r3=5, a that is Therefore, 5 is not a quadratic residue of 143 and is screened out.

[0090] When r4=7, there are That is 7 is not a quadratic residue of 143 and is screened out.

[0091] When r5=11, there are That is 11 is a quadratic residue of 143 and is a candidate prime number.

[0092] Therefore, the final candidate prime number set is R 2= {2, 11}, and since there are only two candidate prime numbers, only one group is divided.

[0093] Since the number of prime numbers in the group is 2, the size of the corresponding QUBO matrix is 2x2, and the diagonal elements Q 11 =B(N mod z1) 2 -A=1x(143 mod 2) 2 -100=-99, Q 22 =B(N mod z2) 2 -A=1x(143 mod 11) 2 -100=-100; the non-diagonal elements Q 12 =Q 21 =A=100, that is:

[0094]

[0095] In this embodiment, the corresponding integer factorization candidate solution is (z1, z2)=(0, 1), that is, the candidate prime number 11 is selected; (z1, z2)=(1, 1), that is, the candidate prime numbers 2 and 11 are selected; (z1, z2)=(1, 0), that is, the candidate prime number 2 is selected.

[0096] The energies corresponding to the above three cases are: H1=Q 11 ·0+Q 22 ·1+2·Q 12 ·0·1=-100; the corresponding H2=-99, H3=100, and the minimum energy value-100 of the three energy function values corresponds to (0, 1), that is, p=11.

[0097] Verify p=11, and the target integer 143 can be divided by 11, so 11 is an effective prime factor, and the other effective prime factor is q=143 / 11=13.

[0098] In summary, for the extracted integer 143 in the RSA private key with decryption, the decomposition result is 143=11x13.

[0099] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for decrypting RSA private key based on quantum annealing grouping optimization algorithm integer factorization, characterized in that, The method comprises the following steps: obtaining a target integer corresponding to an RSA private key, selecting all prime numbers less than or equal to the arithmetic square root of the target integer, and constructing an initial prime number set; calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol, and constructing a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups; constructing a general quantum annealing energy function, sequentially solving the optimal solution of each group based on the quantum annealing energy function, if the optimal solution can be divided by the target integer, the corresponding optimal solution is an effective prime factor of the target integer decomposition, and the solving is immediately stopped; based on the effective prime factor, another effective factor is calculated, and the two effective factors are used for RSA private key decryption.

2. The RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization according to claim 1, characterized in that, The method for screening the candidate prime numbers is as follows: For prime number 2, if a 2 ≡ N mod 2, 0≤a≤r-1, then 2 is the quadratic residue of the target integer, that is, 2 is the candidate prime number; wherein a represents an integer; the Legendre symbol of an odd prime number is calculated by using the Euler criterion, and the expression is as follows: wherein N represents the target integer; r represents an odd prime number in the initial prime number set; whether N is a quadratic residue of r is judged based on the Legendre symbol, if yes, the corresponding r is a candidate prime number, namely:

3. The RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization according to claim 1, characterized in that, the general quantum annealing energy function is a sum of a constraint term and a target term, Wherein, the constraint term is: H constraint = A (1 -∑ i x i ) 2 , A represents the constraint weight coefficient; x i represents the binary variable whether the i-th prime number in the group is selected, and x i =1 indicates selected, x i =0 indicates not selected; The target item is: H target = B∑ i (Nmodz i ) 2 x i , B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group.

4. The RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization according to claim 1, characterized in that, the method for solving the optimal solution is as follows: the general quantum annealing energy function is converted into a QUBO form, a QUBO matrix is constructed based on the QUBO form, and the solution corresponding to the lowest energy value is solved by using a quantum annealing algorithm based on the QUBO matrix, that is, the optimal solution; the solution is a selection condition of the prime number elements in the group to be solved; the QUBO form is as follows: H QUBO =∑ i [B(Nmodz i ) 2 -A]x i +2A∑ i>j x i x j , where B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group; A represents a constraint weight coefficient; x i and x j represents a binary variable indicating whether the ith, jth prime number in the group is selected.

5. The RSA private key decryption method based on quantum annealing grouping optimization algorithm integer factorization according to claim 4, characterized in that, The QUBO matrix is a symmetric matrix, and the matrix size is related to the number of elements in the to-be-solved group, diagonal elements Q ii =B(N mod z i ) 2 -A, wherein B represents a penalty weight coefficient, N represents a target integer, z i represents the ith prime number in the group, and A represents a constraint weight coefficient; non-diagonal elements Q ij =A.

6. A quantum annealing based grouping optimization algorithm integer factorization RSA private key decryption system, characterized by, The method comprises the following steps: a data acquisition module acquires a target integer corresponding to an RSA private key a data processing module performs the following steps: selecting all prime numbers less than or equal to the arithmetic square root of the target integer, constructing an initial prime number set; calculating the Legendre symbol of each prime number in the initial prime number set, screening candidate prime numbers based on the Legendre symbol, and constructing a candidate prime number set, and dividing the prime numbers in the candidate prime number set into several groups; a quantum annealing algorithm module sequentially solves the optimal solution of each group in the data processing module based on a general quantum annealing energy function, if the optimal solution can be divided by the target integer, the corresponding optimal solution is an effective prime factor of the target integer decomposition, and the solving is immediately stopped, and the effective prime factor is output; a private key cracking module: based on the effective prime factor, another effective factor is calculated, and the two effective factors are used for RSA private key decryption.

7. The RSA private key decryption system based on quantum annealing grouping optimization algorithm integer factorization of claim 6, characterized in that, characterized in that, The method for screening the candidate prime numbers is as follows: For prime number 2, if a 2 ≡ N mod 2, 0≤a≤r-1, then 2 is the quadratic residue of the target integer, that is, 2 is the candidate prime number; wherein a represents an integer; the Legendre symbol of an odd prime number is calculated by using the Euler criterion, and the expression is as follows: wherein N represents the target integer; r represents an odd prime number in the initial prime number set; whether N is a quadratic residue of r is judged based on the Legendre symbol, if yes, the corresponding r is a candidate prime number, namely:

8. The RSA private key decryption system based on quantum annealing grouping optimization algorithm integer factorization of claim 6, wherein, the general quantum annealing energy function is a sum of a constraint term and a target term, Wherein, the constraint term is: H constraint = A(1 -∑ i x i ) 2 , A represents the constraint weight coefficient; x i represents the binary variable of whether the i th prime number in the group is selected, and x i = 1 indicates selected, x i = 0 indicates not selected; The target item is: H target = B∑ i (Nmodz i ) 2 x i , B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group.

9. The RSA private key decryption system based on quantum annealing grouping optimization algorithm integer factorization of claim 6, wherein, The method for solving the optimal solution is: converting the general quantum annealing energy function into a QUBO form, constructing a QUBO matrix based on the QUBO form, and iteratively solving the solution corresponding to the lowest energy value, that is, the optimal solution, by using a quantum annealing algorithm based on the QUBO matrix; the solution is a selection condition of prime elements in the to-be-solved group; The QUBO form is: H QUBO =∑ i [B(Nmodz i ) 2 -A]x i +2A∑ i>j x i x j , where B represents a penalty weight coefficient; N represents a target integer; z i represents the ith prime number in the group; A represents a constraint weight coefficient; x i and x j represents a binary variable indicating whether the ith, jth prime number in the group is selected.

10. The RSA private key decryption system based on quantum annealing grouping optimization algorithm integer factorization of claim 9, wherein, The QUBO matrix is a symmetric matrix, and the matrix size is related to the number of elements in the to-be-solved group, diagonal elements Q ii = B(N mod z i ) 2 -A, wherein B represents a penalty weight coefficient, N represents a target integer, z i represents the ith prime number in the group, and A represents a constraint weight coefficient; non-diagonal elements Q ij =A.

Citation Information

Patent Citations

  • Universal megabit integer decomposition method based on quantum annealing algorithm

    CN113408732A