[go: up one dir, main page]

CN115514488A - Big integer decomposition problem mapping method and system based on Itanium model - Google Patents

Big integer decomposition problem mapping method and system based on Itanium model Download PDF

Info

Publication number
CN115514488A
CN115514488A CN202211115726.0A CN202211115726A CN115514488A CN 115514488 A CN115514488 A CN 115514488A CN 202211115726 A CN202211115726 A CN 202211115726A CN 115514488 A CN115514488 A CN 115514488A
Authority
CN
China
Prior art keywords
ising model
hamiltonian
large integer
loss function
spin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211115726.0A
Other languages
Chinese (zh)
Other versions
CN115514488B (en
Inventor
张文甲
何祖源
王绍萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Jiao Tong University
Original Assignee
Shanghai Jiao Tong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Jiao Tong University filed Critical Shanghai Jiao Tong University
Priority to CN202211115726.0A priority Critical patent/CN115514488B/en
Publication of CN115514488A publication Critical patent/CN115514488A/en
Application granted granted Critical
Publication of CN115514488B publication Critical patent/CN115514488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3249Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using RSA or related signature schemes, e.g. Rabin scheme

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Complex Calculations (AREA)

Abstract

The invention provides a big integer decomposition problem mapping method and a system based on an Exin model, comprising the following steps: carrying out formal equivalent replacement on the loss function obtained by each block to meet the formal requirements of the Esinon model, and obtaining a Hamiltonian expression of the Esinon model; according to the values of Hamiltonian under different spinning states and the distribution characteristics of the range of the Hamiltonian, the Hamiltonian can jump out of a local optimal solution until an Esino model reaches a spinning ground state; the method comprises the steps of obtaining two prime factor information, realizing large integer decomposition, further obtaining a private key in an RSA encryption algorithm through an Euler formula and an open public key in a cryptosystem, converting ciphertext information into original plaintext information by using the private key, and realizing the cracking of the RSA cryptosystem. The invention completely expresses a general flow for mapping a large integer decomposition problem into an Esinon model solving problem.

Description

基于伊辛模型的大整数分解问题映射方法及系统Mapping Method and System for Large Integer Decomposition Problem Based on Ising Model

技术领域technical field

本发明涉及密码破解技术领域,具体地,涉及基于大整数分解的RSA密码破解技术领域,更为具体地,涉及一种基于伊辛模型的大整数分解问题映射方法及系统。The present invention relates to the technical field of password cracking, in particular, to the technical field of RSA password cracking based on large integer decomposition, and more specifically, to a large integer decomposition problem mapping method and system based on the Ising model.

背景技术Background technique

尽管目前计算机的运算能力能够很轻松地计算出任意两个有限大整数的乘积,但它的逆向过程仍然是极为困难的,在有限时间内很难准确计算出一个大整数的因数。因此,大整数分解的困难性被广泛应用在了加密领域,尤其是1977年由Ron Rivest、Adi Shamir和Leonard Adleman共同提出的一种非对称加密算法,简称RSA算法,这种加密算法的安全性正是依靠分解两个大素数之积的困难性实现的。虽然破解RSA算法存在极高的理论难度,但许多研究者一直在探寻有效实现大整数分解的方法,这关系着当今密码体系乃至信息安全的完善与更新。试除法是最早被记录的整数分解方法,但是对于应用在密码体系中的大整数,试除法所需的时间远远超过了一般密码的有效期。数域筛法(NFS)是目前分解较大整数最好的方法,但其过程较为繁琐,包括多项式选择、数对筛选、矩阵生成、矩阵求解、平方根求解五个步骤,并且具有一定的随机性。除此之外,近些年还出现了量子算法对整数进行分解,但由于目前无法做到大量量子比特的稳定控制,量子算法的实际应用还有相当长的距离。Although the computing power of the current computer can easily calculate the product of any two finite large integers, its reverse process is still extremely difficult, and it is difficult to accurately calculate the factor of a large integer within a limited time. Therefore, the difficulty of large integer decomposition is widely used in the field of encryption, especially an asymmetric encryption algorithm jointly proposed by Ron Rivest, Adi Shamir and Leonard Adleman in 1977, referred to as the RSA algorithm, the security of this encryption algorithm It is realized by relying on the difficulty of decomposing the product of two large prime numbers. Although it is extremely difficult to crack the RSA algorithm in theory, many researchers have been exploring ways to effectively realize the decomposition of large integers, which is related to the improvement and update of today's cryptographic systems and even information security. Trial division is the earliest recorded integer decomposition method, but for large integers used in cryptographic systems, the time required for trial division far exceeds the validity period of general ciphers. Number field sieve method (NFS) is currently the best method for decomposing larger integers, but its process is cumbersome, including five steps of polynomial selection, number pair screening, matrix generation, matrix solution, and square root solution, and has certain randomness . In addition, quantum algorithms have appeared in recent years to decompose integers. However, due to the current inability to achieve stable control of a large number of qubits, the practical application of quantum algorithms still has a long way to go.

伊辛模型最初是一种描述物质铁磁性的物理模型,现在已经发展为有着诸多应用场景的数学计算模型,它包含许多自旋状态为“+1”或“-1”的自旋节点。该模型中,自旋节点间存在两体相互作用,以及外部磁场的作用,从而改变自旋节点的自旋状态,基于这种特性,伊辛模型系统的哈密顿量会逐步降低,直至到达基态。伊辛模型是解决组合优化问题的有效方法,可以将问题参数转化为相互作用强度和外部磁场强度,进而利用求解伊辛模型获取最优解。目前,许多由物理信号(如电信号或光信号等)表征自旋节点的伊辛模型已经被提出,具有计算速度快、能耗低等特性。虽然将大整数分解问题转化为伊辛模型的例子已经有所报道,但现有的方法只有数学上的推导,未形成一般的程序流程,并且需要将多体相互作用转化为二体相互作用,同时对于更大整数的转化,还面临着模型系数过大、精度要求过高等问题。另外,将大整数分解问题转化为伊辛模型后,没有更进一步地分析模型特性,未对迭代过程做出针对性的改进。The Ising model was originally a physical model describing the ferromagnetism of matter. Now it has developed into a mathematical calculation model with many application scenarios. It contains many spin nodes with spin states of "+1" or "-1". In this model, there are two-body interactions between spin nodes and the action of an external magnetic field, thereby changing the spin state of the spin nodes. Based on this characteristic, the Hamiltonian of the Ising model system will gradually decrease until it reaches the ground state . The Ising model is an effective method to solve combinatorial optimization problems. It can transform the problem parameters into interaction strength and external magnetic field strength, and then use the Ising model to obtain the optimal solution. At present, many Ising models that represent spin nodes by physical signals (such as electrical signals or optical signals) have been proposed, which have the characteristics of fast calculation speed and low energy consumption. Although there have been reports of converting large integer factorization problems into Ising models, the existing methods only have mathematical derivations and have not formed a general program flow, and it is necessary to convert many-body interactions into two-body interactions. At the same time, for the conversion of larger integers, there are also problems such as excessive model coefficients and high precision requirements. In addition, after transforming the large integer decomposition problem into the Ising model, the characteristics of the model were not further analyzed, and no targeted improvement was made to the iterative process.

专利文献CN101814109A(申请号:CN200910078286.4)公开了一种基于DNA自组装计算的分解大整数的方法,所述方法包括以下步骤:基于DNA自组装技术构建分解整数的逻辑运算架构;形成初始的运算TILE,包括起始TILE、计算TILE和数据传递TILE;在预先设定的实验条件下,控制温度以及溶液的浓度,保证DNA自组装顺利完成组装;解的检测,寻找出运算完整的自组装结构,分离并提取其中的报告链,根据编码原则读取结果。但该发明没有引入特定的计算模型,没有构建只含有二次项、一次项和常数项的损失函数。Patent document CN101814109A (application number: CN200910078286.4) discloses a method for decomposing large integers based on DNA self-assembly calculations. The method includes the following steps: constructing a logical operation framework for decomposing integers based on DNA self-assembly technology; forming an initial Calculation of TILE, including initial TILE, calculation of TILE and data transfer TILE; under the pre-set experimental conditions, control the temperature and concentration of the solution to ensure the smooth completion of DNA self-assembly; solution detection, to find out the complete self-assembly structure, separate and extract the reporting chain within it, and read the results according to the coding principles. However, this invention does not introduce a specific calculation model, and does not construct a loss function that only contains quadratic terms, primary terms, and constant terms.

发明内容Contents of the invention

针对现有技术中的缺陷,本发明的目的是提供一种基于伊辛模型的大整数分解问题映射方法及系统。In view of the defects in the prior art, the object of the present invention is to provide a large integer decomposition problem mapping method and system based on the Ising model.

根据本发明提供的一种基于伊辛模型的大整数分解问题映射方法,包括:According to a kind of Ising model-based large integer decomposition problem mapping method provided by the present invention, comprising:

步骤S1:对二进制乘法竖式中的每个中间项引入辅助变量,构建辅助块,对每块所得到的损失函数进行形式上的等价替换,使其满足伊辛模型的形式要求,将各块的损失函数相加并作变量代换,化简得到伊辛模型的哈密顿量表达式;Step S1: Introduce auxiliary variables to each intermediate term in the binary multiplication vertical formula, construct auxiliary blocks, and perform formal equivalent replacement on the loss function obtained by each block to make it meet the formal requirements of the Ising model. The loss function of the block is added and replaced by variables, and the Hamiltonian expression of the Ising model is obtained by simplification;

步骤S2:根据不同自旋状态下哈密顿量的取值及其范围的分布特征,采取由少到多地更新自旋状态的技术方案,并在特定情况下改变判别条件,使其能够跳出局部最优解,直至伊辛模型到达自旋基态;Step S2: According to the distribution characteristics of the value of the Hamiltonian in different spin states and its range, adopt a technical solution to update the spin state from less to more, and change the discriminant conditions under certain circumstances so that it can jump out of the local Optimal solution until the Ising model reaches the spin ground state;

步骤S3:获取两个素因子信息,实现大整数分解,进一步由欧拉公式和密码系统中开放的公钥得到RSA加密算法中的私钥,使用私钥将密文信息转换为原始明文信息,实现对RSA密码系统的破解。Step S3: Obtain two prime factor information, realize large integer decomposition, and further obtain the private key in the RSA encryption algorithm from the Euler formula and the open public key in the cryptographic system, and use the private key to convert the ciphertext information into the original plaintext information, Realize the cracking of the RSA cryptosystem.

优选地,在所述步骤S1中:Preferably, in the step S1:

针对每个辅助块产生特定形式的损失函数,代入边界条件,并对每个损失函数进行形式上的等价替换,使其不包含二次项以上的高次项,满足伊辛模型的形式要求,进而将全部的损失函数相加、变量代换、化简,得到伊辛模型的哈密顿量表达式,提取出相互作用矩阵J和外部磁场向量h,将大整数分解问题转化为寻找该伊辛模型自旋基态的求解问题;A loss function of a specific form is generated for each auxiliary block, substituted into the boundary conditions, and a formal equivalent replacement is performed for each loss function so that it does not contain high-order terms above the quadratic term, which meets the formal requirements of the Ising model , and then add all the loss functions, replace variables, and simplify to obtain the Hamiltonian expression of the Ising model, extract the interaction matrix J and the external magnetic field vector h, and transform the large integer decomposition problem into finding the Ising model The problem of solving the spin ground state of the symplectic model;

所述的转化过程是通过固定流程实现的,适用于任意大整数,在计算机内程序化完成,针对特定的大整数,不需要单独分析或推导中间过程,能够直接得到对应的伊辛模型;The conversion process is realized through a fixed process, applicable to any large integer, programmed in the computer, for a specific large integer, no separate analysis or derivation of the intermediate process is required, and the corresponding Ising model can be directly obtained;

所述的辅助变量是依据两个因数的二进制乘法竖式中的每个中间项aibj逐个引入的,即yi,j和zi,j,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位,aibj、yi,j、zi,j三项构成一个辅助块,产生损失函数;The auxiliary variables are introduced one by one according to each intermediate term a i b j in the vertical formula of binary multiplication of two factors, namely y i,j and z i,j , wherein y i,j is the The lowest bit result obtained by adding the binary variables of , z i,j is the carry obtained by adding the binary variables in the right auxiliary block, a i b j , y i,j , z i,j constitute an auxiliary block , generating a loss function;

所述的损失函数的形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,等价替换后的形式为

Figure BDA0003845467010000031
The form of the loss function is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , the equivalent replacement The latter form is
Figure BDA0003845467010000031

所述的等价替换后的损失函数不含有二次以上的项,无需降次操作,并且将其全部相加、化简、变量代换后所得哈密顿量表达式中,变量的系数大小被限制在预设范围,所得伊辛模型的相互作用矩阵J和外部磁场向量h的元素大小也是有限范围的。The loss function after the equivalent replacement described above does not contain more than two terms, and does not need to reduce the order, and in the Hamiltonian expression obtained after adding all of them, simplifying, and variable substitution, the coefficient of the variable is determined by Restricted within the preset range, the obtained Ising model interaction matrix J and the element size of the external magnetic field vector h are also within a limited range.

优选地,步骤S1.1:将所要分解的目标大整数表示为二进制形式,记录位数为w;Preferably, step S1.1: express the target large integer to be decomposed in binary form, and record the number of digits as w;

步骤S1.2:假设目标大整数的两个因数的二进制位数分别是k和h,二进制形式从高位到低位分别为a1,a2,…,ak和b1,b2,…,bhStep S1.2: Assume that the binary digits of the two factors of the target large integer are k and h respectively, and the binary forms from high to low are a 1 , a 2 ,..., a k and b 1 , b 2 ,..., b h ;

步骤S1.3:对于两个因数的二进制乘法竖式中的每个中间项aibj,逐个引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块;Step S1.3: For each intermediate term a i b j in the binary multiplication vertical formula of two factors, introduce auxiliary variables y i,j and z i,j one by one, and set a i b j , y i,j , z i, j three items as an auxiliary block;

步骤S1.4:每个辅助块产生一个损失函数,对于边界上的辅助块,根据损失函数的形式引入额外的辅助变量,并代入边界条件;Step S1.4: Generate a loss function for each auxiliary block. For the auxiliary block on the boundary, introduce additional auxiliary variables according to the form of the loss function and substitute them into the boundary conditions;

步骤S1.5:对每块得到的损失函数进行形式上的等价替换,使其只包含二次项;Step S1.5: Perform a formal equivalent replacement on the loss function obtained for each block, so that it only contains quadratic terms;

步骤S1.6:将各个替换后的损失函数相加并进行变量代换,然后化简得到伊辛模型的哈密顿量表达式;Step S1.6: Add the replaced loss functions and perform variable substitution, and then simplify to obtain the Hamiltonian expression of the Ising model;

步骤S1.7:表达式中的各个变量作为自旋节点,分别提取二元二次项系数和一次项系数组成伊辛模型的相互作用矩阵J和外部磁场向量h,并将其余的不变量部分的和记为C。Step S1.7: Each variable in the expression is used as a spin node, and the binary quadratic coefficient and the first-order coefficient are respectively extracted to form the interaction matrix J and the external magnetic field vector h of the Ising model, and the remaining invariant parts are The sum is denoted as C.

优选地,在所述步骤S2中:Preferably, in the step S2:

步骤S2.1:随机产生初始自旋状态,根据得到的伊辛模型计算出哈密顿量;Step S2.1: Randomly generate the initial spin state, and calculate the Hamiltonian according to the obtained Ising model;

步骤S2.2:每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;Step S2.2: change x spins each time, the initial value of x is 1, and gradually increase x as the number of changes of the same spin state increases;

步骤S2.3:若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;Step S2.3: If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change;

步骤S2.4:若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;Step S2.4: If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset;

步骤S2.5:重复流程步骤S2.2-步骤S2.4,直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。Step S2.5: Repeat step S2.2-step S2.4 of the process until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two primes of the target large integer If factor information is used, large integer decomposition is realized.

优选地,所述的降低接受自旋状态改变的判别标准,通过设置一个跳出局部最优解所需的判别能量E_jump,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后重复迭代过程,直至再次更新哈密顿量得以实现。Preferably, the lowering criterion for accepting the change of the spin state, by setting a discrimination energy E_jump required to jump out of the local optimal solution, the Hamiltonian corresponding to the current spin state is no longer calculated, and It is to directly set it as E_jump, and then repeat the iterative process until the Hamiltonian is updated again.

优选地,模块M1:对二进制乘法竖式中的每个中间项引入辅助变量,构建辅助块,对每块所得到的损失函数进行形式上的等价替换,使其满足伊辛模型的形式要求,将各块的损失函数相加得到伊辛模型的哈密顿量表达式;Preferably, module M1: introduce auxiliary variables for each intermediate term in the binary multiplication vertical formula, construct auxiliary blocks, and perform a formal equivalent replacement of the loss function obtained by each block, so that it meets the formal requirements of the Ising model , add the loss function of each block to get the Hamiltonian expression of the Ising model;

模块M2:根据不同自旋状态下哈密顿量的取值及其范围的分布特征,采取由少到多地更新自旋状态的技术方案,并改变判别条件,使其能够跳出局部最优解,直至伊辛模型到达自旋基态;Module M2: According to the distribution characteristics of the value of the Hamiltonian in different spin states and its range, adopt a technical solution to update the spin state from less to more, and change the judgment conditions so that it can jump out of the local optimal solution, Until the Ising model reaches the spin ground state;

模块M3:获取两个素因子信息,实现大整数分解,进一步由欧拉公式和密码系统中开放的公钥得到RSA加密算法中的私钥,使用私钥将密文信息转换为原始明文信息,实现对RSA密码系统的破解。Module M3: Obtain two prime factor information, realize large integer decomposition, and further obtain the private key in the RSA encryption algorithm from the Euler formula and the open public key in the cryptographic system, and use the private key to convert the ciphertext information into the original plaintext information, Realize the cracking of the RSA cryptosystem.

优选地,在所述模块M1中:Preferably, in said module M1:

针对每个辅助块产生特定形式的损失函数,代入边界条件,并对每个损失函数进行形式上的等价替换,使其不包含二次项以上的高次项,满足伊辛模型的形式要求,进而将全部的损失函数相加、变量代换、化简,得到伊辛模型的哈密顿量表达式,提取出相互作用矩阵J和外部磁场向量h,将大整数分解问题转化为寻找该伊辛模型自旋基态的求解问题;A loss function of a specific form is generated for each auxiliary block, substituted into the boundary conditions, and a formal equivalent replacement is performed for each loss function so that it does not contain high-order terms above the quadratic term, which meets the formal requirements of the Ising model , and then add all the loss functions, replace variables, and simplify to obtain the Hamiltonian expression of the Ising model, extract the interaction matrix J and the external magnetic field vector h, and transform the large integer decomposition problem into finding the Ising model The problem of solving the spin ground state of the symplectic model;

所述的转化过程是通过固定流程实现的,适用于任意大整数,在计算机内程序化完成,针对特定的大整数,不需要单独分析或推导中间过程,能够直接得到对应的伊辛模型;The conversion process is realized through a fixed process, applicable to any large integer, programmed in the computer, for a specific large integer, no separate analysis or derivation of the intermediate process is required, and the corresponding Ising model can be directly obtained;

所述的辅助变量是依据两个因数的二进制乘法竖式中的每个中间项aibj逐个引入的,即yi,j和zi,j,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位,aibj、yi,j、zi,j三项构成一个辅助块,产生损失函数;The auxiliary variables are introduced one by one according to each intermediate term a i b j in the vertical formula of binary multiplication of two factors, namely y i,j and z i,j , wherein y i,j is the The lowest bit result obtained by adding the binary variables of , z i,j is the carry obtained by adding the binary variables in the right auxiliary block, a i b j , y i,j , z i,j constitute an auxiliary block , generating a loss function;

所述的损失函数的形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,等价替换后的形式为

Figure BDA0003845467010000051
The form of the loss function is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , the equivalent replacement The latter form is
Figure BDA0003845467010000051

所述的等价替换后的损失函数不含有二次以上的项,无需降次操作,并且将其全部相加、化简、变量代换后所得哈密顿量表达式中,变量的系数大小被限制在预设范围,所得伊辛模型的相互作用矩阵J和外部磁场向量h的元素大小也是有限范围的。The loss function after the equivalent replacement described above does not contain more than two terms, and does not need to reduce the order, and in the Hamiltonian expression obtained after adding all of them, simplifying, and variable substitution, the coefficient of the variable is determined by Restricted within the preset range, the obtained Ising model interaction matrix J and the element size of the external magnetic field vector h are also within a limited range.

优选地,模块M1.1:将所要分解的目标大整数表示为二进制形式,记录位数为w;Preferably, module M1.1: express the target large integer to be decomposed in binary form, and record the number of digits as w;

模块M1.2:假设目标大整数的两个因数的二进制位数分别是k和h,二进制形式从高位到低位分别为a1,a2,…,ak和b1,b2,…,bhModule M1.2: Assume that the binary digits of the two factors of the target large integer are k and h respectively, and the binary forms from high to low are a 1 , a 2 ,…,a k and b 1 ,b 2 ,…, b h ;

模块M1.3:对于两个因数的二进制乘法竖式中的每个中间项aibj,逐个引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块;Module M1.3: For each intermediate term a i b j in the vertical form of binary multiplication of two factors, introduce auxiliary variables y i,j and z i,j one by one, and set a i b j , y i,j , z i, j three items as an auxiliary block;

模块M1.4:每个辅助块产生一个损失函数,对于边界上的辅助块,根据损失函数的形式引入额外的辅助变量,并代入边界条件;Module M1.4: Each auxiliary block generates a loss function. For auxiliary blocks on the boundary, additional auxiliary variables are introduced according to the form of the loss function and substituted into the boundary conditions;

模块M1.5:对每块得到的损失函数进行形式上的等价替换,使其只包含二次项;Module M1.5: Perform a formal equivalent replacement of the loss function obtained by each block so that it only contains quadratic terms;

模块M1.6:将各个替换后的损失函数相加并进行变量代换,然后化简得到伊辛模型的哈密顿量表达式;Module M1.6: Add the replaced loss functions and perform variable substitution, and then simplify to obtain the Hamiltonian expression of the Ising model;

模块M1.7:表达式中的各个变量作为自旋节点,分别提取二元二次项系数和一次项系数组成伊辛模型的相互作用矩阵J和外部磁场向量h,并将其余的不变量部分的和记为C。Module M1.7: Each variable in the expression is used as a spin node, and the binary quadratic coefficient and the first-order coefficient are respectively extracted to form the interaction matrix J and the external magnetic field vector h of the Ising model, and the remaining invariant parts are The sum is denoted as C.

优选地,在所述模块M2中:Preferably, in said module M2:

模块M2.1:随机产生初始自旋状态,根据得到的伊辛模型计算出哈密顿量;Module M2.1: Randomly generate the initial spin state, and calculate the Hamiltonian according to the obtained Ising model;

模块M2.2:每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;Module M2.2: Each time x spins are changed, the initial value of x is 1, and as the number of changes of the same spin state increases, x gradually increases;

模块M2.3:若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;Module M2.3: If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change;

模块M2.4:若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;Module M2.4: If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset;

模块M2.5:重复流程模块M2.2-模块M2.4,直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。Module M2.5: Repeat the process module M2.2-module M2.4 until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two primes of the target large integer If factor information is used, large integer decomposition is realized.

优选地,所述的降低接受自旋状态改变的判别标准,通过设置一个跳出局部最优解所需的判别能量E_jump,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后重复迭代过程,直至再次更新哈密顿量得以实现。Preferably, the lowering criterion for accepting the change of the spin state, by setting a discrimination energy E_jump required to jump out of the local optimal solution, the Hamiltonian corresponding to the current spin state is no longer calculated, and It is to directly set it as E_jump, and then repeat the iterative process until the Hamiltonian is updated again.

与现有技术相比,本发明具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:

1、本发明完整地表现了一种将大整数分解问题映射为伊辛模型求解问题的一般流程;1. The present invention completely represents a general process for mapping the large integer decomposition problem to the Ising model solution problem;

2、与其他大整数分解方法相比,本发明引入特定的计算模型,分解流程只包括上述两个主要部分,总体上更加简单、直观,第一部分的转换过程直接适用于任何目标大整数,具有通用性,可以直接在计算机中程序化完成,第二部分的计算和迭代过程既可以在通用计算设备上完成,也可以在专用计算平台上实现,具有更加宽泛的硬件实施场景;2. Compared with other large integer decomposition methods, the present invention introduces a specific calculation model. The decomposition process only includes the above two main parts, which is generally simpler and more intuitive. The conversion process of the first part is directly applicable to any target large integer. Versatility, can be directly programmed in the computer, the calculation and iteration process of the second part can be completed on the general computing equipment, and can also be realized on the special computing platform, with a wider hardware implementation scenario;

3、与其他利用伊辛模型解决大整数分解问题的例子相比,本发明直接构建了只含有二次项、一次项和常数项的损失函数,避免了降次操作,同时对于任意大整数,转换得到的伊辛模型的相互作用与外部磁场的取值被限定在有限的范围之内,使它的物理实现和运算更加容易;3. Compared with other examples of using the Ising model to solve the decomposition problem of large integers, the present invention directly constructs a loss function containing only quadratic terms, primary terms and constant terms, avoiding the order reduction operation, and for any large integer, The value of the interaction between the converted Ising model and the external magnetic field is limited within a limited range, making its physical realization and operation easier;

3、本发明更进一步地针对所得伊辛模型改进了一般的迭代过程,能够更快地找到或接近最优解,并避免陷入局部最优解,提高大整数分解的效率;3. The present invention further improves the general iterative process for the obtained Ising model, can find or approach the optimal solution faster, avoid falling into the local optimal solution, and improve the efficiency of large integer decomposition;

4、目前,随着伊辛模型相关专用计算设备的发展,有望利用本发明中的方法实现大整数分解记录的突破,从而促进密码学、信息安全等领域的发展。4. At present, with the development of special computing equipment related to the Ising model, it is expected to use the method of the present invention to achieve a breakthrough in the decomposition and recording of large integers, thereby promoting the development of cryptography, information security and other fields.

附图说明Description of drawings

通过阅读参照以下附图对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

图1为本发明提供的大整数分解问题映射方法的整体流程图;Fig. 1 is the overall flowchart of the large integer decomposition problem mapping method provided by the present invention;

图2为本发明中将大整数分解问题转化为伊辛模型求解问题的方法流程图;Fig. 2 is the method flowchart that large integer decomposition problem is converted into Ising model solving problem among the present invention;

图3为本发明实施例的二进制乘法竖式中构造辅助块的原理示意图;Fig. 3 is the schematic diagram of the principle of constructing auxiliary blocks in the binary multiplication vertical formula of the embodiment of the present invention;

图4为本发明中对伊辛模型进行迭代寻找自旋基态的方法流程图;Fig. 4 is the flow chart of the method for iteratively finding the spin ground state to the Ising model in the present invention;

图5为本发明实施例的迭代结果示例图。FIG. 5 is an example diagram of an iteration result of an embodiment of the present invention.

具体实施方式detailed description

下面结合具体实施例对本发明进行详细说明。以下实施例将有助于本领域的技术人员进一步理解本发明,但不以任何形式限制本发明。应当指出的是,对本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变化和改进。这些都属于本发明的保护范围。The present invention will be described in detail below in conjunction with specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

实施例1:Example 1:

本发明引入新的计算模型实现大整数分解问题的映射,整体流程简单直观,迭代过程既可以在通用计算设备上实现,也可以在针对伊辛模型的专用计算平台上完成,丰富了解决大整数分解问题的方法思路和实施场景。The present invention introduces a new calculation model to realize the mapping of large integer decomposition problems. The overall process is simple and intuitive, and the iterative process can be realized on general-purpose computing equipment or on a dedicated computing platform for the Ising model, which enriches the problem of solving large integers. Method ideas and implementation scenarios for decomposing problems.

一种基于伊辛模型的大整数分解问题映射方法,如图1-图5所示,通过在素因子的二进制乘法竖式中引入辅助变量,将其与中间项逐个构建辅助块,针对每个辅助块产生特定形式的损失函数,代入边界条件,并对每个损失函数进行形式上的等价替换,使其不包含二次项以上的高次项,满足伊辛模型的形式要求,进而将全部的损失函数相加、变量代换、化简,得到伊辛模型的哈密顿量表达式,提取出相互作用矩阵J和外部磁场向量h,大整数分解问题转化为寻找该伊辛模型自旋基态的求解问题;随后针对该伊辛模型进行迭代寻找其自旋基态,采取由少到多地改变当前自旋状态的迭代策略,若改变后的哈密顿量减小则更新自旋状态,同时在一定条件下改变判别条件,使其能够跳出局部最优解,直至伊辛模型到达自旋基态。A large integer decomposition problem mapping method based on the Ising model, as shown in Figure 1-Figure 5, introduces auxiliary variables into the vertical formula of binary multiplication of prime factors, and constructs auxiliary blocks one by one with intermediate terms, for each The auxiliary block generates a loss function of a specific form, substitutes it into the boundary conditions, and performs a formal equivalent replacement for each loss function, so that it does not contain high-order terms above the quadratic term and meets the formal requirements of the Ising model. Adding all loss functions, variable substitution, and simplification, the Hamiltonian expression of the Ising model is obtained, and the interaction matrix J and the external magnetic field vector h are extracted. The problem of large integer decomposition is transformed into finding the spin of the Ising model The problem of solving the ground state; then iteratively finds the spin ground state of the Ising model, adopts an iterative strategy of changing the current spin state from less to more, and updates the spin state if the changed Hamiltonian decreases, and at the same time Under certain conditions, the discriminant conditions are changed so that it can jump out of the local optimal solution until the Ising model reaches the spin ground state.

所述的转化过程是通过固定流程实现的,适用于任意大整数,可以在计算机内程序化完成,针对特定的大整数,不需要单独分析或推导中间过程,便可直接得到对应的伊辛模型。The conversion process described above is realized through a fixed process, which is applicable to any large integer and can be programmed in the computer. For a specific large integer, the corresponding Ising model can be directly obtained without separate analysis or derivation of the intermediate process .

所述的辅助变量是依据两个因数的二进制乘法竖式中的每个中间项aibj逐个引入的,即yi,j和zi,j,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位,aibj、yi,j、zi,j三项构成一个辅助块,产生损失函数。The auxiliary variables are introduced one by one according to each intermediate term a i b j in the vertical formula of binary multiplication of two factors, namely y i,j and z i,j , wherein y i,j is the The lowest bit result obtained by adding the binary variables of , z i,j is the carry obtained by adding the binary variables in the right auxiliary block, a i b j , y i,j , z i,j constitute an auxiliary block , resulting in a loss function.

所述的损失函数的形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,等价替换后的形式为

Figure BDA0003845467010000081
The form of the loss function is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , the equivalent replacement The latter form is
Figure BDA0003845467010000081

所述的等价替换后的损失函数不含有二次以上的项,无需降次操作,并且将其全部相加、化简、变量代换后所得哈密顿量表达式中,变量的系数大小被限制在一定范围,从而所得伊辛模型的相互作用矩阵J和外部磁场向量h的元素大小也是有限范围的。The loss function after the equivalent replacement described above does not contain more than two terms, and does not need to reduce the order, and in the Hamiltonian expression obtained after adding all of them, simplifying, and variable substitution, the coefficient of the variable is determined by It is limited in a certain range, so the element sizes of the interaction matrix J and the external magnetic field vector h of the obtained Ising model are also limited in range.

所述的伊辛模型适用于特定的迭代策略,相较于完全随机迭代能够更快地到达基态,并且能够避免陷入局部最优解。The Ising model described above is suitable for a specific iteration strategy, which can reach the ground state faster and avoid falling into a local optimal solution than a completely random iteration.

所述的迭代策略,具体过程为:The specific process of the iterative strategy is:

1)随机产生初始自旋状态,根据第一部分得到的伊辛模型计算出哈密顿量;1) The initial spin state is randomly generated, and the Hamiltonian is calculated according to the Ising model obtained in the first part;

