GB/T 32918.1-2016Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 1: General (English PDF)
信息安全技术 SM2椭圆曲线公钥密码算法 第1部分:总则
This is a limited preview
Buy now to download the full PDF (37 pages)
Need quotation for your management?
Get a formal quotation for GB/T 32918.1-2016 in 30 minutes.
Issued by
SAMR; SAC
Level / Type
National · Recommended
Issue date
August 29, 2016
Implementation date
March 1, 2017
Scope
GB/T 32918.1-2016 is the English-translated version of 信息安全技术 SM2椭圆曲线公钥密码算法 第1部分:总则.
GB/T 32918.1-2016 is the Chinese standard "Information security technology - Public key cryptographic algorithm SM2 based on elliptic curves - Part 1: General".
Its scope clause reads: This part of GB/T 32918 specifies the necessary mathematical basics and related cryptography techniques which are involved in the SM2 elliptic curve's public key cryptography algorithm, to help implement the cryptographic mechanisms as specified in other parts.
This part is applicable to the design, development and use of elliptic curve's public key cryptography algorithms of which the base field is prime field and binary field. [Translator note: In Chinese, there is only single word corresponding to mathematic “domain” and “field” (identical in Chinese).
Therefore, in this translation, “field” and “domain” can be replaced each other where applicable (exchangeable); likewise, limited domain finite field]. Its clauses include symbols and abbreviations; data types and their conversion; key pair generation and public key verification.
Found what you need?
Document preview — GB/T 32918.1-2016
National Standard of the People's Republic of China
- ICS
- 35.040
- Classification
- L 80
Issued by: State Administration for Market Regulation; Standardization Administration of the PRC
Contents
- Foreword4
- Introduction5
- 1 Scope7
- 2 Symbols and abbreviations7
- 3 Field and elliptic curve9
- 3.1 Finite field9
- 3.2 Elliptic curve over a finite field10
- 4 Data types and their conversion14
- 4.1 Data types14
- 4.2 Data type conversion15
- 5 Elliptic curve system parameters and their verification19
- 5.1 General requirements20
- 5.2 Elliptic curve system parameters on F p and its verification20
- 5.3 Elliptic curve system parameters on and its verification21
- 6 Key pair generation and public key verification23
- 6.1 Key pair generation23
- 6.2 Verification of the public key23
- Appendix A (Informative) Background knowledge about elliptic curves25
- A.1 Prime field F p25
- A.2 Binary extension-field29
- A.3 Elliptic curve's multiple-point-multiplication operation46
- A.4 Method for solving discrete logarithm problem of elliptic curve50
- A.5 Compression of points on elliptic curves53
- Appendix B (Informative) Number theory algorithm55
- B.1 Finite field and modulo operations55
- B.2 Polynomials over a finite field62
- B.3 Elliptic curve algorithm66
- Appendix C (Informative) Curve example68
- C.1 General requirements68
- C.2 Elliptic curve on F p68
- C.3 Elliptic curve on69
- parameters of elliptic curve equation71
- D.1 Quasi-random generation of parameters of elliptic curve equation71
- D.2 Verification of parameters of elliptic curve equation72
- References74
1 Scope
This part of GB/T 32918 specifies the necessary mathematical basics and related cryptography techniques which are involved in the SM2 elliptic curve's public key cryptography algorithm, to help implement the cryptographic mechanisms as specified in other parts.
This part is applicable to the design, development and use of elliptic curve's public key cryptography algorithms of which the base field is prime field and binary field. [Translator note: In Chinese, there is only single word corresponding to mathematic “domain” and “field” (identical in Chinese).
Therefore, in this translation, “field” and “domain” can be replaced each other where applicable (exchangeable); likewise, limited domain finite field]
2 Symbols and abbreviations
The following symbols and abbreviations apply to this document.
B: MOV threshold. A positive number B, such that the discrete logarithm from is obtained at least same difficult as obtaining the elliptic curve from Fq .
deg(f): The number of times the polynomial f (x).
E: An elliptic curve which is defined by a and b over a finite field.
E(Fq ): A set of all rational points of the elliptic curve E (including the infinity point
O) on Fq .
ECDLP: Elliptic curve's discrete logarithm problem.
Fp : A prime field which contains p elements.
Fq : A finite field which contains q elements.
Fq *: A multiplicative group which is constituted by all non-zero elements in Fq .
3.1.3 Binary extension-field
When q is a power 2 m of 2, the binary extension can be regarded as an m-dimensional vector space on F2 , its elements can be represented by a bit string of length m.
The elements in have multiple representations, the two most common of which are polynomial-based (PB) representations (see A.2.1.1) and normal basis (NB) representations (see A.2.1.3). The selection principle of the base is to make the operation efficiency in as high as possible. This part does not specify the choice of the base. The binary extension-field will be described below by taking a polynomial-based representation as an example.
Let m irreducible polynomial f (x) = x m
+ f m -1 x m - 1
+ ... + f 2 x
2
+ f 1 x + f 0 (where f i in F2 , i = 0, 1, ..., m - 1) is the reduced polynomial of the binary extension-field
. consists of all polynomials on F2 that are less than m. The polynomial set {x m - 1 , x m - 2 , ..., x, 1} is a set of bases of on F2 , which is called the polynomial-base. The coefficient of any element a (x) = a m-1 x m-1
+ a m-2 x m-2
+ ...
+ a1 x + a0 in constitutes a bit string of length m on F2 , which is indicated by a = (am - 1 , am - 2 , ..., a1 , a0 ). The polynomial field characteristics are as follows:
a) Zero 0 is represented by an all-zero bit string;
b) Multiplication unit element 1 is represented by bit string 00...001;
c) The addition of two field elements is a bitwise XOR operation of the bit string;
d) The multiplication of the field elements a and b is defined as follows: Let the polynomials of F2 corresponding to a and b be a (x) and b (x), then a
· b is defined as the bit string corresponding to polynomial (a (x) b (x)) mod f (x).
3.2 Elliptic curve over a finite field
An elliptic curve on a finite field F q is a collection of points. In the affine […]
3.2.6 Weak elliptic curve
If an elliptic curve has an attack method that is better than the calculation complexity of n
1/2 level (n is the order of the base point), the curve is called a weak elliptic curve. Weak elliptic curves are prohibited in this part.
The hypersingular curve on F q [feature divisibility q +1- # E (F q ) of finite field F q ] and the anomalous curve [# E (Fp ) = p] on Fp are weak elliptic curves.
4 Data types and their conversion
4.1 Data types
In this part, data types include bit strings, byte strings, field elements, points on elliptic curves, and integers.
Bit string: An ordered sequence of 0's and 1's.
Byte string: An ordered sequence of bytes, in which 8 bits form 1 byte.
Field element: An element in the finite field Fq .
Point on elliptic curve: point P in E (Fq ) on an elliptic curve, or a pair of field elements (xP , yP ), where the field elements xP and y P satisfy the elliptic curve equation, or the infinity point O.
The byte string representation of a point has multiple forms, it is identified by a one-byte PC. The byte string representation of the infinity point O is a single zero byte PC = 00. The non-infinity point P = (xP , yP ) has the following three byte string representations:
a) Compressed representation, PC = 02 or 03;
b) Uncompressed representation, PC = 04;
c) Mixed representation, PC = 06 or 07.
Note: Mixed representations contain both compressed and uncompressed […]
5.1 General requirements
Elliptic curve's system parameters are publicly available, the security of the system does not depend on the confidentiality of these parameters. This part does not specify the method for generating elliptic curve's system parameters, but specifies the verification method for system parameters. The calculation of the elliptic curve order and the selection method of the base point can be found in B.3 of Appendix B, the method of generating the curve parameters can be found in Appendix D.
The elliptic curve's system parameters can be divided into two cases in accordance with the different base fields:
- When the base field is Fp (p is a prime number greater than 3), the elliptic curve's system parameters on F p ;
- When the base field is , the elliptic curve's system parameters on .
5.2 Elliptic curve's system parameters on Fp and its verification
5.2.1 Elliptic curve's system parameters on F p
The elliptic curve's system parameters on Fp include:
a) The size of the field q = p, p is a prime number greater than 3;
b) (Optional) a bit string SEED of length at least 192 (if an elliptic curve is generated as described in Appendix D);
c) Two elements a and b in F p , which define the equation of elliptic curve E:
y
2
= x3 + ax + b;
d) Base point G = (xG, yG) in E (Fp ), G!=O;
e) The order n of the base point G (requirement: n > 2
191 and n > 4p
1/2
);
f) (Optional) cofactor h = # E (Fp ) / n.
5.2.2 Verification of elliptic curve's system parameters on Fp
The generator of the elliptic curve's system parameters shall verify the following conditions. The user of the elliptic curve's system parameters can choose to verify these conditions.
6 Key pair generation and public key verification
6.1 Key pair generation
Input: A set of valid elliptic curve's system parameters over a valid Fq (q = p and p is a prime number greater than 3, or q = 2 m
).
Output: A key pair (d, P) associated with the elliptic curve's system parameters.
a) Use a random number generator to generate an integer d in [1, n - 2];
b) G is the base point, calculate the point P = (xP , yP ) = [d] G (see A.3.2 in
Appendix A);
c) The key pair is (d, P), where d is the private key and P is the public key.
6.2 Verification of the public key
6.2.1 Verification of elliptic curve's public key on Fp
Input: A valid set of elliptic curve's system parameters over F p (p > 3 and p is prime number) and an associated public key P.
Output: For a given elliptic curve's system parameter, if the public key P is valid, the output is “valid”; otherwise, the output is “invalid”.
a) Verify that P is not infinity point O;
b) Verify that the coordinates xP and y P of the public key P are elements in the field Fp (i.e. verify that xP and yP are integers in the interval [0, p - 1]);
c) Verify yP
2
== xP
3
+ axP + b (mod p);
d) Verify [n] P = O;
e) If all verifications have passed, the output is “valid”; otherwise, the output is “invalid”.
6.2.2
Verification of elliptic curve's public key on
Input: A valid set of elliptic curve's system parameters on and an associated public key P.
A.4.2 Conditions to meet for secure elliptic curve
A.4.2.1 Anti-MOV attack conditions
A.Menezes, T.Okamoto, S.Vanstone, G.Frey, and H.Rück's reduction attacks reduce the elliptic curve's discrete logarithm problem on the finite field Fq to the discrete logarithm problem on . This attack method is practical only when B is small, most elliptic curves do not meet this condition. Anti-MOV attack conditions ensure that an elliptic curve is not vulnerable to this reduction method.
The elliptic curve on most Fq does meet the anti-MOV attack conditions.
Before verifying the anti-MOV attack conditions, it shall select a MOV threshold, which is a positive integer B that makes the discrete logarithm problem on at least as difficult as calculating the elliptic curve's discrete logarithm problem on Fq . For the standard q > 2
191 , B >= 27 is required. The selection of B >= 27 also […]
B.1 Finite field and modulo operations
B.1.1 Exponential operations in finite fields
Let alpha be a positive integer, g be the element on the field F q , the exponential operation is the operation of calculating g
alpha
. The exponential operation can be performed efficiently by the binary method outlined below.
Input: positive integer alpha, field Fq , field element g.
Output: g
alpha
.
a) Set e = a mod (q - 1), if e = 0, then it outputs 1;
b) Let the binary representation of e be e = erer-1 ...e1 e0 , of which the highest bit er is 1;
c) Set x = g;
d) For i, execute it by falling from r - 1 to 0:
1) Set x = x
2
;
2) If ei = 1, set x = g · x;
e) Output x.
Other acceleration algorithms are found in Brickell et al. 1993, Knuth 1981.
B.1.2 Inverse operations in finite fields
Let g be a non-zero element on the field F q , then the inverse element g
-1 is the field element c that makes g · c = 1. Since c = g q - 2 , the inversion can be achieved by an exponential operation. Note that if q is a prime number and g is an integer satisfying 1 <= g <= q - 1, then g
-1 is an integer c, 1 <= c <= q - 1, and g·c
==1 (mod q).
Input: Field Fq , non-zero element g in F q .
Output: Inverse element g
-1
.
a) Calculate c = g q - 2 (see B.1.1);
B.1.5 Trace function and half trace function
Let alpha be an element in , and the trace of alpha is:
.
The trace of half of the elements in is 0, the trace of half of the elements […]
B.1.11 Approximate primality testing
Given a trial division bound lmax, if each prime factor of the positive integer h does not exceed lmax, then h is said to be lmax-smooth. Given a positive integer r min , if there is a prime number v >= r min such that a positive integer u = h · v, and the integer h is lmax-smooth, then u is called an approximate prime number. The following algorithm checks the approximate primality of u.
Input: Positive integers u, lmax and r min .
Output: It outputs h and v if u is an approximate prime, otherwise, it outputs “not approximate prime”.
a) Set v = u, h = 1;
C.1 General requirements
All values in this Appendix are expressed in hexadecimal, the left side is the high order and the right side is the low order.
C.2 Elliptic curve on Fp
The elliptic curve equation is: y
2
= x
3
+ ax + b
Example 1: Fp -192 curve
Prime number p: BDB6F4FE 3E8B1D9E 0DA8C0D4 6F4C318C EFE4AFE3
B6B8551F
Coefficient alpha: BB8E5E8F BC115E13 9FE6A814 FE48AAA6 F0ADA1AA
5DF91985
Coefficient b: 1854BEBD C31B21B7 AEFC80AB 0ECD10D5 B1B3308E
6DBF11C1
The base point G = (x, y), of which the order is n.
Coordinate x: 4AD5F704 8DE709AD 51236DE6 5E4D4B48 2C836DC6
E4106640
Coordinate y: 02BB3A02 D4AAADAC AE24817A 4CA3A1B0 14B52704
32DB27D2
Order n: BDB6F4FE 3E8B1D9E 0DA8C0D4 0FC96219 5DFAE76F 56564677
Example 2: Fp -256 curve
Prime number p: 8542D69E 4C044F18 E8B92435 BF6FF7DE 45728391
5C45517D 722EDB8B 08F1DFC3
Coefficient alpha: 787968B4 FA32C3FD 2417842E 73BBFEFF 2F3C848B
6831D7E0 EC65228B 3937E498
Coefficient b: 63E4C6D3 B23B0C84 9CF84241 484BFE48 F61D59A5
B16BA06E 6E12D1DA 27C5249A […]
......
This preview omits tables, figures, formulas and parts of the technical clauses. The complete document — 37 pages — is available in the English PDF.
Referenced standards
Cited by
- GB/T 46999-2025General specification for the digital identity and authentication of road traffic management and control facilities
- GB/T 37376-2024Transportation - Digital certificate format
- GB/T 45112-2024LTE-based vehicular communication - Technical requirements of the security certificate management system
- GM/T 0130-2023Certificateless and implicit-certificate-based public key mechanisms based on the SM2 algorithms
- GB/T 17901.3-2021Information technology - Security techniques - Key management - Part 3: Mechanisms using asymmetric techniques
- GB/T 36644-2018Information security technology—Methods for obtaining security attestations for digital signature applications
Similar standards
How to Download GB/T 32918.1-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 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
Secure payment via Stripe
Payments accepted
GB/T 32918.1-2016
$345.00