Skip to product information
1 of 6

PayPal, credit cards. Download editable-PDF and invoice in 1 second!

GM/T 0004-2012 English PDF (GMT0004-2012)

GM/T 0004-2012 English PDF (GMT0004-2012)

Regular price $160.00 USD
Regular price Sale price $160.00 USD
Sale Sold out
Shipping calculated at checkout.
Quotation: 24-hr self-service. Click GM/T 0004-2012
See Chinese contents: GM/T 0004-2012

GM/T 0004-2012: SM3 cryptographic hash algorithm

This Standard applies to the digital signature-verification in commercial cryptography applications, the generation-verification of message authentication codes, and the generation of random numbers, which can satisfy the security requirements for multiple cryptography applications. Meanwhile, this Standard can also provide security product manufacturers with standard positioning for products and technologies as well as references for standardization, so as to improve the creditability and interoperability of security products.
GM/T 0004-2012
GM
CRYPTOGRAPHY INDUSTRY STANDARD
OF THE PEOPLE REPUBLIC OF CHINA
ICS 35.040
L 80
RECORD NO.. 36831-2012
SM3 cryptography hash algorithm
ISSUED ON. MARCH 21, 2012
IMPLEMENTED ON. MARCH 21, 2012
Issued by. State Cryptography Administration of the PEOPLE Republic of China
Table of Contents
Foreword ... 3
1 Scope .. 4
2 Terms and conventions ... 4
3 Symbols ... 5
4 Constants and functions .. 6
4.1 Initial value .. 6
4.2 Constant ... 6
4.3 Boolean function ... 6
4.4 Permutation function ... 6
5 Description of algorithm ... 6
5.1 Overview .. 6
5.2 Populating ... 6
5.3 Iterative compression ... 7
5.4 Hash value .. 8
Annex A (Informative) Examples of operation .. 9
A.1 Example 1 ... 9
A.2 Example 2 .. 11
Foreword
This Standard is drafted in accordance with the rules given in GB/T 1.1-2009. Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The issuer of this document shall not be held responsible for identifying any or all such patent rights.
Annex A to this Standard is informative.
This Standard was proposed by and shall be under the jurisdiction of the State Cryptography Administration.
The drafting organizations of this Standard. Tsinghua University, State Cryptography Administration Commercial Cryptography Testing Center, PLA Information Engineering University, The Data Assurance and Communication Security Research Center of Chinese Academy of Sciences.
The main drafters of this Standard. Wang Xiaoyun, Li Zheng, Yu Hongbo,
Zhang Chao, Luo Peng, Lv Shuwang.
SM3 cryptography hash algorithm
1 Scope
This Standard specifies the calculation method and calculation procedures of SM3 cryptography hash algorithm; and gives operational examples.
This Standard applies to the digital signature-verification in commercial cryptography applications, the generation-verification of message
authentication codes, and the generation of random numbers, which can satisfy the security requirements for multiple cryptography applications. Meanwhile, this Standard can also provide security product manufacturers with standard positioning for products and technologies as well as references for
standardization, so as to improve the creditability and interoperability of security products.
2 Terms and conventions
For the purposes of this document, the following terms and definitions apply. 2.1
bit string
Digital sequence of binary number 0 or 1.
2.2
big-endian
A representation format of data in memory, whose significant bits are specified to be on the left and less significant bits on the right. The high-order bytes of numbers are placed at lower addresses of memory while the low-order bytes of numbers are placed at high addresses of memory.
2.3
message
Bit string of random finite length. Message in this Standard is deemed as the input data of hash algorithm.
2.4
hash value
Message digest (bit string) output when hash algorithm acts on a message. 2.5
word
Group (string) which is 32 bits long.
3 Symbols
For the purposes of this Standard, the following symbols apply.
ABCDEFGH. 8-word register or series of their values
B(i). the i-th message group
CF. compression function
FFj.
boolean function, which is expressed according to the change of
GGj.
boolean function, which is expressed according to the change of
IV.
Initial value, which is used to determine the initial state of
compression function register
P0. permutation function in compression function
P1. permutation function in message extension
Tj. algorithmic constant
m. message
m'. populated message
mod. modulo operation
n. number of message groups
32-bit AND operation
32-bit OR operation
32-bit exclusive-OR operation
32-bit NOT operation
mod-232-bit arithmetic additive operation
32-bit ring shift left operation by k bits
Left assignment operator
5.3 Iterative compression
5.3.1 Iteration process
Divide the populated message m?€? into groups by 512 bits.
where .
Iterate m?€? as follows.
where CF is compression function, V(0) is 256-bit initial value IV, B(i) is populated message group and the result of iterative compression is V (n).
5.3.2 Message extension
Extent the message group B(i) to generate 132 message words as follows, i.e. W0, W1, ., W67, W?€?0, W?€?1, . W?€?63, for compression function CF.
a) divide the message group B(i) into 16 words, i.e. W0, W1, ., W15.
5.3.3 Compression function
Let A, B, C, D, E, F, G and H be word registers, SS1, SS2, TT1 and TT2
intermediate variables, and compression function V(i+1) = CF (V(i), B(i)) (0 ??? i ??? n- 1). The calculation process is described as follows.
123 bits 64 bits
Binary representation of l

View full details