CN113300829B - SM3 algorithm hardware implementation device - Google Patents

SM3 algorithm hardware implementation device Download PDF

Info

Publication number
CN113300829B
CN113300829B CN202110552612.1A CN202110552612A CN113300829B CN 113300829 B CN113300829 B CN 113300829B CN 202110552612 A CN202110552612 A CN 202110552612A CN 113300829 B CN113300829 B CN 113300829B
Authority
CN
China
Prior art keywords
message
round
message word
dynamic
algorithm
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.)
Active
Application number
CN202110552612.1A
Other languages
Chinese (zh)
Other versions
CN113300829A (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.)
Shenzhen Smart Microelectronics Technology Co ltd
Original Assignee
Spl Electronic Technology Co ltd
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 Spl Electronic Technology Co ltd filed Critical Spl Electronic Technology Co ltd
Priority to CN202110552612.1A priority Critical patent/CN113300829B/en
Publication of CN113300829A publication Critical patent/CN113300829A/en
Application granted granted Critical
Publication of CN113300829B publication Critical patent/CN113300829B/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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms

Abstract

The invention relates to a hardware implementation device of an SM3 algorithm, and belongs to the technical field of information security. The device comprises: 16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: non-reassignment operations of the 0 th to 11 th rounds, dynamic assignment operations of the 12 th to 63 th rounds: coding the 16 basic message word registers in sequence, assigning the message word in the next basic message word register to the previous basic message word register, and assigning the message word in the third dynamic message word register to the last basic message word register; and 3 dynamic message word registers for dynamically storing message words in each round of expansion calculation and dynamically updating the message words in each round. The device reduces the number of registers, further reduces the area of the hardware device, saves the cost and the power consumption, and has practical engineering application value.

Description

