GB/T 32905-2016Information security techniques - SM3 cryptographic hash algorithm (English PDF)
信息安全技术 SM3 密码杂凑算法
This is a limited preview
Buy now to download the full PDF (16 pages)
Need quotation for your management?
Get a formal quotation for GB/T 32905-2016 in 30 minutes.
Issued by
AQSIQ; SAC
Level / Type
National · Recommended
Issue date
August 29, 2016
Implementation date
March 1, 2017
Scope
GB/T 32905-2016 is the English-translated version of 信息安全技术 SM3 密码杂凑算法.
This Standard specifies the calculation method and calculation steps of the SM3 cryptographic hash algorithm, and gives examples of calculations.
It applies to digital signature and verification in commercial cryptographic applications, the generation and verification of message authentication codes, and the generation of random numbers, meeting the security requirements of a variety of cryptographic applications.
Found what you need?
Document preview — GB/T 32905-2016
National Standard of the People's Republic of China
- ICS
- 35.040
- Classification
- L 80
Issued by: General Administration of Quality Supervision, Inspection and Quarantine; Standardization Administration of the People’s Republic of China.
Contents
- Foreword3
- 1 Scope4
- 2 Terms and definitions4
- 3 Symbols5
- 4 Constants and functions5
- 5 Algorithm description6
- Appendix A (Informative) Calculation examples
Foreword
This Standard was drafted in accordance with the rules given in GB/T 1.1-2009.
This Standard was proposed by State Cryptography Administration.
This Standard shall be under the jurisdiction of National Information Security Standardization Technical Committee (SAC/TC 260).
The drafting organizations of this Standard: Tsinghua University, Commercial Cryptography Testing Center of State Cryptography Administration, PLA Information Engineering University, Data Assurance & Communications Security Center, Chinese Academy of Sciences.
The drafters of this Standard: Wang Xiaoyun, Li Zheng, Wang Yongchuan, Yu Hongbo, Xie Yongquan, Zhang Chao, Luo Peng, Lv Shuwang.
1 Scope
This Standard specifies the calculation method and calculation steps of SM3 cryptographic hash algorithm, and gives examples of calculations.
This Standard applies to digital signature and verification in commercial cryptographic applications, the generation and verification of message authentication codes, and the generation of random numbers. It can meet the security requirements of a variety of cryptographic applications.
2 Terms and definitions
The following terms and definitions are applicable to this document.
2.2 Big-endian
A representation format of data in memory, which stipulates that the left side is the most significant bit and the right side is the least significant bit. […]
2.3 Message
Any bit string of finite length. In this Standard, message is used as the input data of the hash algorithm.
2.4 Hash value
The output message digest (bit string) when the hash algorithm is applied to a message.
2.5 Word
A group (string) whose length is 32 bits.
3 Symbols
The following symbols apply to this document.
FFj: boolean function; take different expressions as j changes GGj: boolean function; take different expressions as j changes IV: initial value; it is used to determine the initial state of the compression function register P0: permutation function in compression function P1: permutation function in message expansion Tj: algorithm constant; take different values as j changes m: message m': filled message mod: modular arithmetic 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 addition operation <<<k: 32-bit cyclic left shift k-bit operation ←: left assignment operator
4 Constants and functions
4.1 Initial value
4.2 Constant
4.3 Boolean function
Where X, Y, Z are words
5 Algorithm description
5.1 Overview
The input of SM3 cryptographic hash algorithm is a message m whose length is l (l<264) bits. After filling and iterative compression, a hash value is generated. The output length of the hash value is 256 bits. See Appendix A for calculation examples.
5.2 Filling
Assuming that the length of the message m is l bits, first add the bit “l” to the end of the message; then, add k “0”s. K is the smallest non-negative integer that satisfies l+1+k≡448 (mod 512). Then, add a 64-bit bit string, which is a binary representation of length l. The bit length of the filled message m’ is a multiple of 512.
5.3 Iterative compression
5.3.2 Message extension
Extend the message group B(i) by the following method to generate 132 message words W0, W1, … W67, W’0, W’1, … W’63, which are used for the compression function CF:
5.4 Output hash value
The output 256-bit hash value y = ABCDEFGH.
Appendix A Calculation examples
A.1 Example 1
A.1.2 Filled message
A.1.3 Extended message
A.1.4 Iterative compression intermediate value
A.1.5 Hash value
A.2 Example 2
A.2.1 512-bit message
A.2.2 Filled message
A.2.3 The first message group
A.2.3.1 Extended message
A.2.3.2 Iterative compression intermediate value
A.2.4 The second message group
A.2.4.2 Iterative compression intermediate value
A.2.4.3 Hash value
......
This preview omits tables, figures, formulas and parts of the technical clauses. The complete document — 16 pages — is available in the English PDF.
Referenced standards
Cited by
- GB/T 47229.2-2026Electronic records of laws and regulations - Part 2: Technical requirements
- GB/T 19771-2025Cybersecurity technology — Public key infrastructure — Specification for minimum interoperability for PKI components
- GB/T 26232-2025Information technology — Middleware — Technical requirement for application server middleware
- GB/T 45498.3-2025Specifications for the social security card one-card-pass of the People's Republic of China - Part 3: Security specifications
- GB/T 46067-2025Citywide digital transformation — General requirements for object identification system of city entity
- GB/T 46798-2025Cybersecurity technology - Technical requirements for cryptography and related security of identity-based cryptographic authentication systems
How to Download GB/T 32905-2016
- 1
Add to cart
Click "Download PDF" on this page and choose "Buy this standard". You can add more standards before checkout.
- 2
Checkout
Enter your email and billing details. Payment is processed securely by Stripe (cards or bank transfer). Prefer bank details? Request a quotation (min. order $300).
- 3
Instant delivery (0–9 sec)
Delivery is automatic: within seconds of payment you'll receive an email with a secure download link. The link stays valid for 72 hours.
- 4
Invoice included
A tax invoice is attached to the confirmation email. Need a custom invoice? Contact us.
Related Standards
GB/T 10003-2026 — Biaxially oriented polypropylene (BOPP) film
GB/T 10007-2026 — Rigid cellular plastics - Determination of shear properties
GB/T 10009-2026 — Acrylonitrile-butadiene-styrene (ABS) plastic extruded sheets
Secure payment via Stripe
Payments accepted
GB/T 32905-2016
$195.00