A modular multiplication circuit suitable for post-quantum cryptographic algorithm Dilithium
By designing the modular multiplication operation circuit of the partial multiplication, addition and modular reduction unit, splitting and merging data for multiplication, addition and subtraction operations, the problem of Dilithium's slow modular multiplication operation speed is solved, and efficiency and safety are improved. properties, shortening the logic delay time and reducing the circuit area.
Patent Information
- Application Number
- CN202410459219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-04-17
AI Technical Summary
The modular multiplication operation of the post-quantum cryptographic algorithm Dilithium is slow, affecting its efficiency and security.
A modular multiplication operation circuit including a partial multiplication unit, a partial addition unit and a modular reduction unit is designed. By performing multiple splits, multiplications, additions, left shifts, additions and subtractions on the initial data, 23 Fast completion of ×23 modular multiplication operation.
The efficiency of the modular multiplication operation is improved, the logic delay time is shortened, the circuit area is reduced, and the modular multiplication operation within three cycles is realized.
Smart Images

Figure CN118233094B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of post-quantum information security algorithms, digital signal processing and circuit implementation, and in particular relates to a modular multiplication operation circuit suitable for a post-quantum cryptographic algorithm Dilithium. Background Art
[0002] In recent years, with the rapid development of quantum computers, the security of traditional cryptographic systems has faced unprecedented threats. In 1994, Peter Shor proposed the Shor algorithm for solving the problem of factoring large integers, which showed that in some cases, quantum computers can complete tasks that classical computers cannot handle in polynomial time. In addition, Lov Grover proposed the Grover algorithm for searching unsorted databases, which also showed that quantum computers have significant advantages in certain problems. In 2019, Google published a study on quantum supremacy in the journal Nature. Compared with the calculation time of Summit, the world's most powerful supercomputer, which takes up to 10,000 years, they claimed that it only takes 3 minutes and 20 seconds to complete.
[0003] The rapid development of this emerging field has led to a rethinking of traditional encryption methods, as traditional encryption methods have become more vulnerable under the threat of quantum computing. Faced with this challenge, research institutions and companies around the world have devoted their efforts to studying new cryptographic systems to cope with the threat of future quantum computing. Against this background, the study of post-quantum cryptographic standards has emerged and has become an important part of ensuring information security. In order to meet the challenges brought by the development of quantum computers, the National Institute of Standards and Technology (NIST) of the United States launched the study of post-quantum cryptographic standards in 2016, focusing on soliciting two types of post-quantum cryptographic algorithms: public key encryption algorithms and digital signatures. After several rounds of rigorous screening, as of November 2023, NIST has announced the shortlist of four post-quantum cryptographic schemes, including three lattice-based post-quantum cryptographic schemes, CRYSTALS-KYBER, CRYSTALS-DILITHIUM (digital signature) and FALCON (digital signature), and SPHINCS+.
[0004] CRYSTALS-DILITHIUM is one of the lattice-based post-quantum cryptographic schemes that focuses on the field of digital signatures. As one of the post-quantum cryptographic schemes recognized by NIST, Dilithium excels in countering quantum computer attacks. In the Dilithium algorithm, modular multiplication is a widely used key operation, which accounts for 50% of the Dilithium computing time. The research on this technical means has important practical significance in the field of post-quantum cryptography and plays a key role in improving the efficiency and security of the system. Therefore, it is of great significance to improve the speed of modular multiplication in the Dilithium algorithm. Summary of the invention
[0005] The technical problem to be solved by the present invention is that in order to make the modular multiplication operation speed of the post-quantum cryptographic algorithm Dilithium faster and more efficient, the present invention provides a modular multiplication operation circuit suitable for the post-quantum cryptographic algorithm Dilithium.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a modular multiplication operation circuit suitable for the post-quantum cryptographic algorithm Dilithium, including: a sub-item multiplication unit, a sub-item addition unit and a modular reduction unit;
[0007] The item-by-item multiplication unit is used to perform multiple splitting, multiplication and addition on a pair of input initial data to obtain three intermediate data;
[0008] The item addition unit is used to perform multiple splitting and left shifting on the three intermediate data and perform addition and subtraction to obtain preliminary processed data;
[0009] The modular reduction unit is used to split the primary processed data, shift it left, and add and subtract it to obtain secondary processed data; the secondary processed data is subtracted from the first preset constant, and compared and judged with the secondary processed data to obtain final output data;
[0010] The multi-item splitting, multiplication and addition process in the item multiplication unit is as follows:
[0011] c 0 =a[11:0]*b[11:0] (1)
[0012] c 2 =a[22:12]*b[22:12] (2)
[0013] c 1 =(a[22:12]+a[11:0])*(b[22:12]+b[11:0])-c 2 -c 0 (3)
[0014] Wherein, a and b are a pair of initial data; a[11:0] is the data from the 1st to the 12th bit in the initial data a, a[22:12] is the data from the 13th to the 23rd bit in the initial data a, and the same is true for the initial data b; c 0 、c 1 、c 2 There are three intermediate data.
[0015] Preferably, the item-by-item multiplication unit includes a first multiplier, a second multiplier, a third multiplier, a first adder, a second adder, a first subtractor, a first register, a second register and a third register;
[0016] The multiplier is used for performing multiplication operations; the adder is used for performing addition operations; the subtractor is used for performing subtraction operations; the register is used for storing intermediate data; the initial data a and b are 23 bits in size.
[0017] Preferably, the input end of the first multiplier is connected to the initial data a[11:0] and the initial data b[11:0], and the output end is connected to the first register and the subtrahend end of the first subtractor; the input end of the first adder is connected to the initial data a[11:0] and the initial data a[22:12], and the output end is connected to the input end of the second multiplier; the input end of the second adder is connected to the initial data b[11:0] and the initial data b[22:12], and the output end is connected to the input end of the second multiplier; the output end of the second multiplier is connected to the minuend end of the first subtractor; the input end of the third multiplier is connected to the initial data a[22:12] and the initial data b[22:12], and the output end is connected to the third register and the subtrahend end of the first subtractor; the output end of the first subtractor is connected to the second register.
[0018] Preferably, the multi-item splitting, left shifting, addition and subtraction process in the item addition unit is:
[0019] Z=2 23 c 2 [21:9]+2 14 c 2 [8:0]+2 23 c 1 [23:11]+2 12 c 1 [10:0]+c 0 [23:0]-2c 2 [21:0] (4)
[0020] Wherein, Z is the preliminary processing data; i [x:y] is c iData from y+1 to x+1 in the data, i=0, 1, 2; 2 h c i c i The data is shifted left by h bits, i.e. c i Data and 2 h Multiply.
[0021] Preferably, the item addition unit includes a third adder, a fourth adder, a fifth adder, a sixth adder, a second subtractor, a third subtractor and a fourth register;
[0022] The input terminals of the third adder, the fourth adder and the second subtractor are connected to the output terminal of the item multiplication unit; the output terminal of the third adder is connected to the input terminal of the third subtractor; the output terminals of the fourth adder and the second subtractor are connected to the input terminal of the fifth adder; the output terminals of the third subtractor and the fifth adder are connected to the input terminal of the sixth adder; the output terminal of the sixth adder is connected to the fourth register; and the fourth register is used to store preliminary processed data.
[0023] Preferably, the input terminal of the third adder is connected to the intermediate data c output by the item multiplication unit. 1 [23:11], intermediate data c 2 [21:9] connected; the fourth adder input terminal is connected to the intermediate data c output by the item multiplication unit 0 [23:0], intermediate data c 1 [10:0] is connected to the data after left shift by 12 bits; the minuend terminal of the second subtractor is connected to the intermediate data c 2 [8:0] is connected to the data after being shifted left by 14 bits; the subtrahend end of the second subtractor is connected to the intermediate data c 2 [21:0] The data after being shifted left by 1 bit is connected.
[0024] Preferably, the subtrahend terminal of the third subtractor is connected to the data of the third adder output after being left-shifted by 13 bits; the subtrahend terminal of the third subtractor is connected to the output data of the third adder.
[0025] Preferably, the splitting, left shifting, adding and subtracting process in the modular reduction unit is:
[0026] d = 2 13 Z[27:23]-Z[27:23]+Z[22:0] (5)
[0027] Wherein, Z is the preliminary processed data; d is the secondary processed data; Z[x:y] is the data from the y+1th to the x+1th bit in the preliminary processed data Z; h Z is the data after the preliminary processed data Z is shifted left by h positions.
[0028] Preferably, the modular reduction unit comprises a fourth subtractor, a fifth subtractor, a seventh adder, a multiplexer and a fifth register;
[0029] The fourth subtractor input end is connected to the output end of the item addition unit; the seventh adder input end is connected to the output end of the fourth subtractor and the output end of the item addition unit; the seventh adder output end is connected to the minuend end of the fifth subtractor and the input end of the multiplexer; the minuend end of the fifth subtractor is connected to the first preset constant; the fifth subtractor output end is connected to the input end of the multiplexer; and the multiplexer output end is connected to the input end of the fifth register.
[0030] Preferably, the first preset constant is the number 8380417; the subtrahend end of the fourth subtractor is connected to the data after the preliminary processed data Z[27:23] output by the sub-item addition unit is shifted left by 13 bits; the subtrahend end of the fourth subtractor is connected to the preliminary processed data Z[27:23] output by the sub-item addition unit; the input end of the seventh adder is connected to the preliminary processed data Z[22:0] output by the sub-item addition unit.
[0031] Implementing the embodiments of the present invention has the following beneficial effects:
[0032] (1) The embodiment of the present invention splits a pair of initial data by designing a sub-item multiplication unit, a sub-item addition unit and a modular reduction unit, and then performs multiplication, addition and subtraction. The original 23×23 modular multiplication operation is transformed into multiple 11×12 modular multiplication operations or 12×12 modular multiplication operations, and then through a series of additions, subtractions and left shifts, the 23×23 modular multiplication operation is finally completed within three cycles. Not only does it have higher work efficiency and shorter logic delay time, but it also makes the modular multiplication circuit area smaller and more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 This is a circuit architecture diagram of a modular multiplication operation suitable for the post-quantum cryptographic algorithm Dilithium of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0036] like Figure 1 As shown, this embodiment discloses a modular multiplication operation circuit suitable for the post-quantum cryptographic algorithm Dilithium, and the modular multiplication operation circuit suitable for the post-quantum cryptographic algorithm Dilithium includes: an item multiplication unit 10, an item addition unit 20 and a modular reduction unit 30.
[0037] The item-by-item multiplication unit 10 is used to perform multiple splitting, multiplication and addition on a pair of input initial data (a, b) to obtain three intermediate data (c 0 、c 1 、c 2 ). The item addition unit 20 is used to perform multiple splitting and left shifting and addition and subtraction on the three intermediate data to obtain preliminary processed data (Z). The modular reduction unit 30 is used to split and left shift the preliminary processed data and add and subtract to obtain secondary processed data. The secondary processed data is subtracted from the first preset constant and compared with the secondary processed data to obtain the final output data. The input end of the item multiplication unit 10 is connected to the pair of initial data, and the output end of the item multiplication unit 10 is connected to the input end of the item addition unit 20. The output end of the item addition unit 20 is connected to the input end of the modular reduction unit 30. The output end of the modular reduction unit 30 is used to output the final output data.
[0038] The pair of initial data are both 23 bits in size, and the final output data is the result of completing the modular multiplication operation of the pair of initial data. That is:
[0039] c=a[22:0]*b[22:0] (10
[0040] Among them, c is the final output data; a[22:0] is all the data from the 1st bit to the 23rd bit of the initial data a, and b[22:0] is all the data from the 1st bit to the 23rd bit of the initial data b.
[0041] The item-by-item multiplication unit 10 in this embodiment divides a pair of initial data into lower 12 bits and higher 11 bits of data by multiplying and adding multiple bits, and then multiplies or adds and multiplies them to obtain three intermediate data, namely:
[0042] c 0 =a[11:0]*b[11:0] (2
[0043] c 2 =a[22:12]*b[22:12] (3)
[0044] c 1 =(a[22:12]+a[11:0])*(b[22:12]+b[11:0])-c 2 -c 0 (4)
[0045] Wherein, a and b are a pair of initial data. a[11:0] is the data from the 1st to the 12th bit in the initial data a, that is, the lower 12 bits of the initial data a. a[22:12] is the data from the 13th to the 23rd bit in the initial data a, that is, the upper 11 bits of the initial data a. The same is true for the initial data b. 0 is 24 bits of data, c 1 is 24 bits of data, c 2 It is 22 bits of data.
[0046] The item-by-item addition unit 20 in this embodiment obtains preliminary processed data by multi-item splitting, left shifting, adding and subtracting the three intermediate data, namely:
[0047] Z=2 23 c 2 [21:9]+2 14 c 2 [8:0]+2 23 c 1 [23:11]+2 12 c 1 [10:0]+c 0 [23:0]-2c 2 [21:0] (5)
[0048] Wherein, Z is the preliminary processing data; i [x:y] is c i Data from y+1 to x+1 in the data, i=0, 1, 2; 2 h c i c i The data is shifted left by h bits, i.e. c i Data and 2 h The Z is 28 bits of data.
[0049] The modular reduction unit 30 in this embodiment further obtains secondary processed data by splitting the primary processed data, shifting it to the left, and adding and subtracting it. That is:
[0050] d = 2 13 Z[27:23]-Z[27:23]+Z[22:0] (6)
[0051] Wherein, d is the secondary processed data; Z[x:y] is the data from the y+1th to the x+1th bit in the primary processed data Z; h Z is the data after the preliminary processed data Z is shifted left by h bits. The d is 24 bits of data.
[0052] Finally, the modular reduction unit 30 in this embodiment further subtracts the secondary processed data from the first preset constant, compares and determines with the secondary processed data, and finally outputs the final output data. That is:
[0053] c≡(d>Q)? (dQ):d(mod Q) (7)
[0054] Among them, c in the formula (1) is equivalent to the final output data, and the final output data is: (a×b) mod Q.
[0055] The output of the final output data c is finally realized by the cooperation of the above-mentioned item multiplication unit 10, item addition unit 20 and modular reduction unit 30. Compared with the multiplier structure of direct multiplication, the modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium requires fewer multiplication operations, that is, the modular multiplication result can be obtained more quickly and with less consumption.
[0056] Specifically, based on formula (2)-(4), the result of formula (1) and the result of formula (2)-(4) have the following relationship:
[0057] c=c 2 2 24 +c 1 2 12 +c 0 (8)
[0058] The formula (8) can be transformed into the following expression:
[0059] c 2 2 24 +c 1 2 12 +c 0 ≡(2 14 -2)c 2 +2 23 c 1 [23:11]+2 12 c 1 [10:0]+c 0
[0060] ≡2 23 c 2 [21:9]+2 14 c2 [8:0]+2 23 c 1 [23:11]+2 12 c 1 [10:0]+c 0 [23:0]-2c 2 [21:0] (9)
[0061] That is, the formula (5) is equivalent to the formula (1). The 28-bit data of the preliminary processed data Z is changed into the 24-bit data of the secondary processed data d by formula (6). Finally, the final output data c of 23 bits is obtained by formula (7).
[0062] During the execution process, the item-by-item multiplication unit 10 includes a first multiplier 101, a second multiplier 102, a third multiplier 103, a first adder 104, a second adder 105, a first subtractor 106, a first register 107, a second register 108 and a third register 109. The multiplier is used to perform a multiplication operation. The adder is used to perform an addition operation. The subtractor is used to perform a subtraction operation. The register is used to store the intermediate data.
[0063] The first multiplier 101 has an input connected to initial data a[11:0] and initial data b[11:0], and an output connected to the first register 107 and the subtrahend terminal of the first subtractor 106. The first adder 104 has an input connected to initial data a[11:0] and initial data a[22:12], and an output connected to the input of the second multiplier 102. The second adder 105 has an input connected to initial data b[11:0] and initial data b[22:12], and an output connected to the input of the second multiplier 102. The output of the second multiplier 102 is connected to the subtrahend terminal of the first subtractor 106. The third multiplier 103 has an input connected to initial data a[22:12] and initial data b[22:12], and an output connected to the third register 109 and the subtrahend terminal of the first subtractor 106. The output terminal of the first subtractor 106 is connected to the second register 108. The initial data a[11:0] is all data from the 1st bit to the 12th bit in the initial data a, and the initial data a[22:12], initial data b[11:0], etc. have similar meanings.
[0064] The item-by-item multiplication unit 10 completes the operations of equations (2) to (4) through the multiplier, adder and subtractor. The first register 107, the second register 108 and the third register 109 respectively convert the three intermediate data c 0 、c 1 、c 2storage.
[0065] The sub-item addition unit includes a third adder 201, a fourth adder 202, a fifth adder 203, a sixth adder 204, a second subtractor 205, a third subtractor 206 and a fourth register 207. The input ends of the third adder 201, the fourth adder 202 and the second subtractor 205 are connected to the output end of the sub-item multiplication unit 10. Specifically, the first register 107, the second register 108 and the third register 109 in the sub-item multiplication unit 10 use the hardware description language Verilog to perform the calculation on the three intermediate data c 0 、c 1 、c 2 Direct operation is performed to split it into data of different bit sizes. The data of different bit sizes include intermediate data c 1 [23:11], intermediate data c 2 [21:9], intermediate data c 0 [23:0], intermediate data c 1 [10:0], intermediate data c 2 [8:0], intermediate data c 2 [21:0].
[0066] The input terminal of the third adder 201 is connected to the intermediate data c 1 [23:11], intermediate data c 2 The input terminal of the fourth adder 202 is connected to the intermediate data c 0 [23:0], intermediate data c 1 The minuend terminal of the second subtractor 205 is connected to the intermediate data c 2 The subtrahend terminal of the second subtractor 205 is connected to the intermediate data c 2 [21:0] is connected to the data after being shifted left by 1 bit. The data shifted left by h bits represents the data being multiplied by 2 h times.
[0067] The output terminal of the third adder 201 is connected to the input terminal of the third subtractor 206. Specifically, the subtrahend terminal of the third subtractor 206 is connected to the data after the output data of the third adder 201 is left-shifted by 13 bits. The subtrahend terminal of the third subtractor 206 is connected to the output data of the third adder 201.
[0068] The output ends of the fourth adder 202 and the second subtractor 205 are connected to the input end of the fifth adder 203. The output ends of the third subtractor 206 and the fifth adder 203 are connected to the input end of the sixth adder 204. The output end of the sixth adder 204 is connected to the fourth register 207. The fourth register 207 is used to store preliminary processing data, that is, the above structure of the item addition unit will complete the operation of formula (5).
[0069] The modular reduction unit 30 includes a fourth subtractor 301, a fifth subtractor 302, a seventh adder 303, a multiplexer 304 and a fifth register 305. The input end of the fourth subtractor 301 is connected to the output end of the item addition unit 20. Specifically, the fourth register 207 in the item addition unit 20 splits the preliminary processed data into preliminary processed data Z[27:23] and preliminary processed data Z[22:0] through a hardware description language. The subtrahend end of the fourth subtractor 301 is connected to the data after the preliminary processed data Z[27:23] is shifted left by 13 bits. The subtrahend end of the fourth subtractor 301 is connected to the preliminary processed data Z[27:23].
[0070] The input end of the seventh adder 303 is connected to the output end of the fourth subtractor 301 and the output end of the item addition unit 20. Specifically, the input end of the seventh adder 303 is connected to the preliminary processed data Z[22:0] output by the item addition unit 20. The output end of the seventh adder 303 is connected to the subtrahend end of the fifth subtractor 302 and the input end of the multiplexer 304. The subtrahend end of the fifth subtractor 302 is connected to the first preset constant 306, which is a number 8380417. The output end of the fifth subtractor 302 is connected to the input end of the multiplexer 304. The output end of the multiplexer 304 is connected to the input end of the fifth register 305. The fifth register 305 is used to store the final output data.
[0071] The fourth subtractor 301 and the seventh adder 303 are used to perform the operation of formula (6). The fifth subtractor 302 and the multiplexer 304 are used to perform the operation of formula (7). Finally, the final output data is obtained.
[0072] In summary, the embodiment of the present invention effectively reduces the number of multiplication operations by dividing a high-bit data into two, thereby replacing a 23×23-bit multiplication operation with a 13×13-bit multiplication operation. The working efficiency of the multiplier is greatly improved, and the area is smaller. The logic delay time of the modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium described in the embodiment of the present invention is shortened from 4.98ns to 3.79ns, and the area is reduced from 2140μm 2Reduced to 2052μm 2 .
[0073] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A modular multiplication circuit suitable for post-quantum cryptographic algorithm Dilithium, characterized in that: include: Item multiplication unit, item addition unit and modular reduction unit; The item-by-item multiplication unit is used to perform multiple splitting, multiplication and addition on a pair of input initial data to obtain three intermediate data; The item addition unit is used to perform multiple splitting and left shifting on the three intermediate data and perform addition and subtraction to obtain preliminary processed data; The modular reduction unit is used to split the primary processed data, shift it left, and add and subtract it to obtain secondary processed data; the secondary processed data is subtracted from the first preset constant, and compared and judged with the secondary processed data to obtain final output data; The multi-item splitting, multiplication and addition process in the item multiplication unit is as follows: c0=a[11:0]*b[11:0] (1) c2=a[22:12]*b[22:12] (2) c1=(a[22:12]+a[11:0])*(b[22:12]+b[11:0])-c2-c0 (3) Wherein, a and b are a pair of 23-bit initial data; a[11:0] is the 1st to 12th bit data in the initial data a, a[22:12] is the 13th to 23rd bit data in the initial data a, and the same is true for the initial data b; c0, c1, and c2 are three intermediate data; The multi-item splitting, left shifting, addition and subtraction process in the item addition unit is as follows: Z=2 23 c2[21:9]+2 14 c2[8:0]+2 23 c1[23:11]+2 12 c1[10:0]+c0[23:0]-2c2[21:0] (4) Wherein, Z is the preliminary processing data; i [x:y] is c i Data from y+1 to x+1 in the data, i=0, 1, 2; 2 h c i c i The data is shifted left by h bits, i.e. c i Data and 2 h multiply; The splitting, left shifting, addition and subtraction process in the modular reduction unit is: d=2 13 Z[27:23]-Z[27:23]+Z[22:0] (5) Wherein, Z is the preliminary processed data; d is the secondary processed data; Z[x:y] is the data from the y+1th to the x+1th bit in the preliminary processed data Z; h Z is the data after the initial processing data Z is shifted left by h positions; The secondary processing data in the modular reduction unit is subtracted from the first preset constant and compared with the secondary processing data. The specific process is: c≡(d>Q)? (dQ):d(mod Q) (6) Among them, Q is the first preset constant, and the Q value is the number 8380417; c is the final output data; the final output data is equivalent to the result of a[22:0]*b[22:0], and the final output data is: (a×b) mod Q.
2. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 1, characterized in that: The item-by-item multiplication unit includes a first multiplier, a second multiplier, a third multiplier, a first adder, a second adder, a first subtractor, a first register, a second register and a third register; The multiplier is used for performing multiplication operations; the adder is used for performing addition operations; the subtractor is used for performing subtraction operations; the register is used for storing intermediate data; the initial data a and b are 23 bits in size.
3. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 2, characterized in that: The first multiplier input terminal is connected to initial data a[11:0] and initial data b[11:0], and the output terminal is connected to the first register and the subtrahend terminal of the first subtractor; the first adder input terminal is connected to initial data a[11:0] and initial data a[22:12], and the output terminal is connected to the second multiplier input terminal; the second adder input terminal is connected to initial data b[11:0] and initial data b[22:12], and the output terminal is connected to the second multiplier input terminal; the second multiplier output terminal is connected to the subtrahend terminal of the first subtractor; the third multiplier input terminal is connected to initial data a[22:12] and initial data b[22:12], and the output terminal is connected to the third register and the subtrahend terminal of the first subtractor; the first subtractor output terminal is connected to the second register.
4. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 1, characterized in that: The item addition unit includes a third adder, a fourth adder, a fifth adder, a sixth adder, a second subtractor, a third subtractor and a fourth register; The input terminals of the third adder, the fourth adder and the second subtractor are connected to the output terminal of the item multiplication unit; the output terminal of the third adder is connected to the input terminal of the third subtractor; the output terminals of the fourth adder and the second subtractor are connected to the input terminal of the fifth adder; the output terminals of the third subtractor and the fifth adder are connected to the input terminal of the sixth adder; the output terminal of the sixth adder is connected to the fourth register; and the fourth register is used to store preliminary processed data.
5. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 4, characterized in that: The input end of the third adder is connected to the intermediate data c1[23:11] and the intermediate data c2[21:9] output by the item multiplication unit; the input end of the fourth adder is connected to the intermediate data c0[23:0] and the intermediate data c1[10:0] output by the item multiplication unit after being shifted left by 12 bits; the minuend end of the second subtractor is connected to the data of the intermediate data c2[8:0] after being shifted left by 14 bits; the subtrahend end of the second subtractor is connected to the data of the intermediate data c2[21:0] after being shifted left by 1 bit.
6. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 4, characterized in that: The subtrahend terminal of the third subtractor is connected to the data of the third adder output after the data is left-shifted by 13 bits; the subtrahend terminal of the third subtractor is connected to the output data of the third adder.
7. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 1, characterized in that: The modular reduction unit includes a fourth subtractor, a fifth subtractor, a seventh adder, a multiplexer and a fifth register; The fourth subtractor input end is connected to the item-by-item adding unit output end; the seventh adder input end is connected to the fourth subtractor output end and the item-by-item adding unit output end; The output terminal of the seventh adder is connected to the minuend terminal of the fifth subtractor and the input terminal of the multiplexer; The subtrahend terminal of the fifth subtractor is connected to the first preset constant; the output terminal of the fifth subtractor is connected to the input terminal of the multiplexer; and the output terminal of the multiplexer is connected to the input terminal of the fifth register.
8. The modular multiplication circuit suitable for the post-quantum cryptographic algorithm Dilithium according to claim 7, characterized in that: The subtrahend end of the fourth subtractor is connected to the data after the preliminary processed data Z[27:23] output by the sub-item addition unit is shifted left by 13 bits; the subtrahend end of the fourth subtractor is connected to the preliminary processed data Z[27:23] output by the sub-item addition unit; the input end of the seventh adder is connected to the preliminary processed data Z[22:0] output by the sub-item addition unit.