2)每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;2) Each time x spins are changed, the initial value of x is 1, and as the number of changes of the same spin state increases, x gradually increases;

3)若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;3) If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change;

4)若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;4) If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset;

5)重复流程2)~4),直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。5) Repeat process 2) to 4) until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two prime factor information of the target large integer, and the large integer break down.

所述的降低接受自旋状态改变的判别标准,通过设置一个跳出局部最优解所需的判别能量E_jump,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后重复迭代过程,直至再次更新哈密顿量得以实现。The described criteria for reducing the acceptance of spin state changes, by setting a discriminant energy E_jump required to jump out of the local optimal solution, the Hamiltonian corresponding to the current spin state is no longer calculated, but its Set directly to E_jump, and then repeat the iterative process until the Hamiltonian is updated again.

进一步由欧拉公式和密码系统中开放的公钥得到RSA加密算法中的私钥,使用私钥将密文信息转换为原始明文信息,实现对RSA密码系统的破解。Further, the private key in the RSA encryption algorithm is obtained from the Euler formula and the open public key in the cryptographic system, and the private key is used to convert the ciphertext information into the original plaintext information to realize the cracking of the RSA cryptographic system.

实施例2:Example 2:

实施例2为实施例1的优选例,以更为具体地对本发明进行说明。Embodiment 2 is a preferred example of Embodiment 1 to describe the present invention more specifically.

