This part of GM/T 0001 describes the integrity algorithm based on the ZUC stream cipher algorithm. It is applicable to the development, testing, and use of products related to the integrity algorithm based on the ZUC stream cipher algorithm.
2 Normative References
The following documents are essential for the application of this document. For dated references, only the dated version applies to this document. For undated references, the latest version (including all amendments) applies to this document.
GM/T 0001.1 ZUC Stream Cipher Algorithm Part 1: Algorithm Description
3 Terms and Definitions
The terms and definitions defined in GM/T 0001.1 apply to this document.
4 Symbols and Abbreviations
4.1 Symbols
The following symbols apply to this document:
Bitwise XOR operation
|| String or byte string concatenation
「x7 Smallest integer no less than x
≪ k Left shift by k bits
4.2 Abbreviations
The following abbreviations apply to this document:
IK: Integrity Key
IV: Initial Vector
LTE: Long Term Evolution
MAC: Message Authentication Code
5 Algorithm Description
5.1 Algorithm Inputs and Outputs
The input parameters of this algorithm are shown in Table 1, and the output parameter is shown in Table 2.
Table 1 The inputs
Parameter Size(bits) Remark
IK 128 Integrity key
IV 128 Initialization Vector
LENGTH 32 Bit length of the input message stream
M LENGTH Input message stream with length LENGTH
Table 2 The output
Parameter Size(bits) Remark
MAC 32 The MAC
5.2 Algorithm Workflow
5.2.1 Key Stream Generation
Let L =「LENGTH/327 + 2. Using the integrity key (IK) and the initial vector (IV), and L as input parameters and generate a key stream according to the method described in section 5.6 of GM/T 0001.1. Represent the generated key stream as a bit string k[0],k[1], …,k[32× L−1], where k[0] is the highest bit of the first key word and k[31] is the lowest bit of the first key word, continuing in this manner.
For i=0,1,2, …,32×(L−1), let
ki=k[i] || k[i+1] || … || k[i+31],
where ki is a 32-bit word.
For 3GPP LTE application scenarios, refer to Appendix A for the initialization method of the initial vector (IV).
5.2.2 MAC Calculation
Let Tbe a 32-bit variable. Initialize T=0.
For i=0,1, …,LENGTH−1, If M[i]=1, then
。。。
For 3GPP LTE application scenarios, refer to Appendix B for algorithm calculation examples.
1 Scope
This part of GM/T 0001 describes the integrity algorithm based on the ZUC stream cipher algorithm. It is applicable to the development, testing, and use of products related to the integrity algorithm based on the ZUC stream cipher algorithm.
2 Normative References
The following documents are essential for the application of this document. For dated references, only the dated version applies to this document. For undated references, the latest version (including all amendments) applies to this document.
GM/T 0001.1 ZUC Stream Cipher Algorithm Part 1: Algorithm Description
3 Terms and Definitions
The terms and definitions defined in GM/T 0001.1 apply to this document.
4 Symbols and Abbreviations
4.1 Symbols
The following symbols apply to this document:
Bitwise XOR operation
|| String or byte string concatenation
「x7 Smallest integer no less than x
≪ k Left shift by k bits
4.2 Abbreviations
The following abbreviations apply to this document:
IK: Integrity Key
IV: Initial Vector
LTE: Long Term Evolution
MAC: Message Authentication Code
5 Algorithm Description
5.1 Algorithm Inputs and Outputs
The input parameters of this algorithm are shown in Table 1, and the output parameter is shown in Table 2.
Table 1 The inputs
Parameter Size(bits) Remark
IK 128 Integrity key
IV 128 Initialization Vector
LENGTH 32 Bit length of the input message stream
M LENGTH Input message stream with length LENGTH
Table 2 The output
Parameter Size(bits) Remark
MAC 32 The MAC
5.2 Algorithm Workflow
5.2.1 Key Stream Generation
Let L =「LENGTH/327 + 2. Using the integrity key (IK) and the initial vector (IV), and L as input parameters and generate a key stream according to the method described in section 5.6 of GM/T 0001.1. Represent the generated key stream as a bit string k[0],k[1], …,k[32× L−1], where k[0] is the highest bit of the first key word and k[31] is the lowest bit of the first key word, continuing in this manner.
For i=0,1,2, …,32×(L−1), let
ki=k[i] || k[i+1] || … || k[i+31],
where ki is a 32-bit word.
For 3GPP LTE application scenarios, refer to Appendix A for the initialization method of the initial vector (IV).
5.2.2 MAC Calculation
Let Tbe a 32-bit variable. Initialize T=0.
For i=0,1, …,LENGTH−1, If M[i]=1, then
。。。
For 3GPP LTE application scenarios, refer to Appendix B for algorithm calculation examples.
Appendix A
(Informative Appendix)
Parameter Initialization in 3GPP LTE