GM/T 0009-2023 English PDF
Price & Delivery
US$230.00 · In stock · Download in 9 secondsGM/T 0009-2023: SM2 cryptography algorithm application specification
Delivery: 9 seconds. True-PDF full-copy in English & invoice will be downloaded + auto-delivered via email. See step-by-step procedure
Status: Valid
GM/T 0009: Historical versions
| Standard ID | USD | BUY PDF | Delivery | Standard Title (Description) | Status |
| GM/T 0009-2023 | 230 | Add to Cart | Auto, 9 seconds. | SM2 cryptography algorithm application specification | Valid |
| GM/T 0009-2012 | 85 | Add to Cart | Auto, 9 seconds. | SM2 cryptography algorithm application specification | Obsolete |
Click to Preview this PDF
Similar standards
GM/T 0009-2023: SM2 cryptography algorithm application specification
---This is an excerpt. Full copy of true-PDF in English version (including equations, symbols, images, flow-chart, tables, and figures etc.), auto-downloaded/delivered in 9 seconds, can be purchased online: https://www.ChineseStandard.net/PDF.aspx/GMT0009-2023GM NATIONAL CRYPTOGRAPHIC INDUSTRY STANDARD ICS 35.030 CCS L 80 GM/T 0009-2023 Replacing GM/T 0009-2012 SM2 cryptography algorithm application specification Issued on: DECEMBER 04, 2023 Implemented on: JUNE 01, 2024 Issued by. National Cryptography Administration
Table of Contents
Foreword... 3 1 Scope... 4 2 Normative references... 4 3 Terms and definitions... 4 4 Abbreviations... 5 5 SM2 key pair... 5 6 Data conversion... 5 7 Data format... 7 8 Preprocessing... 8 9 Calculation process... 10 10 Default values of user identity ID... 14 SM2 cryptography algorithm application specification1 Scope
This document defines the application method of SM2 cryptographic algorithm and also defines the relevant data format. This document applies to the application of SM2 cryptographic algorithm, and also applies to the development and testing of devices and systems that support SM2 cryptographic algorithm.2 Normative references
The following referenced documents are indispensable for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. GB/T 32905-2016 Information security techniques - SM3 cryptographic hash algorithm GB/T 32918.1-2016 Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 1.General GB/T 32918.2-2016 Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 2.Digital signature algorithm GB/T 32918.3-2016 Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 3.Key exchange protocol GB/T 32918.4-2016 Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 4.Public key encryption algorithm GB/T 32918.5-2017 Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 5.Parameter definition GM/T 0006 Cryptographic application identifier criterion specification GM/Z 4001 Cryptographic terminology3 Terms and definitions
For the purpose of this document, the terms and definitions defined in GM/Z 4001 apply.4 Abbreviations
For the purpose of this document, the following abbreviations apply. ECB. Electronic Codebook ECC. Elliptic Curve Cryptography ID. Identity5 SM2 key pair
5.1 SM2 private key SM2 private key is an integer greater than or equal to 1 and less than n - 1 (n is the order of SM2 algorithm, its value is shown in GB/T 32918.5-2017), abbreviated as d. 5.2 SM2 public key SM2 public key is a point on SM2 curve, represented by two components, the horizontal coordinate and the vertical coordinate, denoted as (x, y), abbreviated as Q. The public key value is calculated by multiplying the corresponding private key d with G (G is the base point of SM2 elliptic curve, and the value of G is shown in GB/T 32918.5-2017).6 Data conversion
6.1 Conversion from bit string to 8-bit byte string If the length of the bit string is not an integer multiple of 8, it shall be padded with 0 on the left to ensure that its length is a multiple of 8, and then construct an 8-bit byte string. The conversion process is as follows. Input. A bit string B of length blen. Output. A byte string M of length mlen, where the value of mlen is the integer part of (blen + 7)/8. Action. Convert the bit string B = B0B1...Bblen-1 to an 8-bit byte string M = M0M1...Mmlen-1 using the following method. From 0 ≤ i ≤ mlen-1, set. Mi = Bblen-8-8(mlen-1-i)Bblen-7-8(mlen-1-i)...Bblen-1-8(mlen-1-i). For M0, the leftmost 8-blen % 8 bits are set to 0, and the rightmost bits are set to B0B1...B7+blen-8mlen, where % represents the modulo operation. Output M. 6.2 Conversion from 8-bit byte string to bit string The conversion process from 8-bit byte string to bit string is as follows. Input. An 8-bit byte string M of length mlen. Output. A bit string B of length blen = (8 * mlen). Action. Convert the 8-bit byte string M = M0M1...Mmlen-1 to the bit string B = B0B1...Bblen-1 using the following method. From 0 ≤ i ≤ mlen-1, set. B8iB8i+1...B8i+7 = Mi. Output B. 6.3 Conversion from integer to 8-bit byte string The basic method of converting an integer to an 8-bit byte string is to first express it in binary and then convert the resulting bit string to an 8-bit byte string. The conversion process is as follows. Input. A non-negative integer x, the expected 8-bit byte string length mlen. The basic restriction is. 28(mlen) > x. Output. An 8-bit byte string M of length mlen. Action. Convert the x value x = xmlen-128(mlen-1) + xmlen-228(mlen-2) +...+ x128 + x0 based on 28 = 256 to an 8-bit byte string M = M0M1...Mmlen-1 using the following method. From 0 ≤ i ≤ mlen-1, set. Mi = xmlen-1-i. Output M. 6.4 Conversion from 8-bit byte string to integer The 8-bit byte string can be regarded as an integer represented in base 256.The conversion process is as follows. Input. An 8-bit byte string M of length mlen. Output. An integer x. Action. Convert an 8-bit byte string M = M0M1...Mmlen-1 to an integer x using the following method. Consider Mi as an integer in [0 ~ 255], then.. Output x.7 Data format
7.1 Key data format The ASN.1 definition of SM2 algorithm private key data format is. SM2PrivateKey.. = INTEGER The ASN.1 definition of SM2 algorithm public key data format is. SM2PublicKey.. = BIT STRING SM2PublicKey is of BIT STRING type, and its content is 04 ǁ X ǁ Y, 02 ǁ X or 03 ǁ X, where X and Y are both 256 bits, representing the x component and y component of the public key respectively. 04 ǁ X ǁ Y is the uncompressed format of SM2 algorithm public key data, and 02 ǁ X and 03 ǁ X are both compressed formats of SM2 algorithm public key data. When the lowest bit of the y component of the public key is 0, the compressed format of the public key is 02 ǁ X. When the lowest bit of the y component of the public key is 1, the compressed format of the public key is 03 ǁ X. The SM2 public key format shall comply with the provisions of A.5 in GB/T 32918.1-2016. ......Source: Above contents are excerpted from the full-copy PDF -- translated/reviewed by: www.ChineseStandard.net / Wayne Zheng et al.