本发明的目的是提出新的将大整数分解为两个素因数的技术方案,实现大整数分解问题到伊辛模型求解问题的映射,形成相对简单但完备的解决流程,从而使通用计算设备(如电子计算机等)以及各种针对伊辛模型的专用计算设备(如光学伊辛机等)可以直接适用于解决大整数分解问题,进而实现对RSA加密算法的破解。The purpose of the present invention is to propose a new technical scheme that decomposes a large integer into two prime factors, realizes the mapping of the large integer decomposition problem to the Ising model solving problem, and forms a relatively simple but complete solution process, thereby enabling general-purpose computing equipment (such as Electronic computer, etc.) and various special computing devices for the Ising model (such as optical Ising machines, etc.) can be directly applied to solve the problem of large integer decomposition, and then realize the cracking of the RSA encryption algorithm.

本发明可以根据前后顺序分为两个部分,其中第一部分为大整数分解问题到目标伊辛模型的转换过程,其技术方案是对二进制乘法竖式中的每个中间项引入辅助变量,构建辅助块,并对每块所得到的损失函数进行形式上的等价替换,使其满足伊辛模型的形式要求,最后将各块的损失函数相加并作变量代换,化简得到哈密顿量表达式。第二部分是针对已得到的伊辛模型设计出的合适的迭代过程,根据不同自旋状态下哈密顿量的取值及其范围的分布特征,采取由少到多地更新自旋状态的技术方案,并在一定条件下改变判别条件,使其能够跳出局部最优解,上述迭代过程能够使伊辛模型更快地找到或接近自旋基态。The present invention can be divided into two parts according to the sequence, wherein the first part is the conversion process from the large integer decomposition problem to the target Ising model. block, and replace the loss function obtained by each block with a formal equivalent to make it meet the formal requirements of the Ising model, and finally add the loss functions of each block and make a variable substitution, and simplify to obtain the Hamiltonian expression. The second part is to design a suitable iterative process for the obtained Ising model, according to the distribution characteristics of the value and range of the Hamiltonian in different spin states, adopt the technique of updating the spin state from less to more The above iterative process can make the Ising model find or approach the spin ground state faster.

