A key generation method, device, equipment, storage medium and program product
By iteratively adjusting the column width of the binary multiplication table and performing quantum annealing calculations using the subQUBO model, the problem of excessive computational complexity in RSA key generation and recovery in quantum annealing calculations is solved, achieving efficient and accurate RSA key generation and recovery.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-14
AI Technical Summary
Existing quantum annealing computation has excessively high computational complexity in the RSA key generation and recovery process, making it impossible to efficiently and accurately perform integer factorization, which leads to difficulties in RSA key generation and recovery.
By iteratively adjusting the column width of the binary multiplication table constructed based on the target integer, the optimal column strategy is determined, a QUBO model is constructed, and the quantum annealing computation mechanism of the subQUBO model is used for iterative optimization to determine the optimal solution, and finally the RSA key is generated.
It effectively reduces the computational complexity of the quantum annealing solution process, achieves efficient and accurate RSA key generation and recovery, and breaks through the bottleneck of soaring computational complexity in traditional quantum annealing integer factorization.
Smart Images

Figure CN122394797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum computing technology, and in particular to a key generation method, apparatus, device, storage medium, and program product. Background Technology
[0002] The core security foundation of the current asymmetric encryption algorithm RSA stems from its reliance on the difficulty of factoring large integers during key generation. RSA public keys are composed of large integers. The public key is composed of p and q (prime factors) and the public key exponent e, while the private key is calculated using p and q to obtain the Euler totient function. Then, the modular inverse d of e is obtained. Therefore, in the scenario of lost private key, the private key can be recovered by factoring the large integer N in the public key to obtain prime factors p and q, thereby achieving RSA decryption / cracking. However, the time complexity of using traditional classical algorithms and integer factorization schemes of classical computers is too high, making it almost impossible to recover the RSA key in a finite amount of time.
[0003] Quantum computing, a novel computing paradigm based on the principles of quantum mechanics, utilizes the unique properties of qubits (such as superposition, entanglement, and interference) for information processing, achieving parallel computing capabilities far exceeding those of classical computers for specific problems. Quantum annealing (QA), a key component of quantum computing, is an optimization algorithm based on the quantum tunneling effect and the principles of adiabatic quantum computing (AQC). It leverages quantum superposition states to explore the solution space, increasing the probability of finding the global optimum, and is primarily used to solve combinatorial optimization problems. Therefore, the integer factorization problem of RSA is transformed into a combinatorial optimization problem, and combined with the fast solution capability of quantum annealing computers, the integer factorization model of RSA can be solved. However, in the integer factorization process of RSA key computation based on quantum annealing, there is a problem that the coefficients of the solution model increase with the integer value, leading to excessive computational complexity in the quantum annealing solution process, thus hindering the efficient and accurate generation and recovery of RSA keys. Summary of the Invention
[0004] To address the problems existing in the prior art, embodiments of the present invention provide a key generation method, apparatus, device, storage medium, and program product, which can effectively reduce the computational complexity of the quantum annealing solution process and achieve efficient and accurate RSA key generation and recovery.
[0005] In a first aspect, embodiments of the present invention provide a key generation method, including: The column width of the binary multiplication table constructed based on the target integer is iteratively adjusted to determine the optimal column strategy with the goal of minimizing the number of variables to be solved. Based on the optimal column division strategy, construct the QUBO model for the target integer decomposition; The QUBO model is simulated and calculated to construct a solution resource pool; wherein the solution resource pool includes several solution instances; For the solution instances in the solution resource pool, an iterative optimization is performed using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution; An RSA key is generated based on the prime factors corresponding to the optimal solution.
[0006] As an improvement to the above scheme, the column width of the binary multiplication table constructed based on the target integer is iteratively adjusted to determine the optimal column strategy with the goal of minimizing the number of variables solved, including: The binary multiplication table is subjected to multiple column width adjustments to obtain multiple column strategies; wherein, the column strategy includes a first column width and a second column width, the first column width is used to indicate the width of the first column block, and the second column width is used to indicate the width of other column blocks besides the first column block; Calculate the number of variables required for the QUBO model under each of the aforementioned column division strategies; The column division strategy with the smallest number of variables is selected as the optimal column division strategy.
[0007] As an improvement to the above scheme, for the solution instances in the solution resource pool, an iterative optimization is performed using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution, including: The solution instance with the minimum ground-state capability is selected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model; The subQUBO model is input into a quantum annealing computer for iterative calculation to obtain solution instances from multiple iterations. These solution instances are then input into the solution resource pool for optimal solution selection until the selected optimal solution converges, thus obtaining the final optimal solution.
[0008] As an improvement to the above scheme, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model, including: Multiple solution instances are randomly selected from the solution resource pool; Calculate the influence of each variable on the ground state energy and the solution concentration of each variable in the QUBO model under the multiple solution instances; Based on the influence and solution concentration of each variable, they are sorted according to a preset variable sorting rule, and several variables at the top of the sort are selected as key variables. Based on several key variables, a subQUBO model is constructed.
[0009] As an improvement to the above scheme, the variables are sorted according to a preset sorting rule based on their influence and solution concentration, including: Sort the variables according to their solution set degree from largest to smallest to obtain the variable sorting; Variables with equal degree in the solution set are sorted in descending order of influence.
[0010] As an improvement to the above scheme, the subQUBO model is input into a quantum annealing computer for iterative calculation to obtain solution instances from multiple iterations. These solution instances are then input into the solution resource pool for optimal solution selection until the selected optimal solution converges, yielding the final optimal solution, including: The subQUBO model is input into a quantum annealing computer for calculation to obtain the solution instance of this round's output; The solution instance output in this round is input into the solution resource pool, and the process is repeated multiple times to input the solution instance output in multiple rounds of iteration into the solution resource pool. The solution instance with the minimum ground-state capability is reselected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model and iterate through quantum annealing until a converged optimal solution is found, which is then taken as the optimal solution.
[0011] Secondly, embodiments of the present invention provide a key generation apparatus, comprising: The column strategy determination module is used to iteratively adjust the column width of the binary multiplication table constructed based on the target integer, and determine the optimal column strategy with the goal of minimizing the number of variables to be solved. The model building module is used to build the QUBO model of the target integer factorization based on the optimal column division strategy. The simulation calculation module is used to perform simulation calculations on the QUBO model and construct a solution resource pool; wherein, the solution resource pool includes several solution instances; The optimal solution determination module is used to iteratively optimize the solution instances in the solution resource pool using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution. The key generation module is used to generate an RSA key based on the prime factors corresponding to the optimal solution.
[0012] Thirdly, embodiments of the present invention provide a key generation device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the key generation method as described in any one of the first aspects.
[0013] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the key generation method as described in any one of the first aspects.
[0014] Fifthly, embodiments of the present invention provide a computer program product, including a computer program or instructions that, when executed by a processor, implement the key generation method as described in any one of the first aspects.
[0015] Compared to existing technologies, the present invention provides a key generation method, apparatus, device, storage medium, and program product. This involves iteratively adjusting the column width of a binary multiplication table constructed based on a target integer to determine the optimal column strategy with the goal of minimizing the number of variables to be solved. Based on the optimal column strategy, a QUBO model for the factorization of the target integer is constructed. The QUBO model is then simulated to construct a solution resource pool, which includes several solution instances. For each solution instance in the solution resource pool, a quantum annealing computation mechanism based on a subQUBO model is used for iterative optimization to determine the optimal solution. An RSA key is generated based on the prime factors corresponding to the optimal solution. The present invention effectively reduces the computational complexity of the quantum annealing solution process, achieving efficient and accurate RSA key generation and recovery. Attached Figure Description
[0016] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a key generation method provided in an embodiment of the present invention; Figure 2This is a flowchart illustrating the construction of a QUBO model based on an improved multiplication table integer decomposition, as provided in an embodiment of the present invention. Figure 3 This is a flowchart of the improved subQUBO solution based on multiple solution instances provided in the embodiments of the present invention; Figure 4 This is a structural block diagram of a key generation device provided in an embodiment of the present invention; Figure 5 This is a structural block diagram of a key generation device provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] It is understood that the various numerical designations used in the embodiments of this invention are merely for descriptive convenience and are not intended to limit the scope of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.
[0020] In embodiments of the invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element. The term "a plurality or several" refers to two or more.
[0021] Integer factorization schemes based on quantum annealing include direct solutions and solutions based on multiplication tables.
[0022] Direct Solution: By directly constructing the binary expressions of the two prime factors and then constructing a polynomial of the square of the difference between the product and the prime factorization, the integer factorization problem is transformed into a combinatorial optimization problem. Here, the integer N = pq, p and q are the prime factors, and N is the known integer to be factored. The binary length of p is: The binary length of q is: .make , Construct the cost function ,in, The prime factor of p is the first prime factor. Bit. When N=pq, the cost function The result is the smallest. For example, 15 = 3. 5. The binary representation of p (the number 3) is (11)2, with a length of 2. The binary representation of q (the number 5) is (101)2, with a length of 3. Substituting p and q into the cost function (also called the object function) yields the variable set. The polynomial is as follows: ; The above equations simplify the third and fourth degree polynomials into quadratic polynomials, which can then be converted into a quadratic unconstrained binary optimization (QUBO) model. The QUBO model is then transformed into the Ising matrix (i.e., the coefficient matrix of the Ising model), and the optimal solution can be obtained using a quantum annealing computer; this solution represents the prime factors of the integers. Multiplication table column scheme: By dividing the multiplication table into columns, equations are constructed based on the column information. Finally, based on the constructed equations, the integer factorization problem is transformed into an optimization problem of finding the minimum difference. A multiplication table of binary prime factors p and q is constructed, the multiplication table is divided into columns, and the following equation is constructed in each column: The sum of the products of each digit in the column block plus the carry-in value of the previous column block equals the target value in the column block plus the carry-in value of this column block.
[0023] 143 = 11 Taking 13 as an example, construct the following table, dividing the multiplication table into 3 columns, as shown below.
[0024]
[0025] Based on the column division rules of the integer multiplication table shown above, three sets of equations are constructed as follows: First column (column1): ; Second column (column2): ; The third column (column3): ; Here, c1, c2, c3, and c4 represent the carry variables generated during binary multiplication. For example, c1 represents the carry variable from column1 to column2, and so on. p1 represents the binary representation of p. 1 p2 represents the binary representation of p. 2 Bit, q1 represents q in binary 2. 1 bit, q2 represents q in binary 2. 2 Bit, range of values 0, 1].
[0026] The cost function based on the multiplication table is constructed as follows: ; Therefore, the integer factorization problem can be transformed into an optimization problem of finding the minimum value of a function (QUBO model).
[0027] Of the two integer solving schemes based on quantum annealing, the direct solution scheme is simpler and easier to model. It involves converting the prime factors p and q into a combination of binary variables with values in the range {0, 1} and constructing a cost function. Given that N is a known integer, the final problem is transformed into an optimization problem of finding the minimum value of the function. However, in this approach, directly substituting a large integer N into the polynomial leads to excessively large polynomial coefficients, increasing the computational complexity during quantum annealing. The integer factorization scheme based on a multiplication table solves the problem of excessively large coefficients in the direct solution approach, but it also increases the number of variables in the model, leading to a larger quantum QUBO model size and further increasing computational complexity. While the multiplication table-based integer factorization scheme increases the number of carry variables, it reduces the coefficients of the Ising model, thus relatively reducing the overall computational complexity of integer factorization. Furthermore, the current QUBO solution scale is limited by the qubit size of the quantum annealing computer; the quantum annealing computer cannot directly solve optimization models exceeding its qubit limit.
[0028] After constructing a QUBO model, it needs to be input into a quantum annealing computer to obtain the final optimal solution. Because the computational complexity of the QUBO model increases exponentially with the number of variables, it suffers from nondeterministic polynomial-Hard (NP-Hard) problems. Directly solving large-scale QUBO models can be extremely difficult, especially when hardware is limited (the number of qubits is finite). Subproblem Quadratic Unconstrained Binary Optimization (subQUBO) is a decomposition method for solving large-scale quadratic unconstrained binary optimization (QUBO) problems. Its core idea is to break down the complex QUBO model into multiple smaller subproblems (sub-QUBOs), solve these subproblems separately, and finally combine the results to approximate the global optimum.
[0029] The embodiments of the present invention revolve around integer factorization ( The quantum QUBO model is constructed and optimized, and the constructed QUBO model is further optimized by using an improved subQUBO scheme with multiple solution instances to decompose the QUBO model into smaller models. Then, the optimal solution of the large QUBO model is obtained through a quantum annealing computer, thereby completing the overall optimization of the integer factorization problem model, increasing the upper limit of model computation on quantum computers, reducing the computational complexity of the quantum annealing solution process, and realizing efficient and accurate RSA key generation and recovery.
[0030] There are two main approaches to optimizing the model size: (1) optimize modeling and reduce the size of the QUBO model; (2) decompose the large QUBO model into multiple small QUBO models.
[0031] This invention optimizes modeling by improving the column layout of the multiplication table. Specifically, it determines the optimal column layout strategy by comparing the number of variables under different column rules, thereby minimizing the size of the QUBO model variables to be solved. In decomposing large QUBO models, it optimizes subQUBO. Specifically, it extracts key variables from the QUBO model according to appropriate rules, transforming the problem of solving large QUBO models into solving smaller QUBO models. This allows a quantum annealing computer of the same specifications to support the solution of larger-scale QUBO models. By combining the approaches of early-stage variable optimization and pre-solution model size optimization, this invention achieves overall optimization of the integer factorization problem based on QUBO models. This increases the upper limit of model computation on quantum computers, reduces the computational complexity of the quantum annealing solution process, and enables efficient and accurate RSA key generation and recovery.
[0032] Based on the above technical principles, this invention provides a key generation method, the flowchart of which is shown below. Figure 1 As shown. The key generation method specifically includes: S11: Iteratively adjust the column width of the binary multiplication table constructed based on the target integer to determine the optimal column strategy with the goal of minimizing the number of variables to be solved; S12: Construct the QUBO model of the target integer decomposition based on the optimal column strategy; S13: Perform simulation calculations on the QUBO model to construct a solution resource pool; wherein, the solution resource pool includes several solution instances; S14: For the solution instances in the solution resource pool, an iterative optimization is performed using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution; S15: Generate an RSA key based on the prime factors corresponding to the optimal solution.
[0033] It should be noted that the key generation method described in this embodiment of the invention can be executed by a server or a computer terminal device. For a given RSA public key, a binary multiplication table is first constructed using the target integer in the RSA public key. The column width of the binary multiplication table is iteratively adjusted to minimize the number of variables to be solved, thus finding the optimal column strategy. Then, using the found optimal column strategy, a QUBO model of the target integer factorization is constructed and simulated to obtain several solution instances, thus constructing a solution resource pool. Subsequently, a quantum annealing mechanism based on the subQUBO model is used to iteratively optimize the solution instances in the solution resource pool to find the optimal solution. Finally, based on the two prime factors in the optimal solution and combined with the key generation rules of the RSA public key, the corresponding RSA private key (i.e., the aforementioned RSA key) is generated. This invention, through the introduction of a QUBO model based on binary multiplication table-based integer decomposition, effectively avoids the problem of unbounded coefficient growth with increasing integer N(pq) in traditional models. It reduces the dimensionality of variables and the scale of coefficients from the root of the model, thus reducing computational consumption during quantum annealing. Iterative optimization based on multi-solution instance subQUBO quantum annealing computation, through hierarchical exploration of the solution space and aggregation of local optima, retains the global optimization advantage of quantum annealing in combinatorial optimization while reducing the solution space range of a single solution through sub-problem decomposition, further reducing computational complexity and improving iterative convergence speed. Simultaneously, the statistical analysis and iterative feedback mechanism of multi-solution instances dynamically optimizes the constraint strength and search direction of the QUBO model, reducing invalid search paths and significantly improving the accuracy and stability of RSA integer decomposition. This invention, through the optimization and solution strategy innovation of the QUBO model, can overcome the technical bottleneck of "large integers causing a surge in complexity" in traditional quantum annealing integer factorization. While ensuring key security, it effectively reduces the computational complexity of the quantum annealing solution process, achieving high efficiency and accuracy in RSA key generation and recovery, and providing a feasible technical path for the application of RSA cryptography in the quantum computing era.
[0034] In one optional embodiment, the column width of the binary multiplication table constructed based on the target integer is iteratively adjusted to determine the optimal column strategy with the goal of minimizing the number of variables to be solved, including: The binary multiplication table is subjected to multiple column width adjustments to obtain multiple column strategies; wherein, the column strategy includes a first column width and a second column width, the first column width is used to indicate the width of the first column block, and the second column width is used to indicate the width of other column blocks besides the first column block; Calculate the number of variables required for the QUBO model under each of the aforementioned column division strategies; The column division strategy with the smallest number of variables is selected as the optimal column division strategy.
[0035] Specifically, the binary multiplication table is constructed as follows: The target integer is initialized with prime factors, and the initialized prime factors are converted to binary to obtain the binary representation of each prime factor; Construct a binary multiplication table based on the target integer and the binary representations of each of the prime factors.
[0036] In this embodiment of the invention, the construction of the quantum QUBO model by integer factorization introduces an improved multiplication table (i.e., a binary multiplication table), and by optimizing the column strategy, the column strategy with the smallest number of variables relative to the QUBO model is found. Finally, the QUBO model is constructed using the optimized column strategy.
[0037] Among them, the following relationship exists in the column-based strategy based on the multiplication table: (1); This represents the sum of all elements in column i of the multiplication table. Indicates the starting position of column block i. This represents the m-th binary variable among the prime factors p. This represents the nth binary variable among the prime factors q.
[0038] (2); This represents the sum of carry variables within column i (obtained from the carry variables of the columns preceding column i). This represents the m-th carry variable in the k-th column block, where k is the carry variable. <i。
[0039] (3); (4); This represents the maximum carry value of column i, which is the sum of the product and the carry value in column i. This indicates the number of digits to be carried over, or the number of carry variables.
[0040] (5); Equation (5) above can be understood as the sum of the products of each digit in the column block + the carry value of the previous column block = the target value in the column block + the carry value of the current column block. It can be understood that the target value in the column block is determined based on the fixed theoretical value of the target integer in the corresponding bit segment of the column. Under normal circumstances, the target value in the final product of the column block should be equal to the target value.
[0041] The cost function of the binary multiplication table is: (6).
[0042] 143 = 11 Taking the binary multiplication table of 13 as an example (where 143 = (10001111)2, 11 = (1011)2, 13 = (1101)2), the specific details are shown in the table below.
[0043]
[0044] For example, when column 2 3 2 4 When it is a single column, , Target value , .
[0045] Based on the above equation (6), a cost function can be constructed. The QUBO model is obtained after optimization using multinomial variables. The transformation of the QUBO model based on multinomial variable optimization is existing technology and will not be detailed here.
[0046] When N=pq, the cost function result is minimized. Therefore, when the cost function result decreases and approaches convergence through iteration, it can be considered that an effective solution with prime factors p and q has been obtained.
[0047] like Figure 2 As shown, based on the improved column strategy of the multiplication table described above, the specific process of constructing the QUBO model for integer factorization is as follows: Set the initial values of p and q, and convert them to binary representation; Construct a binary multiplication table using the target integer N and its prime factors p and q; where the binary length of the target integer N is Len. In the column layout strategy of the binary multiplication table, two column widths are allocated, including a first column width, which indicates the width of the first column block. The second column width is used to indicate the width of other column blocks. Distribute evenly. Determine the column layout strategy for each time. and After that, the number of variables required for the QUBO model is calculated. ; The rules for adjusting column widths in a column-based strategy are as follows: First, determine the width of the first column. Then determine the width of the second column. And calculate the number of variables required to solve the QUBO model based on the width after column division. t represents the number of adjustments, and the number of variables is recalculated after each gradual adjustment of the column width; during the adjustment process, the column width can be adjusted according to the set step size, and must meet the following requirements. , This constraint condition is completed when the column width cannot be adjusted (i.e., the constraint condition is not met) or the set number of adjustments is reached; By min{ Find the column layout strategy with the minimum number of variables and select it as the optimal column layout strategy. Finally, based on this optimal column strategy, a QUBO model for integer N decomposition is constructed.
[0048] It should be noted that the QUBO model for integer N decomposition based on the column strategy is existing technology and will not be described in detail here.
[0049] By constructing a QUBO model through integer factorization of the improved multiplication table, the size of the QUBO model variables can be compressed, thus optimizing the size of the QUBO model solution variables. At the same time, this QUBO model can be used as input for the next step of quantum annealing computer to solve for the optimal solution, thereby reducing the computational complexity of the integer factorization quantum annealing computer.
[0050] In one optional embodiment, for solution instances in the solution resource pool, an iterative optimization is performed using a quantum annealing mechanism based on the subQUBO model to determine the optimal solution, including: The solution instance with the minimum ground-state capability is selected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model; The subQUBO model is input into a quantum annealing computer for iterative calculation to obtain solution instances from multiple iterations. These solution instances are then input into the solution resource pool for optimal solution selection until the selected optimal solution converges, thus obtaining the final optimal solution.
[0051] Specifically, the subQUBO model is input into a quantum annealing computer for iterative computation to obtain solution instances from multiple iterations. These solution instances are then input into the solution resource pool for optimal solution selection until the selected optimal solution converges, yielding the final optimal solution, including: The subQUBO model is input into a quantum annealing computer for calculation to obtain the solution instance of this round's output; The solution instance output in this round is input into the solution resource pool, and the process is repeated multiple times to input the solution instance output in multiple rounds of iteration into the solution resource pool. The solution instance with the minimum ground-state capability is reselected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model and iterate through quantum annealing until a converged optimal solution is found, which is then taken as the optimal solution.
[0052] Considering the limited number of qubits in quantum annealing computation, and the fact that the size of the QUBO model variables is also limited by the number of qubits, this invention introduces an improved multi-solution instance, subQUBO, to decompose the QUBO model in order to support larger integer factorization annealing models on a quantum annealing computer. In constructing subQUBO, the set of variables that have the greatest impact on the ground state energy is extracted from the QUBO model. Then, the extracted variable set is used to solve the problem, and the results are combined to obtain the optimal solution of the QUBO model at the ground state energy. Figure 3 As shown, the optimal solution search process based on the multi-solution instance subQUBO is as follows: Step 1: The number is obtained through preliminary simulation calculation using a classical computer. ( Quasi-ground state solution of the QUBO model As a solution instance, r These solution instances are then stored in the solution resource pool (Pool) corresponding to the QUBO model. ), forming a collection A solution resource pool (Pool) for each solution instance; Step 2: Find the optimal solution from the solution resource pool. The optimal solution is the instance of the solution with the minimum ground-state energy in the solution pool. ; Step 3: Determine the optimal solution Check if the solution is close to convergence (i.e., if the cost function of the QUBO model at this optimal solution converges). If it converges, output the optimal solution. If you want to exit, then exit; otherwise, proceed to the next step. Step 4: From the resource pool (Pool) Randomly select from individual solution examples For each solution instance, firstly, based on the set variable sorting rules, extract m key variables to form a subQUBO. X represents One solution instance among a set of solution instances; Step 5: Input the subQUBO into the quantum annealing computer to calculate the new solution. (i.e., a new solution instance); Step 6: Apply the new solution Input into the solution resource pool, and iterate. Second-rate; Step 7: Compare the ground state energies of solution instances in the solution resource pool and select the one with the smallest ground state energy. For each solution instance, construct a new solution resource pool. ; Find the optimal solution from the new solution resource pool. ; Determine if the optimal solution is close to convergence; if it is convergent, output the optimal solution. If you do not exit, then exit; otherwise, return to step 4.
[0053] It should be noted that constructing subQUBO based on variables is an existing technology and will not be described in detail here.
[0054] This invention improves the QUBO model to a multi-solution instance subQUBO solution. The approximate solution obtained can be recovered by using the variable ordering rules of the QUBO model, thereby restoring the values of p and q. Finally, it can be solved according to the following rules: Determine whether the obtained optimal solution is the value obtained by factoring the integer N. This represents the modulo operation. Represents the logical OR operator.
[0055] This invention employs iterative optimization based on quantum annealing computation using multiple solution instances (subQUBO). By exploring the solution space hierarchically and aggregating local optima, it retains the global optimization advantage of quantum annealing in combinatorial optimization while reducing the solution space range for a single solution through subproblem decomposition. This reduces computational complexity and improves iterative convergence speed. Furthermore, the statistical analysis and iterative feedback mechanism of multiple solution instances dynamically optimizes the constraint strength and search direction of the QUBO model, reduces invalid search paths, and significantly improves the accuracy and stability of RSA integer factorization.
[0056] Specifically, a number of solution instances are randomly selected from the solution resource pool to construct a subQUBO model, including: Multiple solution instances are randomly selected from the solution resource pool; Calculate the influence of each variable on the ground state energy and the solution concentration of each variable in the QUBO model under the multiple solution instances; Based on the influence and solution concentration of each variable, they are sorted according to a preset variable sorting rule, and several variables at the top of the sort are selected as key variables. Based on several key variables, a subQUBO model is constructed.
[0057] Specifically, based on the influence and solution concentration of each variable, the variables are sorted according to a preset sorting rule, including: Sort the variables according to their solution set degree from largest to smallest to obtain the variable sorting; Variables with equal degree in the solution set are sorted in descending order of influence.
[0058] For example, the specific process for extracting the key variable m from the QUBO model is as follows: Calculate the variables in the QUBO model Influence on ground state energy ,in Indicates calculation A function of the degree of influence; The calculation of the influence of variables on the ground state energy in the QUBO model is existing technology and will not be described in detail here. Calculate multiple solution instances (i.e., the above) Variables in a solution instance Number of solution instances with a median value of 1 , where u is The variable indices in the solution set formed by each solution instance. When count is approximately equal to or equal to 0 or... When count is approximately equal to or equal to a certain value, it indicates a high degree of concentration of the variable's values. This indicates a low concentration of variable values. In multiple-solution instances... This represents the u-th variable in the solution instance with index v.
[0059] Variables in the QUBO model According to the variable sorting rules ( The solutions are sorted in descending order of concentration, and then, for solutions with the same concentration, they are sorted in descending order of influence.
[0060] This indicates that the first m variables in the sorted order are extracted as the key variables (extracted variables) for subQUBO. Wherein, To extract the solution The first m variables.
[0061] This invention, through optimizing the sub-QUBO sorting and selection rules, enables the computation of larger-scale integer-factored QUBO models using this sub-QUBO scheme.
[0062] This invention, through the introduction of a QUBO model based on integer factorization of a binary multiplication table, reduces the model's variable size, optimizes the model size, and thus reduces the computational complexity of the quantum annealing solution process. Furthermore, by introducing iterative optimization through quantum annealing computation based on multi-solution instance subQUBO, it achieves effective decomposition of the QUBO model to support solving larger QUBO models, and obtains the optimal solution more quickly, thereby enabling efficient and accurate RSA key generation and recovery.
[0063] See Figure 4 , Figure 4 This is a structural block diagram of a key generation device provided in an embodiment of the present invention. The key generation device includes: The column strategy determination module 11 is used to iteratively adjust the column width of the binary multiplication table constructed based on the target integer, and determine the optimal column strategy with the goal of minimizing the number of variables to be solved. Model building module 12 is used to build the QUBO model of the target integer decomposition according to the optimal column strategy; The simulation calculation module 13 is used to perform simulation calculations on the QUBO model and construct a solution resource pool; wherein, the solution resource pool includes several solution instances; The optimal solution determination module 14 is used to iteratively optimize the solution instances in the solution resource pool using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution. The key generation module 15 is used to generate an RSA key based on the prime factors corresponding to the optimal solution.
[0064] In an optional embodiment, the column splitting strategy determination module 11 includes: The column width adjustment unit is used to adjust the column width of the binary multiplication table multiple times to obtain multiple column strategies; wherein, the column strategy includes a first column width and a second column width, the first column width is used to indicate the width of the first column block, and the second column width is used to indicate the width of other column blocks besides the first column block; The variable number calculation unit is used to calculate the number of variables required for the QUBO model under each of the column strategies. The optimal column strategy selection unit is used to select the column strategy with the smallest number of variables as the optimal column strategy.
[0065] In an optional embodiment, the optimal solution determination module 14 includes: The first optimal solution selection unit is used to select the solution instance with the minimum ground state capability from the solution resource pool as the optimal solution; An optimal solution output unit is used to output the optimal solution as the final optimal solution when the optimal solution converges. The subQUBO model building unit is used to randomly select several solution instances from the solution resource pool to build a subQUBO model when the optimal solution has not converged. The second optimal solution selection unit is used to input the subQUBO model into a quantum annealing computer for iterative calculation, obtain solution instances output by multiple iterations, and input the solution instances output by multiple iterations into the solution resource pool for optimal solution selection until the selected optimal solution converges, thus obtaining the final optimal solution.
[0066] In one optional embodiment, the subQUBO model building unit includes: The solution instance selection subunit is used to randomly select multiple solution instances from the solution resource pool; The parameter calculation subunit is used to calculate the influence degree of each variable on the ground state energy and the solution concentration degree of each variable in the QUBO model under the multiple solution instances. The variable sorting subunit is used to sort the variables according to the influence and solution concentration of each variable, according to a preset variable sorting rule, and select several variables in the top of the sort as key variables. The model building subunit is used to construct a subQUBO model based on several of the key variables.
[0067] In one optional embodiment, the variable sorting subunit includes: The first sorting subunit is used to sort the variables in descending order of solution concentration to obtain the variable sorting; The second sorting subunit is used to sort variables with equal degree in the solution set of the variable sorting according to their influence from largest to smallest.
[0068] In one optional embodiment, the second optimal solution selection unit includes: The quantum annealing computation subunit is used to input the subQUBO model into the quantum annealing computer for computation to obtain the solution instance of the current round output; The solution input subunit is used to input the solution instance output in the current round into the solution resource pool, and iterates multiple times to input the solution instance output in multiple rounds of iteration into the solution resource pool; The optimization subunit is used to reselect the solution instance with the minimum ground state capability from the solution resource pool as the optimal solution; The first solution determination subunit is used to output the optimal solution as the final optimal solution if the optimal solution converges. The second solution determination subunit is used to randomly select several solution instances from the solution resource pool to construct a subQUBO model and perform quantum annealing iterations when the optimal solution fails to converge, until a converged optimal solution is found and taken as the optimal solution.
[0069] It should be noted that the working process of each module in the key generation device described in the embodiments of the present invention can refer to the working process of the key generation method described in the above embodiments, and the technical effect achieved is the same as that of the key generation method described in the above embodiments, so it will not be repeated here.
[0070] See Figure 5 , Figure 5 This is a structural block diagram of a key generation device provided in an embodiment of the present invention. The key generation device includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, it implements the steps in the various key generation method embodiments described above, such as steps S11 to S15.
[0071] For example, the computer program may be divided into one or more modules or units, which are stored in the memory 22 and executed by the processor 21 to complete the present invention. The one or more modules or units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the key generation device.
[0072] The key generation device may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will understand that the schematic diagram is merely an example of a key generation device and does not constitute a limitation on the key generation device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the key generation device may also include input / output devices, network access devices, buses, etc.
[0073] The processor 21 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 21 is the control center of the key generation device, connecting all parts of the key generation device via various interfaces and lines.
[0074] The memory 22 can be used to store the computer program and / or modules. The processor 21 implements various functions of the key generation device by running or executing the computer program and / or modules stored in the memory 22 and calling the data stored in the memory 22. The memory 22 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0075] If the modules or units integrated into the key generation device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 21, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0076] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0077] The above description represents the preferred embodiments of the present invention. It should be noted that, for those skilled in the art, various improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A key generation method, characterized in that, include: The column width of the binary multiplication table constructed based on the target integer is iteratively adjusted to determine the optimal column strategy with the goal of minimizing the number of variables to be solved. Based on the optimal column division strategy, construct the QUBO model for the target integer decomposition; The QUBO model is simulated and calculated to construct a solution resource pool; wherein the solution resource pool includes several solution instances; For the solution instances in the solution resource pool, an iterative optimization is performed using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution; An RSA key is generated based on the prime factors corresponding to the optimal solution.
2. The key generation method as described in claim 1, characterized in that, The column width of the binary multiplication table constructed based on the target integer is iteratively adjusted to determine the optimal column strategy with the goal of minimizing the number of variables solved, including: The binary multiplication table is subjected to multiple column width adjustments to obtain multiple column strategies; wherein, the column strategy includes a first column width and a second column width, the first column width is used to indicate the width of the first column block, and the second column width is used to indicate the width of other column blocks besides the first column block; Calculate the number of variables required for the QUBO model under each of the aforementioned column division strategies; The column division strategy with the smallest number of variables is selected as the optimal column division strategy.
3. The key generation method as described in claim 1, characterized in that, For the solution instances in the solution resource pool, an iterative optimization process based on a subQUBO model-based quantum annealing mechanism is used to determine the optimal solution, including: The solution instance with the minimum ground-state capability is selected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model; The subQUBO model is input into a quantum annealing computer for iterative calculation to obtain solution instances from multiple iterations. These solution instances are then input into the solution resource pool for optimal solution selection until the selected optimal solution converges, thus obtaining the final optimal solution.
4. The key generation method as described in claim 3, characterized in that, Randomly select several solution instances from the solution resource pool to construct a subQUBO model, including: Multiple solution instances are randomly selected from the solution resource pool; Calculate the influence of each variable on the ground state energy and the solution concentration of each variable in the QUBO model under the multiple solution instances; Based on the influence and solution concentration of each variable, they are sorted according to a preset variable sorting rule, and several variables at the top of the sort are selected as key variables. Based on several key variables, a subQUBO model is constructed.
5. The key generation method as described in claim 4, characterized in that, Based on the influence and solution concentration of each variable, they are sorted according to a preset variable sorting rule, including: Sort the variables according to their solution set degree from largest to smallest to obtain the variable sorting; Variables with equal degree in the solution set are sorted in descending order of influence.
6. The key generation method as described in claim 3, characterized in that, The subQUBO model is input into a quantum annealing computer for iterative computation, yielding solution instances from multiple iterations. These solution instances are then input into a solution resource pool for optimal solution selection until the selected optimal solution converges, resulting in the final optimal solution, including: The subQUBO model is input into a quantum annealing computer for calculation to obtain the solution instance of this round's output; The solution instance output in this round is input into the solution resource pool, and the process is repeated multiple times to input the solution instance output in multiple rounds of iteration into the solution resource pool. The solution instance with the minimum ground-state capability is reselected from the solution resource pool as the optimal solution; If the optimal solution converges, the optimal solution is output as the final optimal solution; If the optimal solution fails to converge, several solution instances are randomly selected from the solution resource pool to construct a subQUBO model and iterate through quantum annealing until a converged optimal solution is found, which is then taken as the optimal solution.
7. A key generation device, characterized in that, include: The column strategy determination module is used to iteratively adjust the column width of the binary multiplication table constructed based on the target integer, and determine the optimal column strategy with the goal of minimizing the number of variables to be solved. The model building module is used to build the QUBO model of the target integer factorization based on the optimal column division strategy. The simulation calculation module is used to perform simulation calculations on the QUBO model and construct a solution resource pool; wherein, the solution resource pool includes several solution instances; The optimal solution determination module is used to iteratively optimize the solution instances in the solution resource pool using a quantum annealing computation mechanism based on the subQUBO model to determine the optimal solution. The key generation module is used to generate an RSA key based on the prime factors corresponding to the optimal solution.
8. A key generation device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the key generation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the key generation method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the key generation method according to any one of claims 1 to 6.