SM3 algorithm hardware implementation device
Technical Field
The invention relates to a hardware implementation device of an SM3 algorithm, and belongs to the technical field of information security.
Background
Hash functions formally introduce cryptography at the end of the seventies of the twentieth century, and were primarily used in message authentication applications in the early days. The method is a unidirectional cryptographic algorithm, has the characteristics of compression, simplicity, antigen root, collision resistance and the like, and ensures that the hash function is widely applied in the fields of cryptography and information security. Typical hash functions are SHA-1, SHA-2, MD4, MDS, SM2, SM3, etc.
The SM3 cryptographic hash algorithm can meet the security requirements of various cryptographic algorithm applications, such as: the message verification code is generated and verified through the SM3 hash algorithm, the digital signature and verification are generated through the SM3 hash algorithm, and meanwhile, a required hash function and the like can be provided for the digital signature of the SM2 cryptographic algorithm. SM3 is widely used because of its high security, and SM3 is formally an international standard in 10 months of 2018.
At present, the information security technology is integrated into all aspects of society economy, life and the like, and the information security is now a safe box for guaranteeing the normal operation of the whole society. With the improvement and importance of information security requirements in various fields and industries and the high-speed development of integrated circuits, information security chips realized in a hardware form are widely applied to the internet of things security industry and the intelligent hardware market, and compared with encryption in a software form, hardware encryption has the advantages of higher security and higher encryption operation speed, and the disadvantage that chip cost and power consumption are increased when hardware encryption is realized.
In conclusion, the SM3 hardware implementation has a large practical engineering application value for the current Internet of things security industry and intelligent hardware market. However, because of the message expansion feature based on the SM3 cryptographic hash algorithm, 132 message words need to be expanded, so that the algorithm needs 132 32-bit message word registers implemented in hardware, resulting in an excessive hardware area and excessive chip cost during hardware design.
Disclosure of Invention
The purpose of the application is to provide a hardware implementation device of an SM3 algorithm, which is used for solving the problems of overlarge hardware area and overlarge cost when the existing SM3 algorithm is implemented on hardware.
In order to achieve the above object, the present application proposes a technical solution of a hardware implementation device of a first SM3 algorithm, where the device includes:
16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: the operation of no reassignment from round 0 to round 11 and the operation of dynamic assignment from round 12 to round 63 are as follows: coding the 16 basic message word registers in sequence, assigning the message word in the next basic message word register to the previous basic message word register, and assigning the message word in the third dynamic message word register to the last basic message word register;
the 3 dynamic message word registers are used for dynamically storing message words in each round of expansion calculation, and the dynamic updating process of the message words from round 0 to round 11 is as follows:
Figure BDA0003075744470000021
the dynamic updating process of the message words from the 12 th round to the 63 rd round comprises the following steps:
Figure BDA0003075744470000022
wherein Wt1 is a first dynamic message word register; wt2 is a second dynamic message word register; w16 is a third dynamic message word register; WJ is the base message word register, j=0, 1, … …, 15.
The technical scheme of the hardware implementation device of the SM3 algorithm has the advantages that: the device only needs to set 19 registers, including 16 basic message word registers and 3 dynamic message word registers, completes SM3 algorithm through dynamic assignment rule, reduces the number of registers, further reduces the area of hardware device, saves cost and power consumption, and has practical engineering application value.
Further, each message word is 32 bits.
Further, before assigning the 16 basic message word registers, the method further includes the step of determining the number of data bits of the original message:
judging whether the bit number of the original message data meets the set bit, if not, filling in; if the number exceeds the set number, the message blocks are grouped according to the set number, and the remainder does not satisfy the filling of the set number.
Further, the system also comprises an interface module for receiving the original message data and outputting the encryption result of the SM3 algorithm.
Further, the system also comprises a FIFO storage module, wherein the FIFO storage module is connected with the interface module and is used for storing the original message data.
In addition, the application also provides a technical scheme of a hardware implementation device of the second SM3 algorithm, and the device comprises:
16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: the operation of no reassignment from round 0 to round 11 and the operation of dynamic assignment from round 12 to round 63 are as follows: encoding the 16 basic message word registers in sequence, assigning the message word in the next basic message word register to the previous basic message word register, and
Figure BDA0003075744470000031
assigning the result of (a) to the last basic message word register;
2 dynamic message word registers, which are used for dynamically storing message words in each round of expansion calculation, and the dynamic updating process of the message words from round 0 to round 11 is as follows:
Figure BDA0003075744470000032
the dynamic updating process of the message words from the 12 th round to the 63 rd round comprises the following steps:
Figure BDA0003075744470000033
wherein Wt1 is a first dynamic message word register; wt2 is a second dynamic message word register; WJ is the base message word register, j=0, 1, … …, 15.
The technical scheme of the hardware implementation device of the second SM3 algorithm has the advantages that: according to the device, only 18 registers are needed to be arranged, each register comprises 16 basic message word registers and 2 dynamic message word registers, an SM3 algorithm is completed through a dynamic assignment rule, the number of one register is reduced on the basis of the first technical scheme, the area of a hardware device is further reduced, the cost and the power consumption are further saved, and the device has practical engineering application value.
Further, each message word is 32 bits.
Further, before assigning the 16 basic message word registers, the method further includes the step of determining the number of data bits of the original message:
judging whether the bit number of the original message data meets the set bit, if not, filling in; if the number exceeds the set number, the message blocks are grouped according to the set number, and the remainder does not satisfy the filling of the set number.
Further, the system also comprises an interface module for receiving the original message data and outputting the encryption result of the SM3 algorithm.
Further, the system also comprises a FIFO storage module, wherein the FIFO storage module is connected with the interface module and is used for storing the original message data.
Drawings
Fig. 1 is a block diagram of a hardware implementation device of the SM3 algorithm of the present invention;
FIG. 2 is a schematic diagram of initial assignment of 16 basic message word registers, dynamic message word registers Wt1 and Wt2 of the present invention;
FIG. 3 is a schematic diagram of dynamic assignment of registers in accordance with the present invention.
Detailed Description
Hardware implementation device of SM3 algorithm example 1:
the main conception of the invention is that the device adopts 16 basic message word registers and 3 dynamic message word registers, and is based on the characteristic of SM3 algorithm: in the calculation of 64 rounds, 16 basic message word registers do not carry out reassignment in the calculation of 0 round to 11 round, and from the calculation of 12 round, 16 basic message word registers carry out dynamic assignment.
The hardware implementation device of the SM3 algorithm, as shown in fig. 1, includes an interface module (AHB interface) for receiving the original Message data (Message) and outputting the encryption Result (Result), where the module can enable the SM3 module to be mounted on the AHB bus, and the SM3 module can be accessed through the AHB bus;
further comprises: the system comprises a FIFO storage module for storing original message Data, a Read Data & Shift Byte module for reading the original message Data and splicing the original message Data, a Padding module Padding1&0 for Padding Data, a Padding length for Padding plaintext length and a A valid block Data module for 512-bit segmentation of the Data, wherein the modules are all used for judging the Data written by an AHB bus and then correspondingly performing Data operation (such as Data Padding) required by an SM3 algorithm, so that the operation Data to be input into the SM3 module accords with the algorithm requirement of the SM 3; inputting effective operation data to the SM3 module;
after the effective operation data is subjected to SM3 calculation expansion in the SM3 module, the calculation encryption Result (Finnal Result) is output through the AHB interface module. The SM3 module includes 16 basic message word registers W0, W1, W2, W3, … …, W15, respectively, with WJ representing the basic message word registers in the following calculations, j=0, 1, … …, 15. The 3 dynamic message word registers are W16 (third dynamic message word register), wt1 (first dynamic message word register), wt2 (second dynamic message word register).
Specifically, the process of implementing the SM3 algorithm by the hardware implementation device is as follows:
1) Input original message data is acquired.
According to the requirements of SM3 algorithm: a message block divided into 512 bits into a set of 16 message words of 32 bits each. The SM3 algorithm needs to expand 16 message words to 132 message words, i.e. 116 message words, and 64 rounds of computation are performed during the expansion process.
The original 16 message words are calculated by assignment and are respectively W 0 、W 1 、W 2 、W 3 、……、W 15 The extended 116 message words are W respectively 16 、W 17 、W 18 、W 19 、……、W 67 、W 0' 、W 1' 、W 2' 、W 3' 、……、W 63' . Of the 64 rounds of calculation, round 0 calculates W 0' Calculation of W in round 1 1' Calculation of W for round 11, … … 16 And W is 11' First, the12 rounds of calculation W 17 And W is 12' Calculation of W in 13 th round 18 And W is 13' And so on, round 62 calculates W 67 And W is 62' Calculation of W in 63 rd round 63' Subsequent use of W j 、W j' Representing 132 message words.
2) Judging whether the input message data has 512 bits (namely setting bits according to the bit number of the message word), and supplementing less than 512 bits according to the requirement of an SM3 algorithm; over 512 bits, the packets are grouped according to 512 bits of a message block, and the rest of 512 bits are complemented according to the requirements of the SM3 algorithm.
3) The 512-bit message block is divided into 16 message words and the initial 16 message words are assigned to the 16 base message word registers W0, W1, W2, W3, … …, W15 as shown in fig. 2.
The assignment mode is as follows:
Figure BDA0003075744470000051
where "msg" represents a 512-bit message block.
4) The expansion calculation of 64 rounds is performed, and the expansion calculation of 64 rounds comprises two operations:
for unification with the subscript j of the message word, the 64 rounds of computation are defined as round 0 through round 63, i.e., j may represent the number of rounds of computation, where the first is the 16 base message word registers no reassignment operation.
After the calculation of the 0 th round to the 11 th round, the 16 basic message word registers of W0, W1, W2, W3, … … and W15 are not reassigned, and the 2 dynamic message word registers of Wt1 and Wt2 are reassigned after each round of calculation; the value in the dynamic message word register of W16 may be calculated according to the values in the basic message word registers of W0, W7, W13, W3, W10, specifically:
Figure BDA0003075744470000052
since the underlying message registers are not reassigned, W is in round 0-11The size assigned in the dynamic message word register of 16 is:
Figure BDA0003075744470000053
W 16 will calculate W in round 12 12 ' use (the process assignment in the hardware implementation adopts non-blocking assignment, the non-blocking adopted in the hardware design carries out assignment in the current round, and the next round is acted on).
The 2 dynamic message word registers Wt1, wt2 are related to the values in the 16 underlying message registers as:
Figure BDA0003075744470000061
that is, the assignment of the 2 dynamic message word registers Wt1, wt2 is calculated as:
Figure BDA0003075744470000062
will W after round 0 calculation 0 Assigning to Wt1, W 0' Assigning the value to Wt2, … … and calculating W in 11 th round 11 Assigning to Wt1, W 11' Assigned to Wt2.
Where j=0, 1, … …, 11 is the subscript of the message word, and may also be used to represent the number of calculation rounds, j=0, representing the 0 th round of calculation.
Second dynamic assignment operation for 16 basic message word registers
In round 12 computation, the relationship between the values in the 2 dynamic message word registers and the other registers of Wt1 and Wt2 is:
Figure BDA0003075744470000063
as shown in FIG. 3, the 2 dynamic message word registers Wt1, wt2 respectively assign W 12 And W is 12' The specific assignment process is as follows:
w to be stored in dynamic message word register W16 16 And W stored in the base message word register W12 12 Obtaining W after exclusive OR 12' Assigned to Wt2, W stored in base message word register W12 12 Directly assigning to Wt1; simultaneously, the values in the W1, W2, W3, … … and W16 registers are shifted to the left by one register, and are respectively reassigned to the W0, W1, W2, W3, … … and W15 registers;
thereafter, the reassigned size W in W16 is calculated from the values in the basic message word registers W0, W7, W13, W3, W10 17 Since the value in the base message register has been left shifted to reassign value, the calculation formula for the specific message word is:
Figure BDA0003075744470000064
further calculate W 17 Assigned to the dynamic message word register W16.
In the 13 th round of calculation, the 2 dynamic message word registers Wt1 and Wt2 respectively store W 13 And W is 13' The specific assignment process is as follows:
w to be stored in dynamic message word register W16 17 And W stored in the base message word register W12 13 Obtaining W after exclusive OR 13' Assigned to Wt2, W stored in base message word register W12 13 Directly assigning to Wt1; simultaneously, the values in the W1, W2, W3, … … and W16 registers are shifted to the left by one register, and are respectively reassigned to the W0, W1, W2, W3, … … and W15 registers;
thereafter according to
Figure BDA0003075744470000065
Calculation of W 18 Assigned to the dynamic message word register W16.
And so on, in round 62 computation, W stored in dynamic message word register W16 66 And W stored in the base message word register W12 62 Obtaining W after exclusive OR 62' Assigned to Wt2, W stored in base message word register W12 62 Directly assigning to Wt1; simultaneously, the values in the W1, W2, W3, … … and W16 registers are shifted to the left by one register, and are respectively reassigned to W0,W1, W2, W3, … …, W15 registers;
thereafter according to
Figure BDA0003075744470000071
Calculation of W 67 Assigned to the dynamic message word register W16.
In round 63 computation, W stored in dynamic message word register W16 67 And W stored in the base message word register W12 63 Obtaining W after exclusive OR 63 ' assigned to Wt2, W stored in base message word register W12 63 Directly assigning to Wt1; and simultaneously, the values in the W1, W2, W3, … … and W16 registers are shifted one register to the left, and are respectively reassigned to the W0, W1, W2, W3, … … and W15 registers, so that the calculation is finished, and the expansion of 64 rounds and 132 message words is completed.
To sum up, the rule of dynamic assignment of the 16 basic message word registers of the 12 th round to the 63 rd round is summarized as follows: the 16 basic message word registers are encoded in sequence, the assignment in the next basic message word register is given to the previous basic message word register, and the message word of W16 in the dynamic message word register is given to the last basic message word register.
The process of calculating assignments with respect to the 3 dynamic message word registers W16, wt1, wt2 and the relationships with other underlying message word registers, and from the message words, is as follows:
Figure BDA0003075744470000072
Figure BDA0003075744470000073
where j=12, 13, … …, 63 is the subscript of the message word, and may also be used to represent the number of calculation rounds, j=12, represent round 12 calculation, and P1 is a permutation function.
The stored values of the 16 basic message word registers W0, W1, W2, W3, … …, W15 and the 3 dynamic message word registers W16, wt1, wt2 after the 12 th round of calculation are:
Figure BDA0003075744470000081
the values stored in the 16 basic message word registers W0, W1, W2, W3, … …, W15 and the 3 dynamic message word registers W16, wt1, wt2 after the 13 th round of calculation are:
Figure BDA0003075744470000082
and similarly, the message word expansion of 64 rounds is completed.
Before each round of calculation assignment is performed, the value of output A, B, C, D, E, F, G, H is calculated from the message word stored in the register, with the following calculation formula:
SS1=((A<<<12)+E+(T j <<<j))<<<7;
Figure BDA0003075744470000091
TT1=FF j (A,B,C)+D+SS2+Wt2;
TT2=GG j (E,F,G)+H+SS1+Wt1;
A=TT1;
B=A;
C=B<<<9;
D=C;
E=P0(TT2);
F=E;
G=F<<<19;
H=G;
Wt1=W j
Figure BDA0003075744470000092
wherein T is j Is constant, FF j (A,B,C)、GG j (E, F, G) is a Boolean function, P0, P1 are permutation functions, as shown below, "<" is a cyclic shift left symbol,
Figure BDA0003075744470000093
is an exclusive or symbol.
Figure BDA0003075744470000094
Figure BDA0003075744470000095
Figure BDA0003075744470000096
Figure BDA0003075744470000097
Figure BDA0003075744470000098
For example: after the 12 th round of calculation is finished, W is respectively stored in the 2 dynamic message word registers Wt1 and Wt2 12 And W is 12' Wheel 13 is first according to W 12 And W is 12' Calculate A, B, C, D, E, F, G, H, then calculate W 13' Then the assignment operation of each register is carried out, the 13 th round of calculation is finished, and W is respectively stored in Wt1 and Wt2 13 And W is 13'
5) Finally according to the calculated W of the 63 rd round 67 And W is 63' And outputting the final A, B, C, D, E, F, G, H in the 64 th round and performing exclusive OR calculation with the initialization parameters, and splicing the obtained results to obtain the final encryption result.
Calculated W due to round 0 0' Calculation A, B, C, D, E, F, G, H will be performed on round 1; thus, from round 1Each calculation by round 64 outputs A, B, C, D, E, F, G, H of one round, but in round 64, the calculation A, B, C, D, E, F, G, H is only calculated according to the values stored in the registers after the calculation by round 63 is finished, and only the calculation result obtained by round 64 is applied in the final output calculation, and after the encryption result is obtained, the SM3 algorithm calculation is finished.
In the above embodiment, the technology of the interface module is mature, and the corresponding modules with the same functions in the prior art can be adopted. Other memory modules may also be used in relation to the memory module, for example: memory storage modules, etc., to which the present invention is not limited.
In the above embodiment, due to the requirement of the SM3 algorithm, the step of determining the number of bits of the message data in step 2) may be performed without determining if the message data is 512 bits.
The invention realizes SM3 algorithm by the hardware realization device with 19 registers, reduces the number of registers, further reduces the area of the hardware realization device and saves the cost.
Hardware implementation device of SM3 algorithm example 2:
the hardware implementation device of this embodiment is different from embodiment 1 in the number of registers, and includes 16 basic message word registers and 2 dynamic message word registers, so that the number of dynamic message word registers W16 is reduced, the area of the hardware implementation device is reduced, and the cost is saved. Other structures of the hardware implementation device are the same as those of embodiment 1, and are not described here.
For this purpose, the hardware implementation method of the SM3 algorithm is in an extended 64-round calculation:
16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: the operation of no reassignment from round 0 to round 11 and the operation of dynamic assignment from round 12 to round 63 are as follows: words of 16 basic messagesThe memory encodes in sequence, assigns the message word in the next basic message word register to the previous basic message word register, and assigns
Figure BDA0003075744470000101
Assigning the result of (a) to the last basic message word register; the same as the assignment calculation of the dynamic message word register W16 in embodiment 1, but the calculation result is directly assigned here, without a special dynamic message word register.
2 dynamic message word registers, which are used for dynamically storing message words in each round of expansion calculation, and the dynamic update process of each round of message words is as follows:
Figure BDA0003075744470000111
wherein Wt1 is a first dynamic message word register; wt2 is a second dynamic message word register.
The process of dynamically assigning 2 dynamic message word registers and assigning 16 basic message word registers is the same as in embodiment 1, and will not be described here.