所述的大整数分解问题到目标伊辛模型的转换,实施流程为:The conversion of the large integer decomposition problem to the target Ising model, the implementation process is as follows:

1)将所要分解的目标大整数表示为二进制形式,记录位数为w;1) Express the target large integer to be decomposed in binary form, and record the number of digits as w;

2)假设目标大整数的两个因数的二进制位数分别是k和h,二进制形式从高位到低位分别为a1,a2,…,ak和b1,b2,…,bh2) Assume that the binary digits of the two factors of the target large integer are k and h respectively, and the binary forms from high to low are a 1 , a 2 ,..., a k and b 1 , b 2 ,..., b h ;

3)对于两个因数的二进制乘法竖式中的每个中间项aibj,逐个引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块;3) For each intermediate term a i b j in the binary multiplication vertical formula of two factors, introduce auxiliary variables y i,j and z i,j one by one, and a i b j , y i,j , z i , three items of j are used as an auxiliary block;

4)每个辅助块产生一个损失函数,对于边界上的辅助块,根据损失函数的形式引入额外的辅助变量,并代入边界条件;4) Each auxiliary block generates a loss function. For auxiliary blocks on the boundary, additional auxiliary variables are introduced according to the form of the loss function and substituted into the boundary conditions;

5)对每块得到的损失函数进行形式上的等价替换,使其只包含二次项;5) Perform a formal equivalent replacement of the loss function obtained for each block so that it only contains quadratic terms;

6)将各个替换后的损失函数相加并进行变量代换,然后化简得到伊辛模型的哈密顿量表达式;6) Add the loss functions after each replacement and perform variable substitution, and then simplify to obtain the Hamiltonian expression of the Ising model;

7)表达式中的各个变量作为自旋节点,分别提取二元二次项系数和一次项系数组成伊辛模型的相互作用矩阵J和外部磁场向量h,并将其余的不变量部分的和记为C。7) Each variable in the expression is used as a spin node, and the binary quadratic coefficient and the first-order coefficient are respectively extracted to form the interaction matrix J and the external magnetic field vector h of the Ising model, and the sum of the remaining invariant parts is recorded as for C.

所述的针对已得到伊辛模型设计出的迭代过程,实施流程为:The implementation process of the iterative process designed for the obtained Ising model is:

1)随机产生初始自旋状态,根据第一部分得到的伊辛模型计算出哈密顿量;1) The initial spin state is randomly generated, and the Hamiltonian is calculated according to the Ising model obtained in the first part;

2)每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;2) Each time x spins are changed, the initial value of x is 1, and as the number of changes of the same spin state increases, x gradually increases;

3)若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;3) If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change;

4)若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;4) If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset;

5)重复流程2)~4),直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。5) Repeat process 2) to 4) until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two prime factor information of the target large integer, and the large integer break down.

本发明提出了新的将大整数分解为两个素因数的技术方案,得到两个素因子后,可进一步将两个素因子代入欧拉公式,并结合开放的公钥得到RSA加密算法中的私钥信息,再使用私钥将传输的密文信息转换为明文信息,即为被加密的原始数据,至此实现对RSA密码系统的破解。The present invention proposes a new technical solution for decomposing a large integer into two prime factors. After obtaining the two prime factors, the two prime factors can be further substituted into Euler's formula, and combined with the open public key to obtain the private key in the RSA encryption algorithm. Key information, and then use the private key to convert the transmitted ciphertext information into plaintext information, which is the encrypted original data, so far to realize the cracking of the RSA cryptosystem.

实施例3:Example 3:

实施例3为实施例1的优选例,以更为具体地对本发明进行说明。Embodiment 3 is a preferred example of Embodiment 1 to describe the present invention more specifically.

