MZI Array Calculation Modular Multiplication Method Applicable to RSA Encryption Algorithm

Large digital-to-analog multiplication is realized through the MZI array photon computing chip, which solves the problem of high energy consumption in traditional electronic chips in asymmetric cryptographic algorithms, and realizes high-efficiency and low-energy-consuming encrypted computing.

CN116418517BActive Publication Date: 2025-07-04BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310368359.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-09
Publication Date
2025-07-04
Estimated Expiration
2043-04-09

AI Technical Summary

Technical Problem

When traditional electronic chips perform encryption calculations of asymmetric cryptographic algorithms, especially large digital-analog multiplication operations, their energy consumption is high and it is difficult to meet the growing demand for computing power. The failure of Moore's Law leads to limited development speed.

Method used

The MZI array photon computing chip is used to realize large digital-analog multiplication operations, combined with peripheral circuits, reduce dependence on electronic chips, and use the high-frequency and low-power characteristics of the photon chip for encryption calculations.

Benefits of technology

It effectively reduces the energy consumption of encrypted computing, improves the computing rate, reduces dependence on electronic chips, and meets the needs of efficient encrypted computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418517B_ABST
    Figure CN116418517B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for calculating modular multiplication using an MZI array applicable to the RSA encryption algorithm. By using an MZI array to complete the operation of the most energy-consuming large-number modular multiplication part in the RSA encryption algorithm, the MZI array belongs to a photonic computing chip, thereby realizing an encryption calculation method based on a photonic chip, effectively reducing the over-reliance of the encryption calculation of the asymmetric cryptographic algorithm on the development of electronic chips. The photonic chip has the advantages of higher frequency and lower power consumption, which can effectively reduce the energy consumption brought by encryption calculation and improve the operation rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of RSA encryption calculation in cryptography, and relates to a modular multiplication calculation method based on MZI array calculation. Background Art

[0002] With the increasing attention of the whole society to information security, more and more data needs to be encrypted for storage and transmission. Encryption calculation occupies more computing power resources. Among them, asymmetric cryptographic algorithms are popular because of their better security. However, the calculation amount of asymmetric cryptographic algorithms is relatively large. Among them, large number modular exponentiation is the basic operation of asymmetric cryptographic algorithms such as RSA and digital signature algorithms, and large integer modular multiplication operation is the key to realizing large modular exponentiation operation and also the most computationally intensive basic operation process. At present, due to the failure of Moore's law, the development speed of traditional electronic chips such as encryption chips and general CPUs is difficult to meet the growing demand for encryption computing power. Therefore, photonic computing chips have developed rapidly, replacing electrical signals with optical signals, and using photonic chips to utilize MZI (Mach–Zehnder Interferometer, abbreviated as MZI) arrays to achieve efficient and low-power large integer modular multiplication operations, and cooperating with peripheral related circuits to realize encryption operations. Summary of the Invention

[0003] The technical solution adopted by the present invention is an MZI array calculation modular multiplication method applicable to RSA encryption operation, including the following steps:

[0004] By using an MZI array to complete the operation of the most energy-consuming large number modular multiplication part in the RSA encryption algorithm, the MZI array belongs to a photonic computing chip, thereby realizing an encryption calculation method based on a photonic chip, effectively reducing the over-reliance of asymmetric cryptographic algorithm encryption calculation on the development of electronic chips. Photonic chips have the advantages of higher frequency and lower power consumption, which can effectively reduce the energy consumption brought by encryption calculation and improve the operation rate.

[0005] In order to achieve the above invention purpose, the technical solution adopted by the present invention is as follows:

[0006] When performing RSA encryption calculation, pre-generated public and private key pairs are used. The public key pair (N, e) is used to convert the plaintext into ciphertext and send it to the other party, and the private key pair (N, d) is used to convert the ciphertext into plaintext for reading and receiving. The core operation of encryption and decryption is to group the plaintext, and then perform modular multiplication operation between the plaintext group and the public key pair to form ciphertext, and perform modular multiplication operation between the ciphertext group and the private key pair to form plaintext.