Claims (10)

1. A hardware implementation device of SM3 algorithm, comprising:
16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: the operation of no reassignment from round 0 to round 11 and the operation of dynamic assignment from round 12 to round 63 are as follows: coding the 16 basic message word registers in sequence, assigning the message word in the next basic message word register to the previous basic message word register, and assigning the message word in the third dynamic message word register to the last basic message word register;
the 3 dynamic message word registers are used for dynamically storing message words in each round of expansion calculation, and the dynamic updating process of the message words from round 0 to round 11 is as follows:
Figure FDA0004177037700000011
the dynamic updating process of the message words from the 12 th round to the 63 rd round comprises the following steps:
Figure FDA0004177037700000012
wherein Wt1 is a first dynamic message word register; wt2 is a second dynamic message word register; w16 is a third dynamic message word register; WJ is the base message word register, j=0, 1, … …, 15; p1 is a permutation function.
2. The SM3 algorithm hardware implementation of claim 1, wherein each message word is 32 bits.
3. The hardware implementation device of the SM3 algorithm according to claim 1 or 2, further comprising the step of determining the number of original message data bits before assigning the 16 basic message word registers:
judging whether the bit number of the original message data meets the set bit, if not, filling in; if the number exceeds the set number, the message blocks are grouped according to the set number, and the remainder does not satisfy the filling of the set number.
4. The hardware implementation device of the SM3 algorithm according to claim 1 or 2, further comprising an interface module for receiving the original message data and outputting the encryption result of the SM3 algorithm.
5. The SM3 algorithm hardware implementation device of claim 4, further comprising a FIFO storage module connected to the interface module for storing the raw message data.
6. A hardware implementation device of SM3 algorithm, comprising:
16 basic message word registers, first storing the initial 16 message words, then operating on the 16 basic message word registers in a 64-round expansion calculation for the SM3 algorithm, the operations comprising: the operation of no reassignment from round 0 to round 11 and the operation of dynamic assignment from round 12 to round 63 are as follows: encoding the 16 basic message word registers in sequence, assigning the message word in the next basic message word register to the previous basic message word register, and
Figure FDA0004177037700000021
assigning the result of (a) to the last basic message word register;
2 dynamic message word registers, which are used for dynamically storing message words in each round of expansion calculation, and the dynamic updating process of the message words from round 0 to round 11 is as follows:
Figure FDA0004177037700000022
the dynamic updating process of the message words from the 12 th round to the 63 rd round comprises the following steps:
Figure FDA0004177037700000023
/>
wherein Wt1 is a first dynamic message word register; wt2 is a second dynamic message word register; WJ is the base message word register, j=0, 1, … …, 15; p1 is a permutation function.
7. The SM3 algorithm hardware implementation of claim 6, wherein each message word is 32 bits.
8. The SM3 algorithm hardware implementation device according to claim 6 or 7, further comprising the step of determining the number of original message data bits before assigning the 16 basic message word registers:
judging whether the bit number of the original message data meets the set bit, if not, filling in; if the number exceeds the set number, the message blocks are grouped according to the set number, and the remainder does not satisfy the filling of the set number.
9. The hardware implementation device of the SM3 algorithm according to claim 6 or 7, further comprising an interface module for receiving the original message data and outputting the encryption result of the SM3 algorithm.
10. The hardware implementation of the SM3 algorithm of claim 9, further comprising a FIFO storage module connected to the interface module for storing the raw message data.
CN202110552612.1A 2021-05-20 2021-05-20 SM3 algorithm hardware implementation device Active CN113300829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110552612.1A CN113300829B (en) 2021-05-20 2021-05-20 SM3 algorithm hardware implementation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110552612.1A CN113300829B (en) 2021-05-20 2021-05-20 SM3 algorithm hardware implementation device