如图1所示,本发明实现了大整数分解问题到伊辛模型求解问题的映射,并提供了一套完整的解决流程,主要思路是将目标大整数通过确定的程序步骤得到对应的伊辛模型,然后通过计算平台进行迭代获得模型的自旋基态,得到目标大整数的两个素因子。在第一部分中,由目标大整数得到相互作用矩阵J和外部磁场向量h,其主要依据是由乘法竖式确定的损失函数,若损失函数达到0,则说明此时变量的取值正是两个待求的素因子,转换成伊辛模型后,这种状态也正是该模型的基态。第二部分是本发明在第一部分得到伊辛模型后更进一步的优化,设计出寻找伊辛模型自旋基态的迭代策略,伊辛模型能够较快地接近或找到自旋基态,并避免陷入局部最优解。需要说明的是,上述第一部分是确定性的程序流程,可在计算机中程序化实现,对于同一大整数转化得到伊辛模型是固定的;而第二部分的过程具有一定的随机性,但模型的最优解是确定的。下面具体说明每一部分的实施方式,假设RSA加密算法中的公共模数N为143,因此将对143的分解作为具体实施例辅以解释,应当理解,实际应用的RSA算法中的公共模数量级较大,这里将143作为公共模数是为了便于解释本发明的方法原理,对于更大量级的整数,原理和实施步骤是一样的。As shown in Figure 1, the present invention realizes the mapping from the large integer decomposition problem to the Ising model solution problem, and provides a complete set of solution process, the main idea is to obtain the corresponding Ising model through the determined program steps The model, and then iteratively obtain the spin ground state of the model through the computing platform, and obtain the two prime factors of the target large integer. In the first part, the interaction matrix J and the external magnetic field vector h are obtained from the target large integer, which is mainly based on the loss function determined by the multiplication vertical formula. If the loss function reaches 0, it means that the value of the variable at this time is exactly two After the prime factors to be sought are transformed into the Ising model, this state is also the ground state of the model. The second part is the further optimization of the present invention after the Ising model is obtained in the first part, and an iterative strategy for finding the spin ground state of the Ising model is designed. The Ising model can approach or find the spin ground state faster and avoid falling into the local Optimal solution. It should be noted that the above-mentioned first part is a deterministic program flow, which can be programmed in the computer, and the Ising model obtained by converting the same large integer is fixed; while the process of the second part has certain randomness, but the model The optimal solution of is determined. The implementation of each part is described in detail below, assuming that the public modulus N in the RSA encryption algorithm is 143, so the decomposition of 143 is used as a specific example to supplement the explanation. It should be understood that the public modulus in the RSA algorithm of actual application is relatively large Larger, 143 is used as the public modulus here to facilitate the explanation of the method principle of the present invention. For integers with larger magnitudes, the principle and implementation steps are the same.

如图2所示,第一部分中,首先将待分解大整数用二进制形式表示,记录其二进制位数为w,确定两个素因子的二进制位数分别为k和h,从高位到低位设为a1,a2,…,ak和b1,b2,…,bh,其中a1,ak,b1,bh可确定为常量1;在两个素因子的二进制乘法竖式中引入辅助变量yi,j和zi,j,将其和乘法竖式中对应的aibj共同作为一个辅助块;对于每个辅助块,可以确定一个损失函数Fi,j,其形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,对于在乘法竖式边界的辅助块,需额外生成损失函数中所需的但未被引入的辅助变量,并将其损失函数中的辅助变量用非辅助变量或者已知常量代入,即代入边界条件;对各个损失函数进行形式上的等价替换,不改变函数变量,得到新的Fi,j形式,其中不包括高于二次的项;将替换后的各个损失函数相加并进行变量代换,使变量的取值由二进制的“1”和“0”变为表征自旋状态的“+1”和“-1”,然后化简得到满足伊辛模型条件的哈密顿量表达式;最后将表达式中的变量表征为伊辛模型的自旋状态,对系数进行提取,其中不同自旋间的二次项系数组成相互作用矩阵J,各个一次项系数组成外部磁场向量h,表达式中构成J和h以外的部分是不变量部分,取值和自旋状态无关,将其取值记为C,用于在第二部分中判断伊辛模型是否到达自旋基态。As shown in Figure 2, in the first part, first, the large integer to be decomposed is expressed in binary form, and its binary digit is recorded as w, and the binary digits of the two prime factors are determined to be k and h respectively, and the high digit to the low digit is set to a 1 ,a 2 ,…,a k and b 1 ,b 2 ,…,b h , where a 1 ,a k ,b 1 ,b h can be determined as a constant 1; in the binary multiplication vertical form of two prime factors Introduce auxiliary variables y i,j and z i,j , and use them together with the corresponding a i b j in the multiplication vertical formula as an auxiliary block; for each auxiliary block, a loss function F i,j can be determined, whose The form is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , for the auxiliary block on the multiplicative vertical boundary , it is necessary to additionally generate the auxiliary variables required in the loss function but not introduced, and substitute the auxiliary variables in the loss function with non-auxiliary variables or known constants, that is, into the boundary conditions; for each loss function, formally Equivalent replacement, without changing the function variables, to get a new form of F i,j , which does not include items higher than the second; add the various loss functions after replacement and perform variable substitution, so that the value of the variable is changed from binary The "1" and "0" of the spin state are changed to "+1" and "-1" representing the spin state, and then simplified to obtain the Hamiltonian expression that satisfies the conditions of the Ising model; finally, the variables in the expression are expressed as The spin state of the Ising model extracts the coefficients, in which the quadratic coefficients between different spins form the interaction matrix J, and each first-order coefficient forms the external magnetic field vector h, and the parts other than J and h in the expression are In the invariant part, the value has nothing to do with the spin state, and its value is recorded as C, which is used to judge whether the Ising model has reached the spin ground state in the second part.

所述的确定两个素因子的二进制位数,k和h满足k+h=w或k+h=w+1,并且在一般情况下,实际应用的大整数的两个素因子差值较小,二进制位数相同的可能性很高,因此初始可以将位数设置为k=h=w/2或k=h=(w+1)/2,若无法得到正确结果再对两个素因子的位数进行调整;如果大整数分解问题中有额外的位数信息,可以根据额外信息确定两个素因子的二进制位数。Said determination of the binary digits of two prime factors, k and h satisfy k+h=w or k+h=w+1, and in general, the difference between the two prime factors of large integers that are actually applied is relatively small Small, the possibility of the same binary number is high, so the initial number of bits can be set as k=h=w/2 or k=h=(w+1)/2, if the correct result cannot be obtained, then the two prime The digits of the factors are adjusted; if there is additional digit information in the large integer decomposition problem, the binary digits of the two prime factors can be determined according to the additional information.

如图3所示,在所述的实施例的乘法竖式中构造辅助块,对于每个中间项aibj,引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位。需要说明的是,在此处列出乘法竖式仅为了更清楚地说明本发明的原理,在实际解决大整数分解问题时,直接将要分解的大整数代入如图2所示的程序流程中,即可得到转化后的伊辛模型,无需列出乘法竖式。As shown in Figure 3, in the multiplication vertical formula of the described embodiment, an auxiliary block is constructed, for each intermediate term a i b j , auxiliary variables y i,j and z i,j are introduced, and a i b j , y i,j , z i,j are used as an auxiliary block, where y i,j is the lowest bit result obtained by adding the binary variables in the upper auxiliary block, z i,j is the binary variable in the right auxiliary block Carry from addition of variables. It should be noted that the multiplication vertical formula is listed here only to illustrate the principle of the present invention more clearly. When actually solving the problem of large integer decomposition, the large integer to be decomposed is directly substituted into the program flow shown in Figure 2. The converted Ising model can be obtained without listing the multiplicative vertical formula.

所述的边界条件,若满足k+h=w,假设目标大整数的二进制形式从高位到低位分别为t1,t2,…,tw;若满足k+h=w+1,假设目标大整数的最高位t1为0,其实际二进制形式从高位到低位分别为t2,…,tw+1,则有以下几个边界条件:yi,0=ti;yk+1,j-1=tk+j;yi,h=0;zi,h=0;zk,j=0;y1,h-1=0;z0,j=y1,j-1;yk+1,h=0。For the boundary conditions described above, if k+h=w is satisfied, it is assumed that the binary form of the target large integer is t 1 , t 2 ,...,t w from the high bit to the low bit; if k+h=w+1 is satisfied, the target The highest bit t 1 of a large integer is 0, and its actual binary form is respectively t 2 ,…,t w+1 from high bit to low bit, then there are the following boundary conditions: y i,0 =t i ; y k+1 ,j-1 =t k+j ; y i,h =0; z i,h =0; z k,j =0; y 1,h-1 =0; z 0,j =y 1,j- 1 ; y k+1,h =0.

所述的对损失函数进行形式上的等价替换,等价替换后的形式为

Figure BDA0003845467010000111
Figure BDA0003845467010000112
The formal equivalent replacement of the loss function is carried out, and the form after the equivalent replacement is
Figure BDA0003845467010000111
Figure BDA0003845467010000112

如图4所示,第二部分中,首先设置一个跳出局部最优解所需的判别能量E_jump,E_jump的范围由C决定,大于-C但接近-C;随机生成初始的自旋状态,根据第一部分得到的伊辛模型计算出初始自旋状态下的哈密顿量;将每次迭代自旋状态改变的个数设为x,初始值设为1,然后开始迭代;每次迭代随机改变x个自旋状态,判断改变后模型的哈密顿量是否减小,若减小则接受本次改变,更新自旋状态和对应的哈密顿量,并将x重置为1,若没有减小则进入下面的判断过程:As shown in Figure 4, in the second part, first set a discriminant energy E_jump required to jump out of the local optimal solution. The range of E_jump is determined by C, which is greater than -C but close to -C; the initial spin state is randomly generated, according to The Ising model obtained in the first part calculates the Hamiltonian in the initial spin state; set the number of spin state changes in each iteration as x, and the initial value as 1, and then start iteration; change x randomly in each iteration spin state, judge whether the Hamiltonian of the model is reduced after the change, if it is reduced, accept this change, update the spin state and the corresponding Hamiltonian, and reset x to 1, if not, then Enter the following judgment process:

