Data Encryption Method and System Based on Chaotic Block Cipher
By dynamically constructing the S-box and system parameters, the security risks of fixed parameters in the Guomi SM4 algorithm are solved, and the security of data transmission is improved.
Patent Information
- Application Number
- CN202211006585.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-08-22
AI Technical Summary
The S-box, system parameters and fixed parameters of the existing National Secret SM4 algorithm are relatively fixed, resulting in the ciphertext data being easily deciphered during transmission, which poses a security risk.
The system parameters and fixed parameters of the S-box and linear structural parts of the nonlinear structural parts are dynamically constructed to safely encrypt plain text data and improve the security of information transmission.
By increasing the degree of confusion in encrypted data, the risk of being deciphered is reduced and the security of information transmission is enhanced.
Smart Images

Figure CN115348101B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data encryption, and in particular relates to a data encryption method and system based on chaotic block cipher. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute the prior art that has been known to a person skilled in the art.
[0003] With the rapid development of computer network technology and the promotion and application of the fifth generation of mobile communication technology, the channels for data transmission have become more smooth. At the same time, a new generation of smart technology terminal devices such as smart watches, bracelets, smart homes, and countless self-media platforms have also provided strong support for the generation of massive data information. The security issues of data transmission have also become increasingly serious. How to ensure the safe transmission of data information in the network without being stolen or tampered with has become one of the main problems that need to be solved at present.
[0004] The national secret SM4 algorithm is based on the Feistel structure for iteration, and the plaintext and encryption key are processed in certain groups to realize the operation process. Among them, the round function includes two parts: linear structure and nonlinear structure, and the S box and other related operation parameters involved in the operation are relatively fixed and static. As the speed of computer data operation and processing increases day by day, the possibility of this form of relatively short key being cracked by brute force through exhaustive methods is increasing. The unchanging operation parameters will increase the risk of the algorithm being cracked, so there are certain security risks in use. Summary of the invention
[0005] In order to solve the above problems, the present invention provides a data encryption method and system based on chaotic block cipher, which utilizes chaotic sequences to dynamically construct S-boxes of nonlinear structure parts and system parameters and fixed parameters of linear structure parts to securely encrypt plaintext data, reduce the risk of being decrypted during data transmission, and improve the security of information transmission.
[0006] The present invention mainly includes the following aspects:
[0007] In a first aspect, an embodiment of the present invention provides a data encryption method based on a chaotic block cipher, comprising:
[0008] Receive plaintext data input by the user;
[0009] Divide the plaintext data into multiple groups, input them into a round function for encryption operation, and obtain corresponding ciphertext data;
[0010] Among them, a chaotic sequence is used to dynamically construct the S-box, system parameters, and fixed parameters; in each round of the encryption process, the constructed S-box is called to participate in data permutation, and the round keys determined by the system parameters and fixed parameters are used to perform encryption operations on multiple groups of the plaintext data to generate the grouped data of the next round.
[0011] In a possible implementation manner, an encryption key is obtained; the encryption key is subjected to bitwise exclusive OR operation according to 8 hexadecimal numbers, and modulo operation is performed to obtain the initial value of the chaotic sequence.
[0012] In a possible implementation manner, the construction process of the S-box includes: sequentially selecting the values in the chaotic sequence, magnifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box.
[0013] In a possible implementation manner, after obtaining the values of the S-box, it further includes: determining whether the obtained values of the S-box are in the S-box, and if the values are not in the S-box, putting them into the S-box.
[0014] In a possible implementation manner, the values of the chaotic sequence are sequentially selected as the base values for generating system parameters and fixed parameters; the base values are enlarged by a preset multiple, and then the number of bits is judged, and the base values with less than 32 bits are discarded to obtain a base value sequence; the system parameters and fixed parameters are determined according to the base value sequence.
[0015] In a possible implementation manner, the first preset number of base values arranged in the front in the base value sequence are put into the system parameter storage list, and the second preset number of base values after that are put into the fixed parameter storage list for subsequent operation calls.
[0016] In a second aspect, an embodiment of the present invention provides a data encryption system based on chaotic block cipher, including:
[0017] A receiving module, configured to receive the plaintext data input by a user;
[0018] An encryption module, configured to divide the plaintext data into multiple groups, input them into a round function for encryption operation, and obtain the corresponding ciphertext data;
[0019] Among them, a chaotic sequence is used to dynamically construct the S-box, system parameters, and fixed parameters; in each round of the encryption process, the constructed S-box is called to participate in data permutation, and the round keys determined by the system parameters and fixed parameters are used to perform encryption operations on multiple groups of the plaintext data to generate the grouped data of the next round.
[0020] In a possible implementation manner, an encryption key is obtained; the encryption key is subjected to bitwise exclusive OR operation according to 8 hexadecimal numbers, and modulo operation is performed to obtain the initial value of the chaotic sequence.
[0021] In a possible implementation manner, the construction process of the S-box includes: sequentially selecting the values in the chaotic sequence, amplifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box.
[0022] In a possible implementation manner, the construction process of the S-box includes: sequentially selecting the values of the chaotic sequence as the base values for generating system parameters and fixed parameters; expanding the base values by a preset multiple, then judging the number of digits, and discarding the base values with less than 32 digits to obtain a base value sequence; determining system parameters and fixed parameters according to the base value sequence.
[0023] The above one or more technical solutions have the following beneficial effects:
[0024] (1) The present invention uses a chaotic sequence to dynamically construct the S-box of the non-linear structure part and the system parameters and fixed parameters of the linear structure part, which can improve the confusion degree of encrypted data, reduce the risk of being deciphered during data transmission, and improve the security of information transmission.
[0025] (2) By performing certain processing on the encryption key and using it as the initial value of the chaotic mapping operation, various intermediate values during the encryption operation are closely related to the encryption key, ensuring the accuracy of the encryption and decryption operation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings forming a part of this invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0027] Figure 1 is a schematic flowchart of the data encryption method based on chaotic block cipher in Embodiment 1 of the present invention;
[0028] Figure 2 is a framework diagram of the data encryption method based on chaotic block cipher in Embodiment 1 of the present invention;
[0029] Figure 3 is a schematic flowchart of dynamically generating the S-box in Embodiment 1 of the present invention;
[0030] Figure 4 is a schematic flowchart of dynamically generating system parameters and fixed parameters in Embodiment 1 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0032] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention pertains.
[0033] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0034] Example 1
[0035] Term Explanation:
[0036] SM4: The SM4 block cipher algorithm is another commercial cipher algorithm after the SM2 / SM9 digital signature algorithms, the SM3 cryptographic hash algorithm, the ZUC cipher algorithm, and the SM9 identity encryption algorithm.
[0037] Chaotic system: A chaotic system refers to a deterministic system in which there exists seemingly random irregular motion, and its behavior is characterized by uncertainty, non-repeatability, and unpredictability, which is the chaotic phenomenon. Chaos is an inherent property of nonlinear dynamical systems and is a phenomenon commonly existing in nonlinear systems. According to the nature of dynamical systems, chaos can be divided into four types: temporal chaos, spatial chaos, spatio-temporal chaos, and functional chaos.
[0038] S-box: In cryptography, the S-box is the basic structure for performing permutation calculations in symmetric key algorithms. The S-box is used in block cipher algorithms and is the only non-linear structure. The quality of the S-box indicators directly determines the quality of the cipher algorithm. The function of the S-box is equivalent to a "substitution" operation, which compresses 48 bits into 32 bits. The S-box accepts a specific number of 48-bit inputs and converts them into 32-bit outputs through 8 boxes.
[0039] The formula for the operation process of the encryption and decryption module of the national cipher SM4 algorithm can be seen in formula (1):
[0040] X i+4 = F(X i , X i+1 X i+2 , X i+3 , rk i ), i = 0, 1,..., 31 (1)
[0041] In the formula: X i represents the plaintext block, F() represents the round function, and rk iRepresents the round key. The definition of the F function can be seen in Formula (2):
[0042]
[0043] In the formula: The T function is a composite permutation function, which consists of a linear transformation L and a non-linear transformation τ, that is, T(.) = L(τ(.)). The definition of L can be seen in Formula (3), and the definition of τ can be seen in Formula (4), where B represents the input 32-bit data, and A is the data input into the S-box for permutation, which consists of four groups a0 - a3.
[0044]
[0045] τ(A) = (Sbox(a0), Sbox(a1), Sbox(a2), Sbox(a3)) (4)
[0046] Meanwhile, the round key generation process in the key expansion module can be seen in Formulas (5) and (6):
[0047]
[0048]
[0049] Among them, MK is the key group, FK is the system parameter, CK is the fixed parameter, and T’ is the composite permutation function with the linear part changed.
[0050] In the existing data encryption method based on the national cipher SM4, its S-box, system parameters, and fixed parameters are relatively fixed, resulting in the ciphertext data being easily deciphered during the transmission process, so there are certain security risks. In this embodiment, chaotic sequences are used to dynamically construct the S-box of the non-linear structure part and the system parameters and fixed parameters of the linear structure part to securely encrypt the plaintext data and improve the security of information transmission.
[0051] Please refer to Figure 1 , this embodiment provides a data encryption method based on chaotic block cipher, which specifically includes the following steps:
[0052] S101: Receive the plaintext data input by the user;
[0053] S102: Divide the plaintext data into multiple groups, input them into the round function for encryption operation, and obtain the corresponding ciphertext data;
[0054] Among them, chaotic sequences are used to dynamically construct the S-box, system parameters, and fixed parameters; in each round of encryption process, the constructed S-box is called to participate in data permutation, and the round key determined by the system parameters and fixed parameters is used to encrypt multiple groups of the plaintext data to generate the next round of grouped data.
[0055] In a specific implementation, taking the plaintext and the key both as 0x123456789abcdeffedcba98765432111 as an example, the data encryption method proposed in this embodiment will be described in detail. The overall framework diagram is as Figure 2 shown.
[0056] S1: S-box dynamic generation. Using the chaotic mapping sequence to dynamically construct the values of the S-box, it is necessary to select appropriate initial values and parameter μ of the Logistic chaotic mapping. The formula of the one-dimensional Logistic chaotic mapping can be seen in Equation (7):
[0057] x n+1 = μx n (1 - x n ) (7)
[0058] In order to make various intermediate values in the encryption operation process closely related to the encryption key, the input encryption key is processed to be used as the initial value of the chaotic mapping operation. Specifically, the 128-bit encryption key is subjected to bitwise exclusive OR operation according to 8 hexadecimal numbers. The operation result is less than or equal to 16, so the exclusive OR result is then subjected to modulo 16 operation to ensure that the initial value meets the requirements of the Logistic chaotic mapping for the initial value x0, that is, x0 ∈ [0, 1]. For the parameter μ, a value between 3.57 - 4 that satisfies the chaotic state is selected. To make the generated values more comprehensively traverse between 0 - 1, 3.9999 which is very close to 4 is selected as the value of μ.
[0059] As Figure 3 shown, the construction process of the S-box includes: sequentially selecting the values in the chaotic sequence, magnifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box. Optionally, after obtaining the values of the S-box, it further includes: judging whether the obtained values of the S-box are in the S-box. If the value is not in the S-box, it is put into the S-box. The generated S-box is as follows:
[0060] 0x00: 0x1e; 0x01: 0xe0; 0x02: 0x1c; 0x03: 0x70; 0x04: 0x8e; 0x05: 0xbf; 0x06: 0x9d; 0x07: 0x11; 0x08: 0xe4; 0x09: 0x0d; 0x0a: 0x36; 0x0b: 0xcf; 0x0c: 0x90; 0x0d: 0x85; 0x0e: 0x63; 0x0f: 0x94; 0x10: 0x32; 0x11: 0x51; 0x12: 0xff; 0x13: 0xe7; 0x14: 0x02; 0x15: 0x08; 0x16: 0x21; 0x17: 0x81; 0x18: 0xc1; 0x19: 0xdd; 0x1a: 0x27; 0x1b: 0x98; 0x1c: 0x05; 0x1d: 0xe6; 0x1e: 0x14; 0x1f: 0x50; 0x20: 0x40; 0x21: 0x2d; 0x22: 0xda; 0x23: 0x34; 0x24: 0xc5; 0x25: 0x7a; 0x26: 0x9f; 0x27: 0x0b; 0x28: 0x0f; 0x29: 0xa6; 0x2a: 0x68; 0x2b: 0xbe; 0x2c: 0xdc; 0x2d: 0xaf; 0x2e: 0x42; 0x2f: 0x60; 0x30: 0x5b; 0x31: 0x8b; 0x32: 0x7e; 0x33: 0xad; 0x34: 0xde; 0x35: 0xb2; 0x36: 0x56; 0x37: 0xf2; 0x38: 0x00; 0x39: 0x0a; 0x3a: 0x29; 0x3b: 0x9e; 0x3c: 0x15; 0x3d: 0xe3; 0x3e: 0x45; 0x3f: 0x03; 0x40: 0xc8; 0x41: 0x33; 0x42: 0x83; 0x43: 0x1d; 0x44: 0x73; 0x45: 0x97; 0x46: 0x84; 0x47: 0xcb; 0x48: 0xe1; 0x49: 0x19; 0x4a: 0x66; 0x4b: 0x26; 0x4c: 0x3e; 0x4d: 0xd8; 0x4e: 0xe9; 0x4f: 0xcc; 0x50: 0x2c; 0x51: 0x61; 0x52: 0xb8; 0x53: 0xb6; 0x54: 0x55; 0x55: 0xc2; 0x56: 0x91; 0x57: 0xf0; 0x58: 0x01; 0x59: 0x04; 0x5a: 0x46; 0x5b: 0x41; 0x5c: 0x2a; 0x5d: 0x2e; 0x5e: 0xb1; 0x5f: 0x48; 0x60: 0x6e; 0x61: 0x89; 0x62: 0xba; 0x63: 0xae;0x64:0x3f; 0x65:0xd1; 0x66:0x59; 0x67:0xab; 0x68:0xd2; 0x69:0x53; 0x6a:0x31; 0x6b:0x3d; 0x6c:0xc9; 0x6d:0x88; 0x6e:0xb9; 0x6f:0xb0; 0x70:0x69; 0x71:0x79; 0x72:0xe2; 0x73:0xbd; 0x74:0xdf; 0x75:0x20; 0x76:0x7d; 0x77:0xb5; 0x78:0x3c; 0x79:0xd7; 0x7a:0xf1; 0x7b:0x67; 0x7c:0x37; 0x7d:0xd5; 0x7e:0xa5; 0x7f:0xc7; 0x80:0x9b; 0x81:0x47; 0x82:0xa4; 0x83:0xce; 0x84:0x64; 0x85:0x96; 0x86:0x49; 0x87:0xc6; 0x88:0x6b; 0x89:0x80; 0x8a:0xca; 0x8b:0x86; 0x8c:0x92; 0x8d:0x39; 0x8e:0x5c; 0x8f:0x06; 0x90:0x18; 0x91:0x5d; 0x92:0x8d; 0x93:0x72; 0x94:0x6f; 0x95:0xbc; 0x96:0xa7; 0x97:0xa0; 0x98:0x57; 0x99:0xef; 0x9a:0x1b; 0x9b:0xfe; 0x9c:0x07; 0x9d:0xc3; 0x9e:0x1a; 0x9f:0x65; 0xa0:0x6c; 0xa1:0x10; 0xa2:0x8f; 0xa3:0x87; 0xa4:0x04; 0xa5:0xbb; 0xa6:0x62; 0xa7:0xb7; 0xa8:0x5a; 0xa9:0xa1; 0xaa:0x6d; 0xab:0x0c; 0xac:0x12; 0xad:0xcd; 0xae:0xf5; 0xaf:0x38; 0xb0:0x5e; 0xb1:0x3b; 0xb2:0x5f; 0xb3:0x24; 0xb4:0x3a; 0xb5:0xd3; 0xb6:0x52; 0xb7:0x4a; 0xb8:0x0e; 0xb9:0xa9; 0xba:0xb4; 0xbb:0xc4; 0xbc:0x78; 0xbd:0xa2; 0xbe:0x30; 0xbf:0x4f; 0xc0:0x17; 0xc1:0x23; 0xc2:0xd0; 0xc3:0x74; 0xc4:0x16; 0xc5:0x58; 0xc6:0x35; 0xc7:0xa8;0xc8:0x54; 0xc9:0xf6; 0xca:0xfd; 0xcb:0x99; 0xcc:0x7f; 0xcd:0xdb; 0xce:0xb3; 0xcf:0xee; 0xd0:0xd6; 0xd1:0x8c; 0xd2:0x75; 0xd3:0x77; 0xd4:0xaa; 0xd5:0xac; 0xd6:0x09; 0xd7:0xf3; 0xd8:0x95; 0xd9:0x43; 0xda:0xfb; 0xdb:0xf4; 0xdc:0x6a; 0xdd:0x7c; 0xde:0x13; 0xdf:0x4c; 0xe0:0x93; 0xe1:0x44; 0xe2:0xc0; 0xe3:0x2b; 0xe4:0xd4; 0xe5:0x4d; 0xe6:0xeb; 0xe7:0x4b; 0xe8:0x9a; 0xe9:0x1f; 0xea:0xe5; 0xeb:0x82; 0xec:0xd9; 0xed:0x7b; 0xee:0x8a; 0xef:0xe8; 0xf0:0xf8; 0xf1:0x71; 0xf2:0xfc; 0xf3:0x22; 0xf4:0x9c; 0xf5:0x76; 0xf6:0xf7; 0xf7:0x28; 0xf8:0x2f; 0xf9:0xec; 0xfa:0xed; 0xfb:0xa3; 0xfc:0xfa; 0xfd:0x25; 0xfe:0xea; 0xff:0xf9.;
[0061] S2: The system parameters and fixed parameters are dynamically generated. As can be seen from the above S-box generation process, the generation of the dynamic system parameters and fixed parameters is similar to it, and the difference lies in the processing of the chaotic sequence. As Figure 4 shown, the values of the chaotic sequence are sequentially selected as the base values for generating the system parameters and fixed parameters. Since both the system parameters and fixed parameters require 32-bit binary numbers, that is, 8 hexadecimal numbers, the generated base values are directly multiplied by 2 to the 32nd power for expansion, and then the number of digits is judged, and the values less than 32 bits are discarded to obtain the base value sequence. The system parameters and fixed parameters are determined according to the base value sequence. Optionally, the first 4 base values that meet the digit condition are put into the system parameter storage list, and the subsequent 32 base values are put into the fixed parameter storage list for subsequent operation calls. The generated system parameters and fixed parameters are as follows:
[0062] System parameters: {0xb7be020c, 0xcf71e479, 0x9d610767, 0xf281f0d8}
[0063] Fixed parameters: {0x331fba63,0xa3a73ca0,0xec21ddca,0x494d296c,0xd13eeb54,0x98db8401,0xf656d874,0x252f0f0a,0x7f20dfe0,0xfffb52b1,0x1241359a,0x43cf76b6,0xc7639317,0xb05d55be,0xdb720fb6,0x7d560aa9,0xffe1fa12,0x1cde7bfe,0x66739630,0xf5cb868d,0x27311496,0x84c38217,0xffa397a4,0x166c8280,0x51d6323a,0xdeb26004,0x73e156eb,0xfdb2d23b,0x2330bdc5,0x7968bb79,0xff509b4c,0x296ee475}。
[0064] S3: After generating the S-box, system parameters, and fixed parameters, start the encryption operation on the plaintext data. Obtain the plaintext data input by the user and divide the plaintext data into multiple groups. Specifically, divide the plaintext data into four groups in sequence and participate in the encryption operation of the F(X) function. Among them, on the one hand, the non-linear structure S-box is called to participate in data substitution, and finally four groups of data for the next round are generated; on the other hand, the round key rk needs to participate in the operation. The generation process of the round key is obtained by calling the system parameters and fixed parameters through exclusive OR operations, circular left shifts, etc. The generated round keys are as follows:
[0065] rk[0]: 0xc2b29f81 rk[1]: 0xc36033ed rk[2]: 0xb4cf19d7 rk[3]: 0x14edbf7c rk[4]: 0x96954a4a rk[5]: 0x45017b2e rk[6]: 0xc953093a rk[7]: 0x63bc2023 rk[8]: 0x10944933 rk[9]: 0xc20e1a9c rk
[10] : 0x2ebf682c rk
[11] : 0xce684381 rk
[12] : 0x375f55d rk
[13] : 0x30f1d669 rk
[14] : 0xdfe446e7 rk
[15] : 0x3d8e7382 rk
[16] : 0x1d714559 rk
[17] : 0xea46b0b5 rk
[18] : 0x33c62890 rk
[19] : 0x264c9736 rk
[20] : 0x700c9da7 rk
[21] : 0x53f7bfb0 rk
[22] : 0xcee0aecb rk
[23] : 0xbccd7adb rk
[24] : 0x14ab3c8c rk
[25] : 0x3bc45a09 rk
[26] : 0x98ee34c8 rk
[27] : 0xd7bc1bbe rk
[28] : 0xf427c71e rk
[29] : 0x1500a51f rk
[30] : 0x4708e6d9 rk
[31] : 0xdad5cc02
[0066] The finally obtained ciphertext is: 0x2bb7af7b05792374eb95629ed35317ae.
[0067] In this way, by using the chaotic sequence to dynamically construct the S-box of the non-linear structure part and the system parameters and fixed parameters of the linear structure part, the confusion degree of the encrypted data can be improved, the risk of being deciphered can be reduced during the data transmission process, and the security of information transmission can be enhanced.
[0068] Embodiment 2
[0069] In order to verify the performance of the data encryption method proposed in this embodiment compared with the existing data encryption method based on the national cipher SM4, the confusion degree of the encryption method is quantified by the information entropy value, which is used to characterize the appearance probability of the specific data content.
[0070] The confusion degree of a system as a whole is inversely proportional to the data value of the information entropy. The more orderly the whole is, the smaller the value of the information entropy. The operation formula of the information entropy value is as follows:
[0071]
[0072] By statistically analyzing the frequencies of the values in each round key of the data encryption method based on the national cryptographic algorithm SM4 and the encryption method proposed in this embodiment, and calculating the value of information entropy, the degree of dispersion is further compared, as shown in the following table.
[0073] Table 1 Information entropy values of two data encryption methods
[0074]
[0075] From the data in Table 1, it can be seen that compared with the existing national cryptographic algorithm SM4, the information entropy data index of the chaotic-dynamic SM4 provided in this embodiment is larger, indicating that the method of dynamically constructing parameters through the chaotic sequence has a positive effect in the key expansion operation module. The round keys generated in this way have stronger randomness and higher complexity.
[0076] Furthermore, the security of the data encryption method proposed in this embodiment is tested using confusion and diffusion. Confusion and diffusion are two relatively important evaluation indicators in the design of cryptographic algorithms. Diffusion means that if one bit in the plaintext is changed, at least half of the bits in the ciphertext should change accordingly, or if one bit in the ciphertext is changed, at least half of the bits in the plaintext should also change, so as to hide the statistical relationship between the ciphertext and the plaintext. Confusion means that each bit of the ciphertext should depend on several parts of the key, thereby obscuring the relationship between the two and achieving the effect of hindering decryption.
[0077] The nonlinear structure S-box of the chaotic sequence is used to achieve a good confusion effect. Table 2 shows the encryption test for this.
[0078] From the data in Table 2, it can be seen that on the premise of a certain key, when there is a slight 1-bit change in the plaintext, it will affect the entire ciphertext result. Similarly, when the plaintext is fixed, the slightest difference in the key also brings a large change to the entire ciphertext. Therefore, the data encryption method based on chaotic block cipher provided in this embodiment has a good avalanche effect.
[0079] Table 2 Results of changing the plaintext or the key
[0080]
[0081] Embodiment 2
[0082] The embodiment of the present invention further provides a data encryption system based on chaotic block cipher, including:
[0083] A receiving module, configured to receive the plaintext data input by the user;
[0084] An encryption module, configured to divide the plaintext data into multiple groups, input the groups into a round function for encryption operations, and obtain corresponding ciphertext data;
[0085] Among them, a chaotic sequence is used to dynamically construct an S-box, system parameters, and fixed parameters; in each round of encryption process, the constructed S-box is called to participate in data permutation, and the round key determined by the system parameters and fixed parameters is used to encrypt multiple groups of the plaintext data to generate the grouped data of the next round.
[0086] As an optional implementation manner, an encryption key is obtained; the encryption key is subjected to bitwise exclusive OR operation according to 8 hexadecimal numbers and modulo operation to obtain the initial value of the chaotic sequence.
[0087] As an optional implementation manner, the construction process of the S-box includes: sequentially selecting the values in the chaotic sequence, magnifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box.
[0088] As an optional implementation manner, the values of the chaotic sequence are sequentially selected as the base values for generating system parameters and fixed parameters; the base values are enlarged by a preset multiple, and then the number of bits is judged, and the base values with less than 32 bits are discarded to obtain a base value sequence; the system parameters and fixed parameters are determined according to the base value sequence.
[0089] The data encryption system based on chaotic block cipher provided in this embodiment is used to implement the foregoing data encryption method based on chaotic block cipher. Therefore, the specific implementation manners in the data encryption system based on chaotic block cipher can be seen in the embodiment part of the data encryption method based on chaotic block cipher in the foregoing text, and will not be elaborated here.
[0090] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data encryption method based on chaotic block cipher, characterized in that, Including: Receiving the plaintext data input by the user; Dividing the plaintext data into multiple groups, inputting them into a round function for encryption operation to obtain corresponding ciphertext data; Among them, a chaotic sequence is used to dynamically construct the S-box, system parameters, and fixed parameters; in each round of encryption process, the constructed S-box is called to participate in data substitution, and the round keys determined by the system parameters and fixed parameters are used to encrypt multiple groups of the plaintext data to generate the grouped data of the next round; Using a chaotic mapping sequence to dynamically construct the values of the S-box, and selecting appropriate initial values and parameter μ of the Logistic chaotic mapping; Performing certain processing on the input encryption key as the initial value of the chaotic mapping operation, so that various intermediate values in the encryption operation process are closely related to the encryption key; specifically: performing bitwise exclusive OR operation on the 128-bit encryption key according to 8 hexadecimal numbers, and the operation result is less than or equal to 16, and then performing modulo 16 operation on the exclusive OR result to ensure that the initial value meets the requirements of the Logistic chaotic mapping for the initial value x0, where x0 ∈ [0,1]; for the parameter μ, a value that satisfies reaching the chaotic state is selected to make the generated values more comprehensively traverse between 0 and 1; The construction process of the S-box includes: sequentially selecting the values in the chaotic sequence, magnifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box; after obtaining the values of the S-box, it further includes: judging whether the obtained values of the S-box are in the S-box, and if the value is not in the S-box, putting it into the S-box; The system parameters and fixed parameters are dynamically generated. Specifically: sequentially selecting the values of the chaotic sequence as the base values for generating the system parameters and fixed parameters, directly multiplying the generated base values by 2 to the 32nd power for expansion, and then judging the number of bits, discarding the values with less than 32 bits to obtain a base value sequence, and determining the system parameters and fixed parameters according to the base value sequence; putting the first 4 base values that meet the bit condition into the system parameter storage list, and putting the subsequent 32 base values into the fixed parameter storage list for subsequent operation calls; Dynamically constructing the S-box of the non-linear structure part and the system parameters and fixed parameters of the linear structure part by using a chaotic sequence to improve the confusion degree of the encrypted data.
2. The data encryption method based on chaotic block cipher as claimed in claim 1, wherein Obtaining the encryption key; performing bitwise exclusive OR operation on the encryption key according to 8 hexadecimal numbers and performing modulo operation to obtain the initial value of the chaotic sequence.
3. The data encryption method based on chaotic block cipher according to claim 1, wherein Putting the first preset number of base values arranged in the front in the base value sequence into the system parameter storage list, and putting the subsequent second preset number of base values into the fixed parameter storage list for subsequent operation calls.
4. A data encryption system based on chaotic block cipher, characterized in that, Including: A receiving module for receiving the plaintext data input by the user; An encryption module for dividing the plaintext data into multiple groups, inputting them into a round function for encryption operation to obtain corresponding ciphertext data; Among them, a chaotic sequence is used to dynamically construct the S-box, system parameters, and fixed parameters; in each round of the encryption process, the constructed S-box is called to participate in data permutation, and the round keys determined by the system parameters and fixed parameters are used to perform encryption operations on multiple groups of the plaintext data to generate the grouped data of the next round. The values of the S-box are dynamically constructed using a chaotic mapping sequence, and the initial value and parameter μ of an appropriate Logistic chaotic mapping are selected. The input encryption key is processed in a certain way as the initial value of the chaotic mapping operation so that various intermediate values in the encryption operation process are closely related to the encryption key. Specifically: the 128-bit encryption key is subjected to bitwise exclusive OR operation according to 8 hexadecimal numbers, and the operation result is less than or equal to 16. Then, the exclusive OR result is subjected to modulo 16 operation to ensure that the initial value meets the requirements of the Logistic chaotic mapping for the initial value x0, where x0 ∈ [0, 1]; for the parameter μ, a value that satisfies the chaotic state is selected to make the generated values more comprehensively traverse between 0 and 1. The construction process of the S-box includes: successively selecting the values in the chaotic sequence, magnifying them to a preset multiple, and performing modulo operation to obtain the values of the S-box; after obtaining the values of the S-box, it also includes: determining whether the obtained values of the S-box are in the S-box. If the value is not in the S-box, it is put into the S-box. The system parameter box and fixed parameters are dynamically generated. Specifically: the values of the chaotic sequence are successively selected as the base values for generating the system parameters and fixed parameters, directly multiplied by 2 to the 32nd power for expansion, and then the number of digits is judged. The values with less than 32 digits are discarded to obtain a base value sequence, and the system parameters and fixed parameters are determined according to the base value sequence; the first 4 base values that meet the digit conditions are put into the system parameter storage list, and the subsequent 32 base values are put into the fixed parameter storage list, waiting to be called for subsequent operations. The S-box of the non-linear structure part and the system parameters and fixed parameters of the linear structure part are dynamically constructed using a chaotic sequence to increase the confusion degree of the encrypted data.
5. The data encryption system based on chaotic block cipher as claimed in claim 4, wherein Obtain the encryption key; perform bitwise exclusive OR operation on the encryption key according to 8 hexadecimal numbers and perform modulo operation to obtain the initial value of the chaotic sequence.
Citation Information
Patent Citations
Audio encryption method based on SM4 and dynamic S box
CN114598444A