Publications (2)

Publication Number Publication Date
CN113300829A CN113300829A (en) 2021-08-24
CN113300829B true CN113300829B (en) 2023-06-09

Family

ID=77323180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110552612.1A Active CN113300829B (en) 2021-05-20 2021-05-20 SM3 algorithm hardware implementation device

Country Status (1)

Country Link
CN (1) CN113300829B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116260572B (en) * 2023-02-21 2024-01-23 成都海泰方圆科技有限公司 Data hash processing method, data verification method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106575215A (en) * 2014-09-04 2017-04-19 英特尔公司 Emulation of fused multiply-add operations
EP3338397A1 (en) * 2015-08-19 2018-06-27 Intel Corporation Instructions and logic to provide simd sm3 cryptographic hashing functionality
CN110022203A (en) * 2019-03-15 2019-07-16 深圳市纽创信安科技开发有限公司 A kind of SM3 acceleration method and device
CN112202546A (en) * 2020-09-29 2021-01-08 山东华翼微电子技术股份有限公司 SM3 cryptographic hash algorithm message expansion serial optimization system and method
CN112367158A (en) * 2020-11-06 2021-02-12 海光信息技术股份有限公司 Method for accelerating SM3 algorithm, processor, chip and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10097345B2 (en) * 2015-04-14 2018-10-09 PeerNova, Inc. Secure hash algorithm in digital hardware for cryptographic applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106575215A (en) * 2014-09-04 2017-04-19 英特尔公司 Emulation of fused multiply-add operations
EP3338397A1 (en) * 2015-08-19 2018-06-27 Intel Corporation Instructions and logic to provide simd sm3 cryptographic hashing functionality
CN110022203A (en) * 2019-03-15 2019-07-16 深圳市纽创信安科技开发有限公司 A kind of SM3 acceleration method and device
CN112202546A (en) * 2020-09-29 2021-01-08 山东华翼微电子技术股份有限公司 SM3 cryptographic hash algorithm message expansion serial optimization system and method
CN112367158A (en) * 2020-11-06 2021-02-12 海光信息技术股份有限公司 Method for accelerating SM3 algorithm, processor, chip and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Openrisc的TPCM架构设计;曹慧渊等;《信息工程大学学报》;20110415(第02期);正文第1-5页 *
基于TEE的主动可信TPM/TCM设计与实现;董攀等;《软件学报》;20200515(第05期);正文第1-14页 *