判断x的值是否在一定的迭代次数K(x)后仍未被重置,若否则进行下一次迭代,若是则将x的值增加1,然后根据x的值判断当前是否处于局部最优解,将局部最优解的判断标准设为正整数P,若x<P则说明未处于局部最优解,进行下一次迭代,若x≥P则说明当前状态已处于局部最优解,将x减小1,并降低对当前自旋状态进行更新的判别标准,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后进行下一次迭代。Determine whether the value of x has not been reset after a certain number of iterations K(x), if not, proceed to the next iteration, if so, increase the value of x by 1, and then judge whether it is currently in a local optimal solution according to the value of x , set the judgment standard of the local optimal solution as a positive integer P, if x<P, it means that it is not in the local optimal solution, and proceed to the next iteration, if x≥P, it means that the current state is already in the local optimal solution, set x Decrease 1, and lower the criterion for updating the current spin state, so that the Hamiltonian corresponding to the current spin state is no longer calculated, but directly set it as E_jump, and then proceed to the next iteration.

重复上述迭代过程,直到当前自旋状态的哈密顿量值为-C,说明此时伊辛模型已到达自旋基态,可以获取两个素因子信息,完成大整数分解。Repeat the above iterative process until the Hamiltonian value of the current spin state is -C, indicating that the Ising model has reached the spin ground state at this time, and two prime factor information can be obtained to complete the large integer decomposition.

所述的判断是否增加x的迭代次数K(x),K(x)是以x为变量的指数函数,其系数应当与伊辛模型的自旋个数呈正相关。Said judgment whether to increase the number of iterations K(x) of x, K(x) is an exponential function with x as a variable, and its coefficient should be positively correlated with the number of spins of the Ising model.

所述的局部最优解的判断标准P,其应当保持较小的数值,具体是对所分解大整数的二进制位数取底数为2的对数,所得数值即为P的大致取值。The judgment standard P of the local optimal solution should keep a small value, specifically, take the logarithm with base 2 of the binary digits of the decomposed large integer, and the obtained value is the approximate value of P.

所述的第二部分中的E_jump、K(x)、P等函数或参数,本发明只给出其定义或取值的标准和参照,其具体式子或取值随着目标大整数的改变而有所不同,并且需要根据迭代结果进行微调,但不应偏离本发明给出的定义或取值范围。For functions or parameters such as E_jump, K(x), and P in the second part, the present invention only provides the standards and references for its definition or value, and its specific formula or value changes with the target large integer are different, and need to be fine-tuned according to the iteration results, but should not deviate from the definition or value range given by the present invention.

如图5所示,本发明的实施例所得伊辛模型的自旋个数为24,C值为44,由图中可见,在经过约47893次迭代后,哈密顿量为-44,伊辛模型到达自旋基态,由此可以得到两个素因子信息,迭代次数47893远小于总共的自旋状态个数224,可知该迭代策略是有效的。As shown in Figure 5, the number of spins of the Ising model obtained in the embodiment of the present invention is 24, and the C value is 44. It can be seen from the figure that after about 47893 iterations, the Hamiltonian is -44, and the Ising The model reaches the spin ground state, from which two prime factor information can be obtained, and the number of iterations 47893 is much smaller than the total number of spin states 2 24 , which shows that the iteration strategy is effective.

所述的两个素因子信息,通过查看伊辛模型到达基态后的自旋状态得出,本实施例的前四位基态自旋状态为“+1,-1,-1,+1”或“-1,+1,+1,-1”,由此可确定两个素因子分别是11和13,第四位后的自旋表示的是辅助变量,与素因子的取值无直接关系,得到两个素因子后,将其代入欧拉公式得

Figure BDA0003845467010000121
RSA加密算法中的私钥指数d与开放的公钥指数e满足
Figure BDA0003845467010000122
代入求出私钥指数d,再使用私钥将传输的密文信息S转换为明文信息M,转换公式为M≡Sdmod N,M即为被加密的原始数据,至此已完成对RSA密码系统的破解。The two prime factor information mentioned above can be obtained by looking at the spin state after the Ising model reaches the ground state. The first four ground state spin states in this embodiment are "+1, -1, -1, +1" or "-1, +1, +1, -1", from which it can be determined that the two prime factors are 11 and 13 respectively, and the spin after the fourth digit represents an auxiliary variable, which has no direct relationship with the value of the prime factor , after getting two prime factors, substitute them into Euler's formula to get
Figure BDA0003845467010000121
The private key exponent d in the RSA encryption algorithm and the open public key exponent e satisfy
Figure BDA0003845467010000122
Substitute into the private key index d, and then use the private key to convert the transmitted ciphertext information S into plaintext information M. The conversion formula is M≡S d mod N, and M is the encrypted original data. So far, the RSA encryption has been completed. System cracking.

本领域技术人员知道,除了以纯计算机可读程序代码方式实现本发明提供的系统、装置及其各个模块以外,完全可以通过将方法步骤进行逻辑编程来使得本发明提供的系统、装置及其各个模块以逻辑门、开关、专用集成电路、可编程逻辑控制器以及嵌入式微控制器等的形式来实现相同程序。所以,本发明提供的系统、装置及其各个模块可以被认为是一种硬件部件,而对其内包括的用于实现各种程序的模块也可以视为硬件部件内的结构;也可以将用于实现各种功能的模块视为既可以是实现方法的软件程序又可以是硬件部件内的结构。Those skilled in the art know that, in addition to realizing the system, device and each module thereof provided by the present invention in a purely computer-readable program code mode, the system, device and each module thereof provided by the present invention can be completely programmed by logically programming the method steps. The same program is implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers, among others. Therefore, the system, device and each module provided by the present invention can be regarded as a hardware component, and the modules included in it for realizing various programs can also be regarded as the structure in the hardware component; A module for realizing various functions can be regarded as either a software program realizing a method or a structure within a hardware component.

以上对本发明的具体实施例进行了描述。需要理解的是,本发明并不局限于上述特定实施方式,本领域技术人员可以在权利要求的范围内做出各种变化或修改,这并不影响本发明的实质内容。在不冲突的情况下,本申请的实施例和实施例中的特征可以任意相互组合。Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims (10)

