Large-adjustment adjustable block cipher working mode design method
By designing a largely adjustable adjustable grouping password working mode, the combined encryption of blocked handle adjustment and keys is solved, and the problem of insufficient handle adjustment length in the prior art is achieved, which significantly improves the handle length while ensuring security, and is suitable for a variety of scenarios.
Patent Information
- Application Number
- CN202411696660.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The existing adjustable packet passwords are difficult to increase the length of the adjustable handle while ensuring security, limiting their application in specific scenarios.
A largely adjustable adjustable grouping password working mode is designed. By blocking the adjusting handle into five minor handles, and using these minor handles and keys to encrypt and decrypt the plaintext block, the length of the adjusting handle is achieved.
Without losing security, this method significantly increases the length of the handle adjustment, reaching five times the grouping length, meeting the needs of adjustable grouping password handle adjustment in various scenarios.
Smart Images

Figure CN119814281A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of information security, and in particular relates to a design method for a highly adjustable block cipher working mode. Background Art
[0002] Tweakable Block Cipher is the main technology for disk encryption, designing lightweight authenticated encryption protocols, and implementing lightweight block ciphers to resist side channel attacks. In disk encryption, information such as disk name, address, and encryption time are usually used as handles for encryption, so as to achieve the effect of using the same key to encrypt different disks differently. In authenticated encryption protocols, publicly available information is used as handles, and the authentication code is obtained by encrypting with a tunable block cipher. This has the advantages of no information loss and low computational overhead, and is the mainstream technology in resource-constrained lightweight scenarios. The main way for lightweight block ciphers to resist side channel attacks is to use masks to split and protect the target value. Because the tunable block cipher contains handles in its components, it has a natural advantage as a carrier of the mask in the password design. At present, the lightweight block cipher candidate schemes in the NIST standard are all implemented based on tunable block ciphers. The ways to design a tunable block cipher include: ① Directly design or modify the existing block cipher algorithm according to the specific needs of the scenario (the length of the block, the number and length of the mask, and the software and hardware implementation of the cipher); ② Use the standard block cipher algorithm as a black box to imitate the design of the working mode to design a tunable block cipher.
[0003] The adjustable block cipher designed according to method ① has the problem of lack of provable security. It can only be analyzed for simple security in combination with specific scenarios. On the one hand, it is difficult to take advantage of the standardization of block ciphers. On the other hand, the scope of use is often limited to specific design scenarios and difficult to reuse. For example, in the design of the HOMA working mode, the arbitrarily divided handle in the SKINNY algorithm is changed to a fixed length for segmentation, and the original framework is modified in combination with the underlying hardware (linear feedback shift register LFSR) to obtain a new adjustable block cipher - SKINNYee. This algorithm has the disadvantages of being difficult to prove security and difficult to reuse after leaving HOMA. The main problem with the design method of method ② is that the handle length is too small. Currently, the largest G2 among the adjustable block ciphers with provable security can only provide a handle length that is twice the block size. However, the handle length required in specific scenarios is much larger than this. For example, in the above-mentioned HOMA, the handle length of the adjustable block cipher needs to reach five times the block length. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] The technical problem to be solved by the present invention is how to provide a method for designing a block cipher working mode that can be adjusted to a large extent, so as to increase the length of the adjustment handle while ensuring security, and facilitate the use in specific scenarios.
[0006] (II) Technical solution
[0007] In order to solve the above technical problems, the present invention proposes a method for designing a block cipher working mode that can be adjusted greatly, and the method comprises the following steps:
[0008] S1. Initialization
[0009] Key generation: First, a fixed-length binary string needs to be generated as the key K to obfuscate the data;
[0010] S2. Encryption process
[0011] The plaintext is divided into groups to obtain plaintext blocks. A handle T is input for each plaintext block. The handle is divided into five small handles of fixed length. The internal variables corresponding to the five small handles are calculated. The plaintext block is encrypted using the five small handles, the internal variables and the key K to obtain the corresponding ciphertext block. All ciphertext blocks are linked together in order to form the final ciphertext.
[0012] S3. Decryption process
[0013] Get the ciphertext, key K and handle T corresponding to each plaintext block, group the ciphertext according to the same length during encryption to obtain multiple ciphertext blocks, divide the handle into five small handles according to a fixed length, calculate the internal variables corresponding to the five small handles, use the five small handles, internal variables and key K to decrypt the ciphertext block to obtain the corresponding plaintext block, and link all the plaintext blocks together in sequence to form the final plaintext.
[0014] (III) Beneficial effects
[0015] The present invention proposes a method for designing a working mode of a tunable block cipher that can be adjusted greatly. The tunable block cipher proposed in the present invention only relies on the block cipher instead of the hash function in design, thereby avoiding the loss of the adjustment handle information. It can be implemented using a standard block algorithm and its security is consistent with the block algorithm used, which is convenient for use in various scenarios. Compared with the existing provably secure tunable block cipher, the M2 proposed in the present invention can accommodate a greatly increased adjustment handle length, reaching five times the block length, which basically meets the needs for the adjustment handle length of the tunable block cipher in currently known scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a schematic diagram of the working process of the adjustable block cipher;
[0017] Figure 2 It is a schematic diagram of the structure of M2 of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0019] The purpose of the present invention is to propose an adjustable block cipher with a handle length of five times the block length and provably secure. The block cipher is only called as a black box, and the input and output of the block cipher are protected using internal variables encrypted by the handle, thereby increasing the length of the handle while ensuring security and facilitating use in specific scenarios.
[0020] The present invention proposes a method for designing a block cipher operation mode that can be adjusted greatly, the method comprising:
[0021] M2 is a tunable block cipher designed as a black box. It is similar in structure to the block cipher working mode. It uses the tuning handle and the internal variables encrypted by the tuning handle to adjust the input, output and key of the block cipher to encrypt the data block. The following specific implementation is described using a framework similar to the block cipher working mode:
[0022] S1. Initialization
[0023] Key generation: First, a fixed-length binary string needs to be generated as the key K to obfuscate the data.
[0024] S2. Encryption process
[0025] The plaintext is divided into groups to obtain plaintext blocks, a handle T is input for each plaintext block, the handle is divided into five small handles according to a fixed length, the internal variables corresponding to the five small handles are calculated, the five small handles, the internal variables and the key K are used to encrypt the plaintext block to obtain the corresponding ciphertext block, and all the ciphertext blocks are linked together in sequence to form the final ciphertext; specifically, it includes:
[0026] S21. Grouping: Group the plaintext according to fixed length to obtain multiple plaintext blocks.
[0027] S22. Input handle T: Input a binary string as a handle for each plaintext block, and the length of the string shall not exceed five times the fixed length. If the handle corresponding to each plaintext block is 0, it is weakened to ECB block encryption mode.
[0028] S23, handle preprocessing: If the length of T is not five times the fixed length, then add 0 to the end of the binary string until it is five times the fixed length, and then divide it into five small handles t1, t2, t3, t4, t5 according to the fixed length.
[0029] S24, calculate internal variables: for t1, t3, t5, use key K to directly encrypt to obtain the corresponding internal variables y1, y3, y5; for t2, t4, first perform XOR with key K and then encrypt the result with key K to obtain the corresponding internal variables y2, y4.
[0030] S25. Calculate the key and encrypt: The key actually used for encrypting each plaintext block is the generated key K, the minor handles t1, t5 and the XOR result z of the internal variables y2, y3, y4; the plaintext block is XORed with the internal variables y1, y2 to obtain x, and the XOR result x is encrypted; the encrypted result y is XORed with the internal variables y4, y5 to obtain the ciphertext block c corresponding to the plaintext block.
[0031] S26. Output ciphertext: Link all ciphertext blocks together in order to form the final ciphertext.
[0032] S3. Decryption process
[0033] Obtain the ciphertext, key K, and handle T corresponding to each plaintext block, group the ciphertext according to the same length during encryption to obtain multiple ciphertext blocks, divide the handle into five small handles according to a fixed length, calculate the internal variables corresponding to the five small handles, use the five small handles, internal variables, and key K to decrypt the ciphertext block to obtain the corresponding plaintext block, and link all the plaintext blocks together in order to form the final plaintext. Specifically,
[0034] S31. Receive information: obtain the ciphertext, key K and handle T corresponding to each plaintext block.
[0035] S32, grouping: group the ciphertext according to the same length as that used in encryption to obtain multiple ciphertext blocks.
[0036] S33. Handle preprocessing: If the length of T is not five times the fixed length, then add 0 to the end of the binary string until it is five times the fixed length, and then divide it into five small handles t1, t2, t3, t4, t5 according to the fixed length.
[0037] S34, calculate internal variables: for t1, t3, t5, use key K to directly encrypt to obtain corresponding internal variables y1, y3, y5; for t2, t4, first perform XOR with key K and then encrypt the result with key K to obtain corresponding internal variables y2, y4.
[0038] S35. Calculate the key and decrypt: The key actually used for decrypting each ciphertext block is the generated key K, the minor handles t1, t4 and the XOR result z of the internal variables y2, y3, y4; the ciphertext block is XORed with the internal variables y4, y5, and the XOR result is decrypted; the decrypted result is XORed with the internal variables y1, y2 to obtain the plaintext block corresponding to the ciphertext block.
[0039] S36. Output ciphertext: link all plaintext blocks together in order to form the final plaintext.
[0040] Features and precautions of the present invention
[0041] 1. Parallelization: The process of calculating internal variables and the process of encrypting and decrypting each plaintext block can be performed in parallel, improving the efficiency of encryption and decryption.
[0042] 2. Security: The security of M2 depends on the choice of encryption algorithm and the confidentiality of the key. You can choose the corresponding encryption standard according to the specific security required by the scenario. The handle does not need to be kept confidential, and it can be proved that even if the adversary can control the handle, he cannot attack the key.
[0043] 3. Error propagation: Each plaintext block and ciphertext block do not affect each other during encryption and decryption. Errors generated during transmission will only cause errors in the decryption of the current ciphertext block and will not affect the decryption of other ciphertext blocks.
[0044] 4. Data dependency: The generation of each ciphertext block depends only on the corresponding handle. As long as the handles used are different, the ciphertexts obtained by encrypting the same plaintext with the same key will be different.
[0045] The adjustable block cipher proposed in the present invention is designed to rely only on block ciphers without using hash functions, thereby avoiding the loss of handle information. It can be implemented using a standard block algorithm and its security is consistent with the block algorithm used, making it easy to use in various scenarios. Compared with the existing adjustable block ciphers with provable security, the handle length that can be accommodated by M2 proposed in the present invention has been greatly improved, reaching five times the block length, which basically meets the needs for the handle length of adjustable block ciphers in currently known scenarios.
[0046] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for designing a highly adjustable block cipher operating mode, characterized in that: The method comprises the following steps: S1. Initialization Key generation: First, a fixed-length binary string needs to be generated as the key K to obfuscate the data; S2. Encryption process The plaintext is divided into groups to obtain plaintext blocks. A handle T is input for each plaintext block. The handle is divided into five small handles of fixed length. The internal variables corresponding to the five small handles are calculated. The plaintext block is encrypted using the five small handles, the internal variables and the key K to obtain the corresponding ciphertext block. All ciphertext blocks are linked together in order to form the final ciphertext. S3. Decryption process Get the ciphertext, key K and handle T corresponding to each plaintext block, group the ciphertext according to the same length during encryption to obtain multiple ciphertext blocks, divide the handle into five small handles according to a fixed length, calculate the internal variables corresponding to the five small handles, use the five small handles, internal variables and key K to decrypt the ciphertext block to obtain the corresponding plaintext block, and link all the plaintext blocks together in sequence to form the final plaintext.
2. The method for designing a highly adjustable block cipher operating mode as claimed in claim 1, characterized in that: The grouping of the plaintext to obtain plaintext blocks includes: grouping the plaintext according to fixed lengths to obtain multiple plaintext blocks.
3. The method for designing a block cipher operating mode with large adjustment as claimed in claim 2, characterized in that: Inputting a handle T for each plaintext block includes: inputting a binary string as a handle for each plaintext block, wherein the length of the string does not exceed five times of the fixed length.
4. The method for designing a block cipher operating mode with large adjustment capability as claimed in claim 3, characterized in that: The step of dividing the handle into five small handles according to a fixed length includes: if the length of T is not five times the fixed length, then padding the binary string with 0 to five times the fixed length, and then dividing the handle into five small handles t1, t2, t3, t4, t5 according to the fixed length.
5. The method for designing a block cipher operating mode with large adjustment capability as claimed in claim 4, characterized in that: The calculation of the internal variables corresponding to the five minor handles includes: for t1, t3, t5, using the key K to directly encrypt to obtain the corresponding internal variables y1, y3, y5; for t2, t4, first performing XOR with the key K and then encrypting the obtained results using the key K to obtain the corresponding internal variables y2, y4.
6. The method for designing a highly adjustable block cipher operating mode as claimed in claim 5, characterized in that: The method of using five small handles, internal variables and key K to encrypt a plaintext block to obtain a corresponding ciphertext block includes: the key actually used when encrypting each plaintext block is the generated key K, small handles t1, t5 and the XOR result z of the internal variables y2, y3, y4; the plaintext block is XORed with the internal variables y1, y2 to obtain x, and the XOR result x is encrypted; the encrypted result y is XORed with the internal variables y4, y5 to obtain a ciphertext block c corresponding to the plaintext block.
7. The method for designing a block cipher operating mode capable of being adjusted to a large extent as claimed in claim 6, characterized in that: The method of using five small handles, internal variables and key K to decrypt the ciphertext block to obtain the corresponding plaintext block includes: the key actually used when decrypting each ciphertext block is the generated key K, small handles t1, t4 and the XOR result z of the internal variables y2, y3, y5; the ciphertext block is XORed with the internal variables y4, y5, and the XOR result is decrypted; the decrypted result is XORed with the internal variables y1, y2 to obtain the plaintext block corresponding to the ciphertext block.
8. The method for designing a block cipher operating mode capable of being adjusted to a large extent as claimed in claim 7, characterized in that: The process of calculating the internal variables is carried out in parallel with the encryption process of each plaintext block.
9. The method for designing a block cipher operating mode capable of being adjusted to a large extent as claimed in claim 7, characterized in that: The process of calculating the internal variables is carried out in parallel with the decryption process of each plaintext block.
10. The method for designing a highly adjustable block cipher operating mode as claimed in claim 7, characterized in that: Select the appropriate encryption standard based on the security requirements of the scenario, and the handle does not need to be kept confidential.
Citation Information
Patent Citations
Lightweight adjustable block cipher implementation method and system, electronic equipment and readable storage medium
CN112287333A
Adjustable block cipher implementation method compatible with SM4 cryptographic algorithm
CN117134885A
Block encryption device, block decryption device, block encryption method, block decryption method and program
US20120314857A1
Tweakable block ciphers for secure data encryption
US20210266143A1