Also Published As

Publication number Publication date
CN113300829A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
CN108052805B (en) Data encryption and decryption method and device
WO2021109696A1 (en) Data compression and decompression methods and devices, and data compression and decompression-based processing method and device
CN110635807A (en) Data coding method and decoding method
CN113300829B (en) SM3 algorithm hardware implementation device
CN107534549B (en) Readable storage medium, method and system for encrypting data stream block
CN116522300B (en) Intelligent management system for electronic seal
CN115426101B (en) Data transmission method of cloud intercommunication platform
CN114629622B (en) FPGA-based national cryptographic algorithm accelerated operation control method and device
CN116318660B (en) Message expansion and compression method and related device
CN111967026A (en) Method and device for encrypting and decrypting redemption code and computer equipment
CN114826560B (en) Lightweight block cipher CREF implementation method and system
CN109951275B (en) Key generation method and device, computer equipment and storage medium
JP2009169316A (en) Hash function operational device, signature device, program and hash function operational method
CN115952517A (en) Method and system for calculating hash value
WO2023000577A1 (en) Data compression method and apparatus, electronic device, and storage medium
CN110034919A (en) A kind of variable-length authenticating tag generation method and communication means and system suitable for ZUC-256 stream cipher arithmetic
CN107566123A (en) PPTP VPN passwords methods of calibration and computer-readable recording medium
CN110505051B (en) Character string hash processing method and device
CN115967493A (en) Hash pre-image zero-knowledge proof circuit generation method and device based on SM3 cryptographic key
CN110278055B (en) Tail-biting convolutional coding processing method and device and communication equipment
CN112054808B (en) Coding method and device of Polar code
CN114499860A (en) Signature public key compression method and device, computer equipment and storage medium
CN112054889B (en) Method and device for generating message authentication code and computer readable storage medium
CN111857651B (en) Method for parallel addition of multiple small bits by multi-bit adder and application thereof
CN117032799A (en) Abstract calculator and abstract calculating method

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
CP01 Change in the name or title of a patent holder

Address after: Room 4005, block a, block 8, area C, Wanke Yuncheng phase III, Liuxin 4th Street, Xili community, Xili street, Nanshan District, Shenzhen, Guangdong 518000

Patentee after: Shenzhen Smart Microelectronics Technology Co.,Ltd.

Address before: Room 4005, block a, block 8, area C, Wanke Yuncheng phase III, Liuxin 4th Street, Xili community, Xili street, Nanshan District, Shenzhen, Guangdong 518000

Patentee before: SPL ELECTRONIC TECHNOLOGY CO.,LTD.

CP01 Change in the name or title of a patent holder