1.一种基于伊辛模型的大整数分解问题映射方法,其特征在于,包括:1. A large integer decomposition problem mapping method based on the Ising model, characterized in that, comprising: 步骤S1:对二进制乘法竖式中的每个中间项引入辅助变量,构建辅助块,对每块所得到的损失函数进行形式上的等价替换,使其满足伊辛模型的形式要求,将各块的损失函数相加并作变量代换,化简得到伊辛模型的哈密顿量表达式;Step S1: Introduce auxiliary variables to each intermediate term in the binary multiplication vertical formula, construct auxiliary blocks, and perform formal equivalent replacement on the loss function obtained by each block to make it meet the formal requirements of the Ising model. The loss function of the block is added and replaced by variables, and the Hamiltonian expression of the Ising model is obtained by simplification; 步骤S2:根据不同自旋状态下哈密顿量的取值及其范围的分布特征,采取由少到多地更新自旋状态的技术方案,并在特定情况下改变判别条件,使其能够跳出局部最优解,直至伊辛模型到达自旋基态;Step S2: According to the distribution characteristics of the value of the Hamiltonian in different spin states and its range, adopt a technical solution to update the spin state from less to more, and change the discriminant conditions under certain circumstances so that it can jump out of the local Optimal solution until the Ising model reaches the spin ground state; 步骤S3:获取两个素因子信息,实现大整数分解,进一步由欧拉公式和密码系统中开放的公钥得到RSA加密算法中的私钥,使用私钥将密文信息转换为原始明文信息,实现对RSA密码系统的破解。Step S3: Obtain two prime factor information, realize large integer decomposition, and further obtain the private key in the RSA encryption algorithm from the Euler formula and the open public key in the cryptographic system, and use the private key to convert the ciphertext information into the original plaintext information, Realize the cracking of the RSA cryptosystem. 2.根据权利要求1所述的基于伊辛模型的大整数分解问题映射方法,其特征在于,在所述步骤S1中:2. the large integer decomposition problem mapping method based on Ising model according to claim 1, is characterized in that, in described step S1: 针对每个辅助块产生特定形式的损失函数,代入边界条件,并对每个损失函数进行形式上的等价替换,使其不包含二次项以上的高次项,满足伊辛模型的形式要求,进而将全部的损失函数相加、变量代换、化简,得到伊辛模型的哈密顿量表达式,提取出相互作用矩阵J和外部磁场向量h,将大整数分解问题转化为寻找该伊辛模型自旋基态的求解问题;A loss function of a specific form is generated for each auxiliary block, substituted into the boundary conditions, and a formal equivalent replacement is performed for each loss function so that it does not contain high-order terms above the quadratic term, which meets the formal requirements of the Ising model , and then add all the loss functions, replace variables, and simplify to obtain the Hamiltonian expression of the Ising model, extract the interaction matrix J and the external magnetic field vector h, and transform the large integer decomposition problem into finding the Ising model The problem of solving the spin ground state of the symplectic model; 所述的转化过程是通过固定流程实现的,适用于任意大整数,在计算机内程序化完成,针对特定的大整数,不需要单独分析或推导中间过程,能够直接得到对应的伊辛模型;The conversion process is realized through a fixed process, applicable to any large integer, programmed in the computer, for a specific large integer, no separate analysis or derivation of the intermediate process is required, and the corresponding Ising model can be directly obtained; 所述的辅助变量是依据两个因数的二进制乘法竖式中的每个中间项aibj逐个引入的,即yi,j和zi,j,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位,aibj、yi,j、zi,j三项构成一个辅助块,产生损失函数;The auxiliary variables are introduced one by one according to each intermediate term a i b j in the vertical formula of binary multiplication of two factors, namely y i,j and z i,j , wherein y i,j is the The lowest bit result obtained by adding the binary variables of , z i,j is the carry obtained by adding the binary variables in the right auxiliary block, a i b j , y i,j , z i,j constitute an auxiliary block , generating a loss function; 所述的损失函数的形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,等价替换后的形式为
Figure FDA0003845467000000011
The form of the loss function is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , the equivalent replacement The latter form is
Figure FDA0003845467000000011
所述的等价替换后的损失函数不含有二次以上的项,无需降次操作,并且将其全部相加、化简、变量代换后所得哈密顿量表达式中,变量的系数大小被限制在预设范围,所得伊辛模型的相互作用矩阵J和外部磁场向量h的元素大小也是有限范围的。The loss function after the equivalent replacement described above does not contain more than two terms, and does not need to reduce the order, and in the Hamiltonian expression obtained after adding all of them, simplifying, and variable substitution, the coefficient of the variable is determined by Restricted within the preset range, the obtained Ising model interaction matrix J and the element size of the external magnetic field vector h are also within a limited range.
3.根据权利要求2所述的基于伊辛模型的大整数分解问题映射方法,其特征在于:3. the large integer decomposition problem mapping method based on Ising model according to claim 2, is characterized in that: 步骤S1.1:将所要分解的目标大整数表示为二进制形式,记录位数为w;Step S1.1: express the target large integer to be decomposed in binary form, and record the number of digits as w; 步骤S1.2:假设目标大整数的两个因数的二进制位数分别是k和h,二进制形式从高位到低位分别为a1,a2,…,ak和b1,b2,…,bhStep S1.2: Assume that the binary digits of the two factors of the target large integer are k and h respectively, and the binary forms from high to low are a 1 , a 2 ,..., a k and b 1 , b 2 ,..., b h ; 步骤S1.3:对于两个因数的二进制乘法竖式中的每个中间项aibj,逐个引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块;Step S1.3: For each intermediate term a i b j in the binary multiplication vertical formula of two factors, introduce auxiliary variables y i,j and z i,j one by one, and set a i b j , y i,j , z i, j three items as an auxiliary block; 步骤S1.4:每个辅助块产生一个损失函数,对于边界上的辅助块,根据损失函数的形式引入额外的辅助变量,并代入边界条件;Step S1.4: Generate a loss function for each auxiliary block. For the auxiliary block on the boundary, introduce additional auxiliary variables according to the form of the loss function and substitute them into the boundary conditions; 步骤S1.5:对每块得到的损失函数进行形式上的等价替换,使其只包含二次项;Step S1.5: Perform a formal equivalent replacement on the loss function obtained for each block, so that it only contains quadratic terms; 步骤S1.6:将各个替换后的损失函数相加并进行变量代换,然后化简得到伊辛模型的哈密顿量表达式;Step S1.6: Add the replaced loss functions and perform variable substitution, and then simplify to obtain the Hamiltonian expression of the Ising model; 步骤S1.7:表达式中的各个变量作为自旋节点,分别提取二元二次项系数和一次项系数组成伊辛模型的相互作用矩阵J和外部磁场向量h,并将其余的不变量部分的和记为C。Step S1.7: Each variable in the expression is used as a spin node, and the binary quadratic coefficient and the first-order coefficient are respectively extracted to form the interaction matrix J and the external magnetic field vector h of the Ising model, and the remaining invariant parts are The sum is denoted as C. 4.根据权利要求1所述的基于伊辛模型的大整数分解问题映射方法,其特征在于,在所述步骤S2中:4. the large integer decomposition problem mapping method based on Ising model according to claim 1, is characterized in that, in described step S2: 步骤S2.1:随机产生初始自旋状态,根据得到的伊辛模型计算出哈密顿量;Step S2.1: Randomly generate the initial spin state, and calculate the Hamiltonian according to the obtained Ising model; 步骤S2.2:每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;Step S2.2: change x spins each time, the initial value of x is 1, and gradually increase x as the number of changes of the same spin state increases; 步骤S2.3:若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;Step S2.3: If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change; 步骤S2.4:若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;Step S2.4: If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset; 步骤S2.5:重复流程步骤S2.2-步骤S2.4,直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。Step S2.5: Repeat step S2.2-step S2.4 of the process until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two primes of the target large integer If factor information is used, large integer decomposition is realized. 5.根据权利要求4所述的基于伊辛模型的大整数分解问题映射方法,其特征在于:5. the large integer decomposition problem mapping method based on Ising model according to claim 4, is characterized in that: 所述的降低接受自旋状态改变的判别标准,通过设置一个跳出局部最优解所需的判别能量E_jump,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后重复迭代过程,直至再次更新哈密顿量得以实现。The described criteria for reducing the acceptance of spin state changes, by setting a discriminant energy E_jump required to jump out of the local optimal solution, the Hamiltonian corresponding to the current spin state is no longer calculated, but its Set directly to E_jump, and then repeat the iterative process until the Hamiltonian is updated again. 6.一种基于伊辛模型的大整数分解问题映射系统,其特征在于,包括:6. A large integer decomposition problem mapping system based on the Ising model, characterized in that it comprises: 模块M1:对二进制乘法竖式中的每个中间项引入辅助变量,构建辅助块,对每块所得到的损失函数进行形式上的等价替换,使其满足伊辛模型的形式要求,将各块的损失函数相加并作变量代换,化简得到伊辛模型的哈密顿量表达式;Module M1: Introduce auxiliary variables to each intermediate item in the binary multiplication vertical formula, construct auxiliary blocks, and replace the loss function obtained by each block with a formal equivalent to make it meet the formal requirements of the Ising model. The loss function of the block is added and replaced by variables, and the Hamiltonian expression of the Ising model is obtained by simplification; 模块M2:根据不同自旋状态下哈密顿量的取值及其范围的分布特征,采取由少到多地更新自旋状态的技术方案,并在特定情况下改变判别条件,使其能够跳出局部最优解,直至伊辛模型到达自旋基态;Module M2: According to the distribution characteristics of the value of the Hamiltonian in different spin states and its range, adopt a technical solution to update the spin state from less to more, and change the discriminant conditions under certain circumstances so that it can jump out of the local Optimal solution until the Ising model reaches the spin ground state; 模块M3:获取两个素因子信息,实现大整数分解,进一步由欧拉公式和密码系统中开放的公钥得到RSA加密算法中的私钥,使用私钥将密文信息转换为原始明文信息,实现对RSA密码系统的破解。Module M3: Obtain two prime factor information, realize large integer decomposition, and further obtain the private key in the RSA encryption algorithm from the Euler formula and the open public key in the cryptographic system, and use the private key to convert the ciphertext information into the original plaintext information, Realize the cracking of the RSA cryptosystem. 7.根据权利要求6所述的基于伊辛模型的大整数分解问题映射系统,其特征在于,在所述模块M1中:7. the large integer decomposition problem mapping system based on Ising model according to claim 6, is characterized in that, in described module M1: 针对每个辅助块产生特定形式的损失函数,代入边界条件,并对每个损失函数进行形式上的等价替换,使其不包含二次项以上的高次项,满足伊辛模型的形式要求,进而将全部的损失函数相加、变量代换、化简,得到伊辛模型的哈密顿量表达式,提取出相互作用矩阵J和外部磁场向量h,将大整数分解问题转化为寻找该伊辛模型自旋基态的求解问题;A loss function of a specific form is generated for each auxiliary block, substituted into the boundary conditions, and a formal equivalent replacement is performed for each loss function so that it does not contain high-order terms above the quadratic term, which meets the formal requirements of the Ising model , and then add all the loss functions, replace variables, and simplify to obtain the Hamiltonian expression of the Ising model, extract the interaction matrix J and the external magnetic field vector h, and transform the large integer decomposition problem into finding the Ising model The problem of solving the spin ground state of the symplectic model; 所述的转化过程是通过固定流程实现的,适用于任意大整数,在计算机内程序化完成,针对特定的大整数,不需要单独分析或推导中间过程,能够直接得到对应的伊辛模型;The conversion process is realized through a fixed process, applicable to any large integer, programmed in the computer, for a specific large integer, no separate analysis or derivation of the intermediate process is required, and the corresponding Ising model can be directly obtained; 所述的辅助变量是依据两个因数的二进制乘法竖式中的每个中间项aibj逐个引入的,即yi,j和zi,j,其中yi,j为上方辅助块中的二进制变量相加所得的最低位结果,zi,j为右方辅助块中的二进制变量相加所得的进位,aibj、yi,j、zi,j三项构成一个辅助块,产生损失函数;The auxiliary variables are introduced one by one according to each intermediate term a i b j in the vertical formula of binary multiplication of two factors, namely y i,j and z i,j , wherein y i,j is the The lowest bit result obtained by adding the binary variables of , z i,j is the carry obtained by adding the binary variables in the right auxiliary block, a i b j , y i,j , z i,j constitute an auxiliary block , generating a loss function; 所述的损失函数的形式为Fi,j=(aibj+yi,j+zi,j-yi+1,j-1-2zi-1,j)2,等价替换后的形式为
Figure FDA0003845467000000031
The form of the loss function is F i,j =(a i b j +y i,j +z i,j -y i+1,j-1 -2z i-1,j ) 2 , the equivalent replacement The latter form is
Figure FDA0003845467000000031
所述的等价替换后的损失函数不含有二次以上的项,无需降次操作,并且将其全部相加、化简、变量代换后所得哈密顿量表达式中,变量的系数大小被限制在预设范围,所得伊辛模型的相互作用矩阵J和外部磁场向量h的元素大小也是有限范围的。The loss function after the equivalent replacement described above does not contain more than two terms, and does not need to reduce the order, and in the Hamiltonian expression obtained after adding all of them, simplifying, and variable substitution, the coefficient of the variable is determined by Restricted within the preset range, the obtained Ising model interaction matrix J and the element size of the external magnetic field vector h are also within a limited range.
8.根据权利要求7所述的基于伊辛模型的大整数分解问题映射系统,其特征在于:8. the large integer decomposition problem mapping system based on Ising model according to claim 7, is characterized in that: 模块M1.1:将所要分解的目标大整数表示为二进制形式,记录位数为w;Module M1.1: express the target large integer to be decomposed in binary form, and record the number of digits as w; 模块M1.2:假设目标大整数的两个因数的二进制位数分别是k和h,二进制形式从高位到低位分别为a1,a2,…,ak和b1,b2,…,bhModule M1.2: Assume that the binary digits of the two factors of the target large integer are k and h respectively, and the binary forms from high to low are a 1 , a 2 ,…,a k and b 1 ,b 2 ,…, b h ; 模块M1.3:对于两个因数的二进制乘法竖式中的每个中间项aibj,逐个引入辅助变量yi,j和zi,j,并将aibj、yi,j、zi,j三项作为一个辅助块;Module M1.3: For each intermediate term a i b j in the vertical form of binary multiplication of two factors, introduce auxiliary variables y i,j and z i,j one by one, and set a i b j , y i,j , z i, j three items as an auxiliary block; 模块M1.4:每个辅助块产生一个损失函数,对于边界上的辅助块,根据损失函数的形式引入额外的辅助变量,并代入边界条件;Module M1.4: Each auxiliary block generates a loss function. For auxiliary blocks on the boundary, additional auxiliary variables are introduced according to the form of the loss function and substituted into the boundary conditions; 模块M1.5:对每块得到的损失函数进行形式上的等价替换,使其只包含二次项;Module M1.5: Perform a formal equivalent replacement of the loss function obtained by each block so that it only contains quadratic terms; 模块M1.6:将各个替换后的损失函数相加并进行变量代换,然后化简得到伊辛模型的哈密顿量表达式;Module M1.6: Add the replaced loss functions and perform variable substitution, and then simplify to obtain the Hamiltonian expression of the Ising model; 模块M1.7:表达式中的各个变量作为自旋节点,分别提取二元二次项系数和一次项系数组成伊辛模型的相互作用矩阵J和外部磁场向量h,并将其余的不变量部分的和记为C。Module M1.7: Each variable in the expression is used as a spin node, and the binary quadratic coefficient and the first-order coefficient are respectively extracted to form the interaction matrix J and the external magnetic field vector h of the Ising model, and the remaining invariant parts are The sum is denoted as C. 9.根据权利要求6所述的基于伊辛模型的大整数分解问题映射系统,其特征在于,在所述模块M2中:9. the large integer decomposition problem mapping system based on Ising model according to claim 6, is characterized in that, in described module M2: 模块M2.1:随机产生初始自旋状态,根据得到的伊辛模型计算出哈密顿量;Module M2.1: Randomly generate the initial spin state, and calculate the Hamiltonian according to the obtained Ising model; 模块M2.2:每次改变x个自旋,x的初始值为1,随着同一个自旋状态的改变次数增多,使x逐渐增大;Module M2.2: Each time x spins are changed, the initial value of x is 1, and as the number of changes of the same spin state increases, x gradually increases; 模块M2.3:若改变后的哈密顿量减小,则接受这次对自旋状态的改变,并将x重置为1,否则继续保持改变前的自旋状态;Module M2.3: If the changed Hamiltonian decreases, then accept this change to the spin state and reset x to 1, otherwise continue to maintain the spin state before the change; 模块M2.4:若x到达一定值仍未被重置,则降低接受自旋状态改变的判别标准,直到x被重置;Module M2.4: If x reaches a certain value and has not been reset, lower the criterion for accepting spin state changes until x is reset; 模块M2.5:重复流程模块M2.2-模块M2.4,直到自旋状态对应的哈密顿量为-C,说明此时伊辛模型已到达自旋基态,包含目标大整数的两个素因子信息,则实现大整数分解。Module M2.5: Repeat the process module M2.2-module M2.4 until the Hamiltonian corresponding to the spin state is -C, indicating that the Ising model has reached the spin ground state at this time, including two primes of the target large integer If factor information is used, large integer decomposition is realized. 10.根据权利要求9所述的基于伊辛模型的大整数分解问题映射系统,其特征在于:10. the large integer decomposition problem mapping system based on Ising model according to claim 9, is characterized in that: 所述的降低接受自旋状态改变的判别标准,通过设置一个跳出局部最优解所需的判别能量E_jump,使当前自旋状态所对应的哈密顿量不再是计算得到的,而是将其直接设为E_jump,然后重复迭代过程,直至再次更新哈密顿量得以实现。The described criteria for reducing the acceptance of spin state changes, by setting a discriminant energy E_jump required to jump out of the local optimal solution, the Hamiltonian corresponding to the current spin state is no longer calculated, but its Set directly to E_jump, and then repeat the iterative process until the Hamiltonian is updated again.
CN202211115726.0A 2022-09-14 2022-09-14 Method and system for mapping large integer decomposition problem based on isooctyl model Active CN115514488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211115726.0A CN115514488B (en) 2022-09-14 2022-09-14 Method and system for mapping large integer decomposition problem based on isooctyl model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211115726.0A CN115514488B (en) 2022-09-14 2022-09-14 Method and system for mapping large integer decomposition problem based on isooctyl model