[0007] One of the data groups to be encrypted is represented as A for the convenience of describing the process of modular multiplication using MZI. The large number A is used as the plaintext to be encrypted, and the large prime number B and the modulus N are used to represent the public key pair. A, B, and N are respectively converted into binary numbers, with each 8 bits as a unit to construct a large number modular multiplication calculation matrix suitable for photon calculation. The two binary large numbers A and B need to be padded with 0s at the front to reach the same length of m bytes. The ciphertext A is converted into a[0], a[1], …, a[m - 1] from the low - order byte to the high - order byte, B is converted into b[0], b[1], …, b[m - 1] from the low - order byte to the high - order byte, and N is converted into n[0], n[1], …, n[m - 1] from the low - order byte to the high - order byte.

[0008] The plaintext A is constructed into an m - order lower triangular matrix A1 suitable for MZI array calculation. All elements on its diagonal are a[0]. From left to right in the first row are a[0], 0, …, 0. In the second row are a[1], a[0], …, 0, and so on until the m - th row which is a[m - 1], a[m - 2], …, a[0].

[0009] The plaintext A is constructed into an m - order upper triangular matrix A2 suitable for MZI array calculation. All elements on its diagonal are a[m - 1]. From left to right in the first row are a[m - 1], a[m - 2], …, a[1], a[0]. In the second row are 0, a[m - 1], a[m - 2], …, a[2], a[1], and so on until the m - th row which is 0, 0, …, 0, a[m - 1].

[0010] The public key B is constructed into an m - dimensional column vector B1 suitable for MZI array calculation. From top to bottom are b[0], b[1], …, b[m - 1].

[0011] According to these matrices A1, A2 and vector B1 constructed for MZI array calculation, obtain the weight matrix required for MZI array calculation. It includes extracting the i - th row parameter from the B1 vector, and generating the corresponding m - order weight matrix based on the i - th row parameter and loading it into the MZI array.

[0012] Take the elements of the i - th row of the A1 matrix suitable for MZI array calculation as the input vector and input it to the input end of the MZI array. Through the linear operation of the input vector and the vector weight matrix at the input end, obtain the output vector. Repeat running the MZI array to obtain m output vectors. Each output vector contains 1 element, which together form an m - order column vector C1; use the same method with the A2 matrix as the input end to obtain an m - order column vector C2.

[0013] Take the C1 vector and the C2 vector suitable for MZI array calculation as the input end vectors, input them into the modulo MZI array, calculate the weight matrix according to the modulus N, extract the i-th byte from N as a parameter, generate the corresponding m-order weight matrix and load it into the modulo MZI array for modulo operation.

[0014] Extract the corresponding bit values from the output vector of the photonic computing chip, perform the corresponding shift operation and sum, and the large number modular multiplication calculation result of the product of the plaintext A and the public key B modulo N can be obtained. After multiple rounds of calculation, the ciphertext corresponding to the plaintext A can be obtained, thus completing the process of the encryption operation. Description of the Drawings

[0015] Figure 1 It is a schematic diagram of the MZI large number modular multiplication calculation device.

[0016] Figure 2 It is a flowchart of a large number modular multiplication calculation method based on MZI.

[0017] Figure 3 It is a schematic diagram of the constructed matrix and column vectors. Detailed Implementation Manner

[0018] The present invention will be described in detail below with reference to the drawings and embodiments.

[0019] An MZI array calculation modular multiplication method applicable to RSA encryption operation includes the following steps:

[0020] Express one of the data groups to be encrypted as A for the convenience of describing the process of modular multiplication operation using MZI. Take the large number A as the plaintext to be encrypted, and the large prime number B and the modulus N as a public key pair for description. Convert A, B, and N into binary numbers respectively, with every 8 bits as a unit to construct a large number modular multiplication calculation matrix suitable for photonic computing. The two binary large numbers A and B need to be padded with 0s at the front to reach the same length and the length is m bytes. The ciphertext A is converted into a[0], a[1], …, a[m - 1] from the low-order byte to the high-order byte, B is converted into b[0], b[1], …, b[m - 1] from the low-order byte to the high-order byte, and N is converted into n[0], n[1], …, n[m - 1] from the low-order byte to the high-order byte. Specifically, it includes:

[0021] Pre-store the plaintext A, the key pair B, and N in the external circuit, store them in bytes of every 8 bits, and pad A and B with leading 0s for alignment. The application of the present invention requires the external circuit to complete the pre-storage and shift operations of the operands A, B, and N, and use the optoelectronic converter to complete the writing and reading of the input end and output end of the MZI array.

[0022] Construct the plaintext A into an m - order lower triangular matrix A1 suitable for MZI array calculation. All elements on its diagonal are a[0]. From left to right in the first row are a[0], 0, …, 0. In the second row are a[1], a[0], …, 0, and so on until the m - th row which is a[m - 1], a[m - 2], …, a[0].

[0023] Construct the plaintext A into an m - order upper triangular matrix A2 suitable for MZI array calculation. All elements on its diagonal are a[m - 1]. From left to right in the first row are a[m - 1], a[m - 2], …, a[1], a[0]. In the second row are 0, a[m - 1], a[m - 2], …, a[2], a[1], and so on until the m - th row which is 0, 0, …, 0, a[m - 1].

[0024] Construct the public key B into an m - dimensional column vector B1 suitable for MZI array calculation. From top to bottom are b[0], b[1], …, b[m - 1]. The constructed matrix and vector are used for operations in the MZI array. The constructed matrix uses an external circuit to read A, B, N bit - by - bit, input them row - by - row into the optoelectronic conversion device, and write the input end for operation using a photonic computing chip.

[0025] According to these matrices A1, A2 and vector B1 constructed suitable for MZI array calculation, obtain the weight matrix required for MZI array calculation. This includes extracting the i - th row parameters from the B1 vector, and generating the corresponding m - order weight matrix based on the i - th row parameters and loading it into the MZI array. Specifically include:

[0026] The corresponding m - order weight matrix is generated according to the unitary matrix, diagonal matrix and the complex conjugate matrix corresponding to the unitary matrix. The dimension of the weight matrix is m * n, the dimension of the unitary matrix is m * m, the dimension of the diagonal matrix is m * n, and the dimension of the complex conjugate matrix is n * n. The number of interferometers in the MZI array is determined according to the weight matrix. The number of interferometers is based on the following formula: t = m(m - 1) / 2, where t is the number of MZIs in the MZI interferometer array corresponding to the unitary matrix. m is determined by the number of aligned bytes of the large numbers A and B.

[0027] Take the elements of the i - th row of the A1 matrix generated from the plaintext as the input vector and input it into the input end of the MZI array. Perform a linear operation of the vector weight matrix through the input vector at the input end to obtain the output vector. Run the MZI array m times, and obtain m output vectors. Each output vector contains 1 element, which together form an m - order column vector C1; Use the same method to take the A2 matrix generated from the plaintext as the input end, run the MZI array m times, and obtain an m - order column vector C2.

[0028] The C1 vector and the C2 vector are used as input vectors and input into the modulo MZI array. The weight matrix is calculated according to the modulus N. The i-th byte is extracted from N as a parameter, and the corresponding m-order weight matrix is generated and loaded into the modulo MZI array. The unitary matrix corresponding to the modulo weight matrix requires 3m(3m - 1) / 2 MZIs.

[0029] The output vector is the result vector after the modulo multiplication operation. By extracting elements from the output vector and performing a shift operation and summation, the result of the large number modulo multiplication of the plaintext A and the key B modulo N can be obtained. Specifically, it includes:

[0030] An optoelectronic conversion device is required to read the output vector of the photonic computing chip, and an external circuit is used for bit-by-bit reading and storage. The output value generated by the output vector is determined as the result of the large number modulo multiplication calculation. Each group of the plaintext is subjected to a modulo multiplication operation using the photonic computing chip, and the ciphertext is finally formed. Decryption can also be performed using the corresponding private key pair for modulo multiplication to restore the ciphertext to the plaintext.

Claims

1. A method for calculating modular multiplication using an MZI array applicable to the RSA encryption algorithm, characterized in that, The method includes the following steps. When performing RSA encryption calculation, a pre-generated public-private key pair is used. The public key pair (N, e) is used to convert the plaintext into ciphertext and send it to the other party, and the private key pair (N, d) is used to convert the ciphertext into plaintext for reading and receiving. The core operation of encryption and decryption is that after the plaintext is grouped, the plaintext group and the public key pair are subjected to modular multiplication operation to form ciphertext, and the ciphertext group and the private key pair are subjected to modular multiplication operation to form plaintext; One of the data groups to be encrypted is represented as A to facilitate the description of the process of performing modular multiplication operation using MZI. A is used as the plaintext to be encrypted, and the large prime number B and the modulus N are used to represent the public key pair; A, B, and N are respectively converted into binary numbers, with each 8 bits as a unit to construct a large number modular multiplication calculation matrix suitable for photon calculation. The two binary large numbers A and B need to be padded with 0s in front to reach the same length and the length is m bytes. The ciphertext A is converted into a[0], a[1], …, a[m - 1] from the low-order byte to the high-order byte, B is converted into b[0], b[1], …, b[m - 1] from the low-order byte to the high-order byte, and N is converted into n[0], n[1], …, n[m - 1] from the low-order byte to the high-order byte; The plaintext A is constructed into an m-order lower triangular matrix A1 suitable for MZI array calculation, with a[0] on its diagonal, a[0], 0, …, 0 from left to right in the first row, a[1], a[0], …, 0 in the second row, and so on until the mth row a[m - 1], a[m - 2], …, a[0]; The plaintext A is constructed into an m-order upper triangular matrix A2 suitable for MZI array calculation, with a[m - 1] on its diagonal, a[m - 1], a[m - 2], … a[1], a[0] from left to right in the first row, 0, a[m - 1], a[m - 2], … a[2], a[1] in the second row, and so on until the mth row 0, 0, … 0, a[m - 1]; The public key B is constructed into an m-dimensional column vector B1 suitable for MZI array calculation, which is b[0], b[1], …, b[m - 1] from top to bottom; According to these matrices A1, A2 and vector B1 constructed suitable for MZI array calculation, obtain the weight matrix required for MZI array calculation; It includes extracting the i-th row parameter from the B1 vector, generating the corresponding m-order weight matrix based on the i-th row parameter and loading it into the MZI array; The elements of the i-th row of the A1 matrix suitable for MZI array calculation are used as the input vector and input to the input end of the MZI array. Through the input vector at the input end, a linear operation of the vector weight matrix is performed to obtain the output vector. The MZI array is repeatedly run to obtain m output vectors. Each output vector contains 1 element, which together form an m-order column vector C1; Using the same method, the A2 matrix is used as the input end to obtain an m-order column vector C2; Take the C1 vector and C2 vector suitable for MZI array calculation as the input end vectors, input them into the modulo MZI array, calculate the weight matrix according to the modulus N, extract the i-th byte from N as a parameter, generate the corresponding m-order weight matrix and load it into the modulo MZI array for modulo operation; Extract the corresponding bit values from the output vector of the photonic computing chip, perform the corresponding shift operation and summation to obtain the result of the large number modular multiplication of the product of the plaintext A and the public key B modulo N. After multiple rounds of calculation, the ciphertext corresponding to the plaintext A is obtained, thus completing the process of the encryption operation.

Citation Information

Patent Citations

  • Convolution calculation method and device based on photon calculation chip

    CN114723019A

  • Encryption key generation device, and encryption device and decryption device capable of using the device

    JP2010256549A