A lightweight block cipher construction method based on parallel circular shift registers
By adopting the construction method of parallel cyclic shift registers in lightweight packet ciphers, the resource consumption problem of traditional packet ciphers on resource-constrained devices is solved, and efficient software and hardware implementation and secure communication are achieved.
Patent Information
- Application Number
- CN202210236770.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-03-11
AI Technical Summary
Traditional packet passwords consume too much resources when implementing hardware, making it difficult to apply to resource-constrained devices, resulting in challenges in applications on these devices.
The lightweight packet cipher construction method (BPRR) based on parallel cyclic shift registers is adopted. Through the key orchestration and iterative encryption process, the parallel cyclic shift registers are used for 20 rounds of iterative encryption, which improves the efficiency of software and hardware implementation.
On the basis of ensuring security and hardware cost, BPRR significantly improves the efficiency of software and hardware, and is suitable for resource-constrained and resource-rich devices, especially for secure communication between resource-constrained and resource-rich devices.
Smart Images

Figure CN114629623B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of secure communication technology, and in particular to a lightweight block cipher construction method based on parallel circular shift registers (BPRR). Background Art
[0002] In recent years, the development and application of 5G technology has promoted the rapid development of the Internet of Things. The number of resource-constrained devices has also increased, and the communication security issues between these devices have also arisen. As an important means to ensure the security of data communication, block ciphers have the advantages of high security, fast encryption and decryption speed, and easy standardization. However, traditional block ciphers such as AES and DES consume too much resources when implemented in hardware and cannot be well applied to resource-constrained devices. This brings challenges to the application of block ciphers on resource-constrained devices. Therefore, the research and application of lightweight block cipher technology has also attracted widespread attention. The research on block ciphers has a long history. During this period, some typical security structures such as Feistel structure and SP structure were born, which provided great help for the design of lightweight block ciphers. The current design of lightweight block ciphers is mainly divided into lightweight implementation based on existing block ciphers, design based on Feistel structure, and design based on SP structure. For the lightweight implementation of existing block ciphers, the representative algorithm is DESL, which reduces the number of S boxes used by the DES algorithm from 8 to 1, greatly reducing the number of GE (equivalent gate circuits) required for hardware implementation. The SP structure algorithm spreads quickly and requires relatively few iterations, so most lightweight block cipher algorithms use the SP structure, such as PRESENT, SKINNY, and GIFT. Although the Feistel structure algorithm spreads slowly, it has the characteristic of consistent encryption and decryption, which gives the Feistel structure a natural advantage in hardware implementation. Representative algorithms include LBlock, SIMON, and SPECK.
[0003] The design principles of lightweight block ciphers generally follow the two design ideas proposed by Shannon, namely diffusion and obfuscation. Diffusion makes any bit in the ciphertext correlated with every bit in the key and plaintext, thereby hiding the statistical characteristics of the plaintext and key. Obfuscation makes the statistical relationship between the key, plaintext and ciphertext as complex as possible. Generally, complex nonlinear substitution can achieve good obfuscation effect. Currently, in the design of lightweight block ciphers, S-boxes and P-boxes or ARX (Addition, Rotation, XOR) modules are usually used to achieve the purpose of diffusion and obfuscation.
[0004] Most of the current lightweight block ciphers perform well in terms of hardware cost, but their software and hardware implementation efficiency is low. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a lightweight block cipher construction method (BPRR) based on parallel circular shift registers, which has the characteristics of high efficiency in software and hardware implementation, is mainly used for data encryption and decryption in network communications and information system security, and is suitable for both resource-constrained devices and resource-unconstrained devices. The lightweight block cipher BPRR of the present invention improves software and hardware efficiency while ensuring security and hardware cost.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention proposes a lightweight block cipher construction method based on a parallel cyclic shift register, the generation method comprising the following steps:
[0008] S1, key arrangement: arrange the master key K of length 16B to generate n=20 rounds of subkeys, and the length of each round of subkeys is 16B;
[0009] S2, iterative encryption: XOR the block plaintext P of length 16B with the master key K, and use the parallel circular shift register PRR for 20 rounds of iterations. The iteration results of the i-th round are all XORed with the i-th round sub-key, i = 1, 2, ..., n; the output result of the last round is used as the block ciphertext C.
[0010] Furthermore, in step S1, the process of arranging the master key K to generate n rounds of sub-keys includes the following steps:
[0011] S11, the master key K is represented as 4 32-bit words concatenated: K = (K0||K1||K2||K3);
[0012] S12, using a key arrangement algorithm to arrange the master key K into n rounds of subkeys, where the i-th round subkey k i =(k i,0 ||k i,1 ||k i,2 ||k i,3 ) is generated as follows:
[0013] k i,0 =(K0<< <i)+i;k i,1 =(K1>>>i)+j;k i,2 =(K2<< <i)+j+i;k i,3 =(K3>>>i)+j–i;
[0014] Where, j = 4*i, 1≤i≤20; <<< means circular left shift, >>> means circular right shift; + means modulo 2 32 addition.
[0015] Further, in step S2, the iterative encryption includes the following steps:
[0016] S21, represent the group plaintext P as 4 32-bit words concatenated, P = (P0||P1||P2||P3);
[0017] S22, XOR the block plaintext P with a length of 16B with the master key K, and calculate P = P ⊕ K, where Indicates exclusive OR;
[0018] S23, perform n rounds of iterations, and use the parallel circular shift register PRR to update P in each round of iteration:
[0019] P0=P0+P1+P2+P3; P1=(P0<<<(m&31))+P1+1;
[0020] P2=(P0<<<[(m+1)&31])+P2+3; P3=(P0<<<[(m+2)&31])+P3+5;
[0021] The initial value of m is 1, and it is updated to m=m+3 after each iteration. When n rounds of iterations are completed, the corresponding block ciphertext C is generated. To decrypt, just reverse the encryption process.
[0022] The beneficial effects of the present invention are:
[0023] The lightweight block cipher construction method based on parallel circular shift register (BPRR) proposed in this invention improves the efficiency of software and hardware while ensuring security and hardware cost. Evaluation shows that BPRR meets the hardware cost requirements of lightweight ciphers; testing and analysis show that BPRR meets the security requirements of resource-constrained environments. BPRR is more efficient than most lightweight block ciphers, including Speck proposed by the National Security Agency of the United States, and is comparable to conventional block ciphers. It is suitable for both resource-constrained and unconstrained devices, and is particularly suitable for secure communication between resource-constrained devices and resource-rich devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 The encryption block diagram of the lightweight block cipher BPRR based on parallel circular shift register according to an embodiment of the present invention.
[0025] In the figure: ⊕ represents XOR; PRR represents parallel circular shift register. DETAILED DESCRIPTION
[0026] The present invention will now be described in further detail with reference to the accompanying drawings.
[0027] It should be noted that the terms such as "upper", "lower", "left", "right", "front", "back", etc. cited in the invention are only for the convenience of description and are not used to limit the scope of implementation of the present invention. Changes or adjustments in their relative relationships should be regarded as the scope of implementation of the present invention without substantially changing the technical content.
[0028] Figure 1 is an encryption block diagram of the lightweight block cipher BPRR of the present invention. For the sake of convenience, in this embodiment, the length of the master key K is 16B, n is 20, and a is 16B. That is, the cipher of this embodiment is designed based on a parallel circular shift register, the block and key lengths are both 128 bits, and the iterative encryption is 20 rounds. See Figure 1 The lightweight block cipher construction method based on parallel cyclic shift register of this embodiment includes the following steps when implemented:
[0029] (1) Key arrangement: First, arrange the 16-byte master key K to generate 20 rounds of subkeys, each of which is 128 bytes.
[0030] (2) Iterative encryption: The 128-bit block plaintext P is XORed with the master key K, and then 20 rounds of iterations are performed using a parallel circular shift register PRR. After each round of iteration, it is XORed with the subkey. The output of the last round is the block ciphertext C.
[0031] The specific implementation method of the BPRR encryption and decryption process is shown in Table 1.
[0032] Table 1 BPRR encryption and decryption process
[0033]
[0034] Compared with existing lightweight block ciphers, BPRR has the following advantages:
[0035] (1) Good avalanche (diffusion and confusion) effect. The present invention uses dependency testing to detect the avalanche effect. The test results are shown in Table 2. sa represents the strict avalanche criterion, d a Indicates the avalanche effect degree, d c Indicates completeness.
[0036] Table 2. Dependency test results of BPRR
[0037]
[0038] The reference values in the table are obtained from the test results of commonly used passwords. The test results show that BPRR only needs 6 iterations for each indicator to meet the standard of dependency testing, so 20 iterations are sufficient to achieve good security redundancy when encrypting.
[0039] (2) The output has good pseudo-randomness. The present invention uses the NIST test suite to evaluate the pseudo-randomness of the output of BPRR in the CTR (counter) working mode. The test results are shown in Table 3.
[0040] Table 3 Pseudo-randomness test results of BPRR-CTR output
[0041]
[0042] For NIST testing, if the calculated result is the acceptance level P v <0.01, the output sequence is considered non-random; if P v ≥0.01, the output sequence is considered random. The output sequence of BPRR-CTR passes all 15 tests and has good pseudo-randomness; and the previous tests show that BPRR has good diffusion and obfuscation effects, so BPRR can better hide the statistical relationship between the output ciphertext and the input plaintext and key.
[0043] (3) Hardware implementation meets the hardware cost requirements of lightweight cryptography. The number of GE required for BPRR hardware implementation is 2927.
[0044] (4) Higher efficiency. The encryption speed of LBPRR and other lightweight block ciphers was measured in an Intel(R) Core(TM) CPU i5-6300HQ, 2.3GHz, 8GB memory, and C++ programming environment, as shown in Table 4. The test results show that BPRR is more efficient than most lightweight block ciphers, including Speck proposed by the US National Security Agency.
[0045] Table 4 Speed comparison of BPRR and other lightweight block ciphers
[0046]
[0047] (5) Security. The security of BPRR is verified through differential analysis and impossible differential analysis.
[0048] (a) Differential analysis: When the differential provided by the constant is not taken into account and the number of cyclic shifts is fixed to 1, a type of differential path with a high probability of propagating from itself to itself after two rounds of iterations is found. The overall probability of this type of differential is 2 -5 For BPRR, each round of iteration has three different cyclic shift numbers and three constants. At the same time, the probability of modulo addition difference of four words is smaller. Therefore, 20 rounds of BPRR can provide at least 2 120 The ability to resist differential analysis meets the security requirements of lightweight passwords.
[0049] (b) Impossible differential analysis: Through analysis, we know that in BPRR, each round has three different cyclic shift numbers and grows faster, so the speed at which the uncertain bit propagates to the last bit is also faster. From this analysis, we can conclude that the number of impossible differential attack rounds is less than 13. Therefore, BPRR with 20 iterations can completely resist impossible differential analysis and meet the security requirements of lightweight cryptography.
[0050] (6) It is applicable to both resource-constrained devices and resource-rich devices. Resource-constrained devices generally have common characteristics such as strictly limited power consumption, weak processor performance, and limited memory capacity. This makes traditional encryption algorithms with high strength and good security, but encryption algorithms that consume a lot of resources for software and hardware implementation cannot be better used in resource-constrained devices. At the same time, when common lightweight ciphers are used for communication between resource-rich terminals and resource-constrained terminals, the resource advantages of resource-rich terminals cannot be brought into play, and the efficiency is low. The greatest advantage of the present invention is that it provides a lightweight block cipher that can fully utilize the resource advantages of resource-rich terminals, is suitable for resource-constrained terminals, and has an efficiency comparable to that of conventional block ciphers. It is particularly suitable for secure communication between resource-constrained devices and resource-rich devices.
[0051] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A method for constructing a lightweight block cipher based on a parallel cyclic shift register, characterized in that: The construction method comprises the following steps: S1, key arrangement: arrange the master key K of length 16B to generate n=20 rounds of subkeys, and the length of each round of subkeys is 16B; S2, iterative encryption: XOR the block plaintext P of length 16B with the master key K, and use the parallel circular shift register PRR for 20 rounds of iterations. The iteration results of the i-th round are all XORed with the i-th round sub-key, i = 1, 2, ..., n; the output result of the last round is used as the block ciphertext C; In step S1, the process of arranging the master key K to generate n rounds of sub-keys includes the following steps: S11, the master key K is represented as 4 32-bit words concatenated: K = (K0||K1||K2||K3); S12, using a key arrangement algorithm to arrange the master key K into n rounds of subkeys, where the i-th round subkey k i =(k i,0 ||k i,1 ||k i,2 ||k i,3 ) is generated as follows: k i,0 =(K0<<<i)+i;k i,1 =(K1>>>i)+j;k i,2 =(K2<<<i)+j+i;k i,3 =(K3>>>i)+j–i; Where, j = 4*i, 1≤i≤20; <<< means circular left shift, >>> means circular right shift; + means modulo 2 32 addition; In step S2, the iterative encryption includes the following steps: S21, represent the group plaintext P as 4 32-bit words concatenated, P = (P0||P1||P2||P3); S22, XOR the block plaintext P with a length of 16B with the master key K, and calculate in, Indicates exclusive OR; S23, perform n rounds of iterations, and use the parallel circular shift register PRR to update P in each round of iteration: P0=P0+P1+P2+P3; P1=(P0<<<(m&31))+P1+1; P2=(P0<<<[(m+1)&31])+P2+3; P3=(P0<<<[(m+2)&31])+P3+5; The initial value of m is 1, and it is updated to m=m+3 after each iteration. When n rounds of iterations are completed, the corresponding block ciphertext C is generated.
Citation Information
Patent Citations
Method and system for generation of cipher round keys by bit-mixers
US20180176011A1
Iterative division apparatus, system and method forming plural quotient bits per iteration
US5442581A