Publications (2)

Publication Number Publication Date
CN115514488A true CN115514488A (en) 2022-12-23
CN115514488B CN115514488B (en) 2025-01-14

Family

ID=84503895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211115726.0A Active CN115514488B (en) 2022-09-14 2022-09-14 Method and system for mapping large integer decomposition problem based on isooctyl model

Country Status (1)

Country Link
CN (1) CN115514488B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116341286A (en) * 2023-05-24 2023-06-27 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) An FPGA-based accelerated quantum heuristic solution method and its device
CN116739101A (en) * 2023-06-27 2023-09-12 复旦大学 A quantum optimization method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040119061A1 (en) * 2002-08-01 2004-06-24 Lian-Ao Wu Methods for single qubit gate teleportation
JP2021117911A (en) * 2020-01-29 2021-08-10 株式会社ワイ・ディ・シー Calculation system, calculation method, and computer program
CN114444016A (en) * 2022-02-02 2022-05-06 上海图灵智算量子科技有限公司 How to implement the Ising model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040119061A1 (en) * 2002-08-01 2004-06-24 Lian-Ao Wu Methods for single qubit gate teleportation
JP2021117911A (en) * 2020-01-29 2021-08-10 株式会社ワイ・ディ・シー Calculation system, calculation method, and computer program
CN114444016A (en) * 2022-02-02 2022-05-06 上海图灵智算量子科技有限公司 How to implement the Ising model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邓从政;谈光涛;: "随机预言模型下的RSA公钥密码体制及其快速实现", 凯里学院学报, no. 06, 15 December 2007 (2007-12-15) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116341286A (en) * 2023-05-24 2023-06-27 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) An FPGA-based accelerated quantum heuristic solution method and its device
CN116341286B (en) * 2023-05-24 2023-08-25 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Acceleration quantum heuristic solving method and device based on FPGA
CN116739101A (en) * 2023-06-27 2023-09-12 复旦大学 A quantum optimization method and device
CN116739101B (en) * 2023-06-27 2024-07-26 复旦大学 A quantum optimization method and device

Also Published As

Publication number Publication date
CN115514488B (en) 2025-01-14

Similar Documents

Publication Publication Date Title
Hua et al. Color image encryption using orthogonal Latin squares and a new 2D chaotic system
Zheng et al. Novel image encryption by combining dynamic DNA sequence encryption and the improved 2D logistic sine map
Kaur et al. Parallel strength Pareto evolutionary algorithm‐II based image encryption
Liu et al. Hyperchaotic system‐based pseudorandom number generator
CN115514488A (en) Big integer decomposition problem mapping method and system based on Itanium model
Liu et al. A stream cipher algorithm based on 2D coupled map lattice and partitioned cellular automata
CN104270247A (en) Efficient Universal Hash Function Authentication Scheme for Quantum Cryptosystem
Burek et al. Algebraic attacks on block ciphers using quantum annealing
Sha et al. An image encryption scheme based on IAVL permutation scheme and DNA operations
Deibuk et al. Design of a ternary reversible/quantum adder using genetic algorithm
CN111031191B (en) Image encryption method based on controlled alternate quantum walking and DNA sequence operation
CN103701593A (en) 256-system large number-based Ron Rivest, Adi Shamir and Leonard Adleman (RSA) encryption method
Bryant Tbuddy: A proof-generating BDD package
Wroński et al. (In) Security of Stream Ciphers Against Quantum Annealing Attacks on the Example of the Grain 128 and Grain 128a Ciphers
Kaufmann et al. Advanced techniques for the creation and propagation of modules in cartesian genetic programming
Orun et al. The lower energy consumption in cryptocurrency mining processes by SHA-256 Quantum circuit design used in hybrid computing domains
JP6885460B2 (en) Reverse image sampling device, reverse image sampling method and reverse image sampling program
CN105099654A (en) Encryption and decryption method based on coupling and self-triggering cellular automata
Vijayakumari et al. A faster 2d technique for the design of combinational digital circuits using genetic algorithm
Zhou et al. MILP/MIQCP‐Based Fully Automatic Method of Searching for Differential‐Linear Distinguishers for SIMON‐Like Ciphers
Mobin et al. Cryptanalysis of RSA Cryptosystem: Prime Factorization using Genetic Algorithm
Walker et al. Solving real-valued optimisation problems using cartesian genetic programming
Norouzi Doshanlou et al. Efficient design of quaternary quantum comparator with only a single ancillary input
Shelza et al. A Pareto-optimal evolutionary approach of image encryption using coupled map lattice and DNA
Karanjai et al. Tpu as cryptographic accelerator

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant