A block encryption method, device and system

By using the block encryption method in resource-constrained environments such as the Internet of Things to generate subkeys and encrypt data, it solves the problem of difficulty in achieving efficient encryption with existing technology and achieves lightweight, low-power consumption and efficient encryption effects.

CN116388963BActive Publication Date: 2024-08-27STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +3
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310333086.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-08-27
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

Existing technology is difficult to achieve efficient encryption in resource-constrained environments such as the Internet of Things, and lacks lightweight encryption standards. International lightweight encryption algorithms have security issues and implementation difficulties.

Method used

A block encryption method is used to generate subkeys through the first round of functions, and the second round of functions and subkeys are used to encrypt data. The structure is simple, and modular addition operations are used to replace S boxes, which reduces energy consumption and memory requirements.

Benefits of technology

It improves encryption efficiency, reduces energy consumption and memory requirements, has the ability to resist side channel attacks, and is suitable for resource-constrained environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116388963B
    Figure CN116388963B
Patent Text Reader

Abstract

The present invention discloses a group encryption method, device and system, the method comprising: inputting an original key and a round number as input data into a first round function to obtain a number of subkeys related to the round number; grouping the original data to obtain a number of groups of data; and inputting each group of data and all subkeys related to the round number as input data into a second round function to obtain a number of groups of encrypted data. The present invention can improve encryption efficiency and reduce required energy consumption and memory. The subkey generation process and data encryption process of the present invention are consistent and can resist related key attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data security transmission in a network environment, and in particular relates to a packet encryption method, device and system. Background Art

[0002] In order to prevent the confidentiality of data during network transmission, an encryption algorithm is usually used to encrypt the message to be sent into garbled code before transmission. After receiving the message, the receiver can decrypt the garbled code to restore it to the original message. The existing standard encryption algorithms include the international encryption standard AES and the Chinese encryption standard SM4. In resource-constrained environments such as the Internet of Things, China does not yet have a standard lightweight encryption standard, while the international ISO standard lightweight encryption algorithms HIGHT, PRESENT, CLEFIA and SIMON and SPECK proposed by the US NIST have emerged.

[0003] The research on lightweight encryption algorithms is still immature. The current standard encryption algorithms are often expensive to implement in software and hardware, and are even difficult to directly apply in environments with extremely limited resources. China currently does not have a standard lightweight encryption algorithm. The various lightweight encryption standard algorithms proposed internationally also have various problems, such as the full-round attack of HIGHT, the non-random distinguisher of the PRESENT algorithm, the heavy weight of CLEFIA hardware implementation, and the lack of security self-assessment results of SIMON and SPECK. Summary of the invention

[0004] In view of the above problems, the present invention proposes a block encryption method, device and system, which can improve encryption efficiency and reduce required energy consumption and memory.

[0005] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:

[0006] In a first aspect, the present invention provides a block encryption method, comprising:

[0007] The original key and the round number are used as input data and input into the first round function to obtain a number of sub-keys related to the round number;

[0008] Group the original data to obtain several groups of data;

[0009] Each group of data and all subkeys related to the round number are input as input data to the second round function to obtain several groups of encrypted data.

[0010] Optionally, the first round function and the second round function have the same structure, both comprising N logical units connected in sequence;

[0011] The structures of the logic units are the same, and all include a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module;

[0012] One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module;

[0013] The other end of the second XOR module is used as another input end of the logic unit;

[0014] The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit;

[0015] The other end of the second cyclic shift module is connected to one end of the modular addition module;

[0016] The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit.

[0017] Optionally, before the original key is input as input data to the first round function, the method further includes: dividing the original key into two keys, k0 and t0;

[0018] The output expressions of each logic unit in the first round function are:

[0019]

[0020] In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c i represents the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=1,2,…N.

[0021] Optionally, the output expression of each logic unit in the second round function is:

[0022]

[0023] In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, ki represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=0,2,…N-1.

[0024] Optionally, when the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, a padding operation is performed on the last group of data so that the length of the padded data is equal to the group length.

[0025] In a second aspect, the present invention provides a block encryption device, comprising:

[0026] A subkey acquisition module, used to input the original key and the round number as input data into the first round function to obtain a number of subkeys related to the round number;

[0027] A grouping module is used to group the original data to obtain several groups of data;

[0028] The encryption module is used to input each group of data and all subkeys related to the round number as input data to the second round function to obtain several groups of encrypted data.

[0029] Optionally, the first round function and the second round function have the same structure, both comprising N logical units connected in sequence;

[0030] The structures of the logic units are the same, and all include a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module;

[0031] One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module;

[0032] The other end of the second XOR module is used as another input end of the logic unit;

[0033] The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit;

[0034] The other end of the second cyclic shift module is connected to one end of the modular addition module;

[0035] The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit.

[0036] Optionally, before the original key is input as input data to the first round function, the method further includes: dividing the original key into two keys, k0 and t0;

[0037] The output expressions of each logic unit in the first round function are:

[0038]

[0039] In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c i represents the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=1,2,…N.

[0040] Optionally, the output expression of each logic unit in the second round function is:

[0041]

[0042] In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, k i represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=0,2,…N-1.

[0043] Optionally, when the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, a padding operation is performed on the last group of data so that the length of the padded data is equal to the group length.

[0044] In a third aspect, the present invention provides a block encryption system, including a storage medium and a processor;

[0045] The storage medium is used to store instructions;

[0046] The processor is configured to operate according to the instructions to execute the method according to any one of the first aspects.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] The present invention utilizes a first round function to generate a plurality of subkeys, and utilizes a second round function and all subkeys related to the round number to implement data encryption, which can not only improve encryption efficiency but also reduce required energy consumption and memory.

[0049] In the present invention, the logic units of the first round function and the second round function only include two cyclic shift modules, one modular addition module and two XOR modules, and the structure is simple, and the weight is reduced as much as possible.

[0050] The present invention adopts modular addition operation instead of S-box (the basic structure of symmetric key algorithm to perform permutation calculation) operation as the nonlinear component of the algorithm. Compared with the traditional algorithm with S-box, the software implementation efficiency has obvious advantages and the cost of protecting against side channel attacks is low.

[0051] The subkey generation process and data encryption process of the present invention are consistent and can resist related key attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments and in conjunction with the accompanying drawings, wherein:

[0053] Figure 1 A flowchart of a packet encryption method according to an embodiment of the present invention;

[0054] Figure 2 A schematic diagram of the structure of a first round function according to an embodiment of the present invention;

[0055] Figure 3 This is a schematic diagram of the structure of the second round function of an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the scope of protection of the present invention.

[0057] The application principle of the present invention is described in detail below in conjunction with the accompanying drawings.

[0058] Example 1

[0059] The present invention provides a block encryption method, such as Figure 1 As shown, the following steps are included:

[0060] (1) The original key and the round number are input into the first round function to obtain a number of subkeys related to the round number;

[0061] (3) Grouping the original data to obtain several groups of data;

[0062] (3) Each group of data and all subkeys related to the round number are input as input data to the second round function to obtain several groups of encrypted data.

[0063] In a specific implementation of the embodiment of the present invention, Figure 2-3 As shown, the structures of the first round function and the second round function are the same, but the input and output data of the first round function and the second round function are different; the first round function and the second round function both include N logical units connected in sequence; the structures of the logical units are the same, including a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module;

[0064] One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module;

[0065] The other end of the second XOR module is used as another input end of the logic unit;

[0066] The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit;

[0067] The other end of the second cyclic shift module is connected to one end of the modular addition module;

[0068] The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit.

[0069] In a specific implementation of the embodiment of the present invention, before the original key is input as input data to the first round function, it also includes: dividing the original key into two keys, k0 and t0;

[0070] When the step of inputting the original key and the round number as input data into the first round function to obtain a plurality of subkeys related to the round number is executed, the output expression of each logic unit in the first round function is:

[0071]

[0072] In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c irepresents the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, represents bitwise modular addition, i=1,2,…N. In a specific implementation, x1 and x2 can be set to 13 and 22, or other parameters can be set to achieve similar security, such as 2 and 21, 22 and 13, etc. N can be set to 24. The length of each subkey can be set to 64, and N and the length of each subkey can also be set to other appropriate values.

[0073] When executing the step of inputting each group of data and all subkeys related to the round number as input data to the second round function to obtain a plurality of groups of encrypted data, the output expression of each logic unit in the second round function is:

[0074]

[0075] In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, k i represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, represents bit modular addition, i=0,2,…N-1. In the specific implementation process, x1 and x2 can be set to 13 and 22, and other parameters can also be set to achieve similar security, such as 2 and 21, 22 and 13, etc. N can be set to 24. The length of each group of data can be set to 64, and N and the length of each subkey can also be set to other appropriate values.

[0076] In a specific implementation of an embodiment of the present invention, when the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, the last group of data is padded so that the length of the padded data is equal to the group length.

[0077] In particular, in the present invention, in order to improve the security of the algorithm, the parameters of the two cyclic left shift operations in the round function are set to 13 and 22.

[0078] In addition to the above parameters, other parameters can also be set to achieve similar security, such as 2 and 21, 22 and 13.

[0079] The packet encryption method of the present invention has the advantages of light weight, high efficiency, low power consumption and small amount of memory during data transmission. The packet encryption method in the embodiment of the present invention can be used for small devices such as power IoT sensor equipment with limited computing and storage resources.

[0080] The block encryption method in the embodiment of the present invention is described in detail below in conjunction with a specific implementation method.

[0081] Set the packet length to 64 bits and the number of cycles to 24.

[0082] If the original data is larger than 64 bits, the original data is grouped and the grouped data less than 64 bits are padded with zeros, and then each group of data is divided into two left and right branches. To generate 64-bit output, proceed as follows

[0083] If the original data is exactly 64 bits, the original data is directly divided into left and right branches To generate 64-bit output, proceed as follows

[0084]

[0085] From 64-bit plaintext Initially, the process requires 23 updates, i.e., i=0,1,…,22.

[0086] Finally, execute

[0087]

[0088] Generate 64-bit ciphertext Among them, k i is the subkey of round i=0,1,…,23, and its generation process is as follows:

[0089] Assume that the 64-bit master key is divided into two parts: left and right By (k i ,t i ) generates (k i+1 ,t i+1 ), the update process of i=0,1,…,23 is as follows:

[0090]

[0091] Test vector:

[0092] Plain text: 0x0123456789abcdef

[0093] Key: 0x0123456789abcdef

[0094] Ciphertext: 0x8441cbc2ea3eff46.

[0095] Example 2

[0096] An embodiment of the present invention provides a packet encryption device, including:

[0097] A subkey acquisition module, used to input the original key and the round number as input data into the first round function to obtain a number of subkeys related to the round number;

[0098] A grouping module is used to group the original data to obtain several groups of data;

[0099] The encryption module is used to input each group of data and all subkeys related to the round number as input data to the second round function to obtain several groups of encrypted data.

[0100] In a specific implementation of the embodiment of the present invention, Figure 2-3 As shown, the structures of the first round function and the second round function are the same, but the input and output data of the first round function and the second round function are different; the first round function and the second round function both include N logical units connected in sequence; the structures of the logical units are the same, including a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module;

[0101] One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module;

[0102] The other end of the second XOR module is used as another input end of the logic unit;

[0103] The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit;

[0104] The other end of the second cyclic shift module is connected to one end of the modular addition module;

[0105] The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit.

[0106] In a specific implementation of the embodiment of the present invention, before the original key is input as input data to the first round function, it also includes: dividing the original key into two keys, k0 and t0;

[0107] When the step of inputting the original key and the round number as input data into the first round function to obtain a plurality of subkeys related to the round number is executed, the output expression of each logic unit in the first round function is:

[0108]

[0109] In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c i represents the i-th round, x1 and x2 represent the shifting bits of the first cyclic shift module and the second cyclic shift module respectively, and <<< represents left cyclic shift. represents XOR, represents bitwise modular addition, i=1,2,…N. In a specific implementation, x1 and x2 can be set to 13 and 22, or other parameters can be set to achieve similar security, such as 2 and 21, 22 and 13, etc. N can be set to 24. The length of each subkey can be set to 64, and N and the length of each subkey can also be set to other appropriate values.

[0110] When executing the step of inputting each group of data and all subkeys related to the round number as input data to the second round function to obtain a plurality of groups of encrypted data, the output expression of each logic unit in the second round function is:

[0111]

[0112] In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, k i represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, represents bit modular addition, i=0,2,…N-1. In the specific implementation process, x1 and x2 can be set to 13 and 22, and other parameters can also be set to achieve similar security, such as 2 and 21, 22 and 13, etc. N can be set to 24. The length of each group of data can be set to 64, and N and the length of each subkey can also be set to other appropriate values.

[0113] In a specific implementation of an embodiment of the present invention, when the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, the last group of data is padded so that the length of the padded data is equal to the group length.

[0114] The working process of the block encryption device in the embodiment of the present invention is described in detail below in conjunction with a specific implementation method.

[0115] Set the packet length to 64 bits and the number of cycles to 24.

[0116] If the original data is larger than 64 bits, the original data is grouped and the grouped data less than 64 bits are padded with zeros, and then each group of data is divided into two left and right branches. To generate 64-bit output, proceed as follows

[0117] If the original data is exactly 64 bits, the original data is directly divided into left and right branches To generate 64-bit output, proceed as follows

[0118]

[0119] From 64-bit plaintext Initially, the process requires 23 updates, i.e., i=0,1,…,22.

[0120] Finally, execute

[0121]

[0122] Generate 64-bit ciphertext Among them, k i is the subkey of round i=0,1,…,23, and its generation process is as follows:

[0123] Assume that the 64-bit master key is divided into two parts: left and right By (k i ,t i ) generates (k i+1 ,t i+1 ), the update process of i=0,1,…,23 is as follows:

[0124]

[0125] Test vector:

[0126] Plain text: 0x0123456789abcdef

[0127] Key: 0x0123456789abcdef

[0128] Ciphertext: 0x8441cbc2ea3eff46.

[0129] Example 3

[0130] Based on the same inventive concept as that of Embodiment 1, the present invention provides a block encryption system, including a storage medium and a processor;

[0131] The storage medium is used to store instructions;

[0132] The processor is configured to operate according to the instructions to execute the method according to any one of the embodiments 1.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0135] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

[0138] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A block encryption method, It is characterized in that include: The original key and the round number are used as input data and input into the first round function to obtain a number of sub-keys related to the round number; Group the original data to obtain several groups of data; Each group of data and all subkeys related to the round number are input as input data to the second round function to obtain several groups of encrypted data; The first round function and the second round function have the same structure, both comprising N logical units connected in sequence; The structures of the logic units are the same, and all include a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module; One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module; The other end of the second XOR module is used as another input end of the logic unit; The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit; The other end of the second cyclic shift module is connected to one end of the modular addition module; The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit; Before the original key is input as input data to the first round function, it also includes: Divide the original key into k 0 and t 0 Two keys; The output expressions of each logic unit in the first round function are: In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c i represents the i-th round, x1 and x2 represent the shifting bits of the first cyclic shift module and the second cyclic shift module respectively, and <<< represents left cyclic shift. represents XOR, Represents bitwise addition, i=1,2,…N; The output expression of each logic unit in the second round function is: In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, k i represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=0,2,…N-1.

2. A block encryption method according to claim 1, Features: When the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, a padding operation is performed on the last group of data so that the length of the padded data is equal to the group length.

3. A block encryption device, It is characterized in that include: A subkey acquisition module, used to input the original key and the round number as input data into the first round function to obtain a number of subkeys related to the round number; A grouping module is used to group the original data to obtain several groups of data; An encryption module, used for inputting each group of data and all subkeys related to the round number as input data to a second round function to obtain a plurality of groups of encrypted data; The first round function and the second round function have the same structure, both comprising N logical units connected in sequence; The structures of the logic units are the same, and all include a first cyclic shift module, a second cyclic shift module, a first XOR module, a second XOR module and a modular addition module; One end of the first cyclic shift module is connected to one end of the first XOR module and is used as one of the input ends of the logic unit, and the other end is connected to one end of the second XOR module; The other end of the second XOR module is used as another input end of the logic unit; The other end of the first XOR module is connected to one end of the second cyclic shift module and is used as one of the output ends of the logic unit; The other end of the second cyclic shift module is connected to one end of the modular addition module; The other end of the analog addition module is connected to the other end of the second XOR module and is used as another output end of the logic unit; Before the original key is input as input data to the first round function, the process also includes: dividing the original key into k 0 and t 0 Two keys; The output expressions of each logic unit in the first round function are: In the formula, k i+1 and t i+1 They represent the two output subkeys of the i-th logical unit, k i and t i They represent the two input subkeys of the i-th logical unit, c i represents the i-th round, x1 and x2 represent the shifting bits of the first cyclic shift module and the second cyclic shift module respectively, and <<< represents left cyclic shift. represents XOR, Represents bitwise addition, i=1,2,…N; The output expression of each logic unit in the second round function is: In the formula, and Respectively represent the two output data of the i-th logic unit, and Respectively represent the two input data of the i-th logic unit, k i represents the key of the i-th round, x1 and x2 represent the number of shifts of the first cyclic shift module and the second cyclic shift module respectively, <<< represents left cyclic shift, represents XOR, Represents bit modular addition, i=0,2,…N-1.

4. A block encryption device according to claim 3, It is characterized in that When the original data is grouped to obtain several groups of data, if the length of the last group of data is less than the group length, a padding operation is performed on the last group of data so that the length of the padded data is equal to the group length.

5. A block encryption system, Features: including storage media and processors; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Implementation method of novel lightweight block cipher CORL

    CN111431697A

  • Lightweight block cipher encryption and decryption method

    CN113645615A

  • Lightweight encryption method capable of accepting any plaintext length

    CN114513298A

  • Implementation method and device of lightweight block cipher algorithm RainSP and electronic equipment

    CN115314187A

  • Internet of Things security encryption method and device, storage medium and electronic equipment

    CN115694796A