Method, device and storage medium for block cipher algorithm working with combined feedback

The working mode Cb_BC of the block cipher algorithm, designed by combining feedback functions, solves the security problem of block cipher algorithms under block-by-block attacks, and achieves high efficiency, security and flexibility in online message processing application scenarios.

CN116015607BActive Publication Date: 2026-03-03NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211463577.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2026-03-03
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing block cipher algorithms are not secure enough under block-by-block attack models and cannot effectively resist block-by-block attacks. They also have security and efficiency issues in online message processing applications.

Method used

A block cipher algorithm with combined feedback is adopted. The previous plaintext encryption result and the feedback variable are XORed and then encrypted by the combined feedback function. During decryption, the previous ciphertext and the feedback variable are XORed by the combined feedback function. A new Cb_BC mode is designed to enhance security and reduce the processing weight.

Benefits of technology

It achieves CPA security and BW-CPA security with nodalization, enhancing the security and efficiency of online message processing, and is suitable for resource-constrained devices and real-time systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116015607B_ABST
    Figure CN116015607B_ABST
Patent Text Reader

Abstract

The application provides a working method of a block cipher algorithm with combined feedback, wherein, during encryption, a previous plaintext encryption result and a feedback variable generated in a previous encryption process are input into a combined feedback function to obtain a feedback variable required in a current encryption process, the obtained feedback variable is subjected to an XOR operation with a current plaintext, and then the plaintext is subjected to encryption processing to obtain ciphertext after encryption of the current plaintext; during decryption, a previous ciphertext and a feedback variable generated in a previous decryption process are input into the combined feedback function to obtain a feedback variable required in a current decryption process, the current ciphertext is subjected to decryption processing, and then a result obtained through the decryption processing is subjected to an XOR operation with the feedback variable to obtain plaintext after decryption of the current ciphertext; wherein, the feedback variable required in the first encryption or decryption can be set according to requirements. The application has CPA security and BW-CPA security based on a non-repeated nonce, can be implemented in an online mode, and is applied to an online message processing application scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication encryption technology, and in particular to a block cipher algorithm with combined feedback, its working method, device, and storage medium. Background Technology

[0002] Block ciphers, as one of the core algorithms in symmetric cryptography, are characterized by fast encryption and decryption speeds and ease of implementation in both hardware and software. They typically consist of an encryption algorithm, a decryption algorithm, and a key generation algorithm. In practical applications, the plaintext to be encrypted is generally not of fixed length or a single data block; therefore, block cipher modes of operation are needed to encrypt the data. Block cipher modes of operation are a typical symmetric encryption scheme, including encryption / decryption modes, authentication modes, authentication-encryption modes, hash modes, random number generator modes, disk sector encryption modes, key encapsulation modes, and data format preservation modes. These modes of operation allow the block cipher algorithm to process messages of arbitrary length, achieving cryptographic functions such as confidentiality, authentication, integrity, and random number (or random number sequence) derivation. Examples include encryption modes for confidentiality, authentication modes for integrity, and authentication-encryption modes that simultaneously achieve confidentiality and integrity.

[0003] Block cipher algorithms must ensure security while satisfying applicability. The encryption modes of block cipher algorithms are mainly considered in two scenarios: conventional attack models and block-by-block attack models. In the conventional Chosen-Plaintext Attack (CPA) model, the message processed by the cryptographic scheme is submitted as a single unit. However, in some practical online applications, message submission and processing are performed block-by-block. For example, in real-time applications, due to the randomness of real-time events and the uncertainty of system operating states, messages cannot be submitted as a single unit; or some resource-constrained cryptographic devices (such as smart cards) need to process long messages in segments due to limited storage space. It is important to note that these online message processing application scenarios lead to a new type of attack—block-by-block attacks. Compared to conventional attack models, in a block-by-block attack model, an adversary can control the input of messages in blocks during a single interrogation and obtain responses. Taking the BlockWise adaptive Chosen-Plaintext Attack (BW-CPA) as an example, an adversary can submit messages block by block during encrypted interrogation, a capability not possessed by adversaries in conventional attack models. The block-by-block attack model is closely related to the online implementation of cryptographic schemes. From a practical implementation perspective, if a cryptographic scheme cannot resist block-by-block attacks, it cannot be applied to real-time systems, resource-constrained devices, and other application scenarios involving online message processing.

[0004] From a practical application perspective, the existing BC (Block Conflict) pattern has limitations in practicality and security. For example, its IV value cannot be used as a nonce. Although the chain structure of the BC pattern has online characteristics, its online implementation is insecure and cannot be applied to online message processing scenarios. To address the reliance of the encryption mode on the randomness of the IV value, Rogaway's approach uses two keys. One key is used to encrypt the nonce value, and the resulting ciphertext is used as the initial value of the feedback variable. The other key is used as the encryption key during plaintext message processing. This modification makes the mode's operating efficiency close to the original mode, but this method requires a large number of keys and is not resistant to BW-CPA. To address the BW-CPA resistance issue, Fouque et al. proposed a general method—delaying the ciphertext output by one block—and proved that it can resist BW-CPA. However, the security of the new mode obtained by this method still depends on the randomness of the IV value and may reduce the response efficiency of the application system. Summary of the Invention

[0005] To address the problems existing in the prior art, a working method, device and storage medium of a block cipher algorithm with combination feedback are provided. The BC encryption mode is improved by using strategies and design methods such as security enhancement design of encryption nonce, XE structure and combination feedback function, and lightweight design of existing CbF combination feedback function without reducing security.

[0006] The technical solution adopted in this invention is as follows: a working method for a block cipher algorithm with combination feedback.

[0007] During encryption, the encryption result of the previous plaintext and the feedback variable generated by the previous encryption process are input into the combined feedback function to obtain the feedback variable required for the current encryption process. The obtained feedback variable is XORed with the current plaintext and then encrypted to obtain the ciphertext after the current plaintext is encrypted.

[0008] During decryption, the previous ciphertext and the feedback variables generated in the previous decryption process are input into the combined feedback function to obtain the feedback variables required for the current decryption process. The current ciphertext is then decrypted, and the result of the decryption process is XORed with the feedback variables to obtain the plaintext after the current ciphertext is decrypted.

[0009] The feedback variables required for the initial encryption or decryption can be set according to the requirements.

[0010] Furthermore, the combined feedback function is: Where F is the input feedback variable, C is the input ciphertext, I1 is the feedback variable used for XOR operation with plaintext, and I2 is the feedback variable used for input combination feedback function in the next encryption or decryption process;

[0011] for , Combined feedback function The specific calculation is as follows:

[0012]

[0013]

[0014] Among them, the function A special example of the operation is: Let ,but

[0015] .

[0016] Furthermore, the encryption process is as follows:

[0017] Step 1: Set initial feedback variables FB1 and F1 for plaintext P. i Encryption is performed, i = 1…m; i is initially set to 1;

[0018] Step 2: For the feedback variable FB i With plaintext P i Perform an XOR operation, then encrypt to obtain the encrypted result C. i ;

[0019] Step 3: If i < m, then encrypt the result C. i With feedback variable F i+1 The input is fed into the combined feedback function to obtain the feedback variable FB for the next encryption process. i+1 F i+1 Increment the value of i by 1; otherwise, output the encrypted result directly; repeat steps 2-3 to obtain all plaintext encrypted results.

[0020] Furthermore, the decryption process is as follows:

[0021] Step 1: Set initial feedback variables FB1 and F1, and decrypt plaintext Ci, i=1…m; i is initially set to 1;

[0022] Step 2, process ciphertext C i Decrypt and compare the decryption result with the feedback variable FB. i Perform an XOR operation to obtain the plaintext;

[0023] Step 3: If i < m, then the ciphertext C i With feedback variable F i The input is fed into the combined feedback function to obtain the feedback variable FB for the next decryption process. i+1 F i+1 Increment the value of i by 1; otherwise, output the encrypted result directly; repeat steps 2-3 to obtain all plaintext.

[0024] Furthermore, the combined feedback function for the encryption and decryption processes is as follows:

[0025]

[0026] in, For combined feedback functions, For the input feedback variable, The encrypted result of the input; The feedback variable FB is the output. i+1 , The feedback variable F is the output. i+1 .

[0027] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed according to the above-described block cipher algorithm with combined feedback.

[0028] The present invention also proposes a computer-readable storage medium storing computer program instructions thereon, wherein the program instructions, when executed by a processor, are used to implement the process corresponding to the above-described block cipher algorithm with combination feedback.

[0029] Compared with existing technologies, the beneficial effects of adopting the above technical solution are as follows: This invention possesses CPA security based on non-repeating nonces and BW-CPA security, is not easily misused, and has confidentiality under concurrent, packet-adaptive chosen-plaintext attacks. It can be implemented online and applied to online message processing application scenarios. Furthermore, the design of a new algorithm working mode feedback link form based on combined feedback functions enhances the security of existing algorithm working modes and provides new design ideas for the secure application of algorithm working modes. Attached Figure Description

[0030] Figure 1 This is a schematic diagram illustrating the working method of the block cipher algorithm with combined feedback proposed in this invention. Detailed Implementation

[0031] The embodiments of this application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar modules or modules having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. Rather, the embodiments of this application include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.

[0032] Example 1

[0033] From a practical application perspective, the BC (Nonce-Based Message Processing) pattern has limitations in practicality and security. Its online implementation is insecure and cannot be applied to online message processing scenarios. Furthermore, analysis of existing potential improvement methods and their technical approaches reveals that directly applying existing improvement methods cannot simultaneously solve the two key issues of nonce-based security and resistance to BW-CPA (Browser-Wide Platform Asynchronous Parity).

[0034] To address these issues, this embodiment improves the BC encryption mode. Based on security enhancement designs using encryption nonces, XE structures, and combined feedback functions, it achieves a lightweight design of the existing CbF combined feedback function without compromising security. A new CbF combined feedback function design method is proposed, which is easy to implement in both hardware and software and has low computational overhead. Furthermore, to ensure algorithm efficiency, the combined feedback function CbF should not be overly complex; it should use simple operational logic such as XOR and shift operations. In addition, the calculation of CbF should not increase additional storage, minimizing implementation costs. Based on this, this embodiment proposes a working method for block cipher algorithms with combined feedback, such as... Figure 1 As shown, the details are as follows:

[0035] During encryption, the encryption result of the previous plaintext and the feedback variable generated by the previous encryption process are input into the combined feedback function to obtain the feedback variable required for the current encryption process. The obtained feedback variable is XORed with the current plaintext and then encrypted to obtain the ciphertext after the current plaintext is encrypted.

[0036] During decryption, the previous ciphertext and the feedback variables generated in the previous decryption process are input into the combined feedback function to obtain the feedback variables required for the current decryption process. The current ciphertext is then decrypted, and the result of the decryption process is XORed with the feedback variables to obtain the plaintext after the current ciphertext is decrypted.

[0037] The feedback variables required for the initial encryption or decryption can be set according to the requirements.

[0038] The working method of the block cipher algorithm with combined feedback is represented in the Cb_BC mode in this embodiment. It has CPA security based on non-repeating nonce and BW-CPA security. Compared with the traditional BC mode, it adds a sequence composed of feedback variables FB, which is used to XOR with the plaintext variables.

[0039] In this embodiment, the Cb_BC mode uses a security enhancement design based on encrypted nonce and an XE structure, and replaces the XOR operation between the ciphertext and the feedback variable in the original BC mode with a combined feedback function. ,in Replace the original feedback value Become the new feedback value and plaintext Perform XOR, Replace the original feedback value With ciphertext Perform XOR, , The feedback location can be changed as needed.

[0040] Here, the combined feedback function Further explanation:

[0041] for , Combined feedback function The specific calculation is as follows:

[0042]

[0043]

[0044] Among them, the function A special example of the operation is: Let ,but

[0045] .

[0046] The combined feedback function proposed in this embodiment will... In The bit XOR is reduced to 1 bit XOR, which greatly reduces the hardware implementation cost of the combined feedback function and achieves the minimization of XOR logic resources in the hardware implementation of the algorithm while ensuring safety requirements.

[0047] Furthermore, with As a feedback value XORed with the plaintext Taking the XOR feedback value with the ciphertext as an example, the encryption and decryption method of Cb_BC mode will be explained in detail:

[0048] The encryption process in Cb_BC mode is as follows:

[0049] 1. Feedback variables and The initial value is set to : ;

[0050] 2. FOR ( ; ; )

[0051] {

[0052] (1) To With plain text The XOR value is used to encrypt the ciphertext:

[0053]

[0054] (2) Encrypt the text and As a feedback function Input:

[0055]

[0056] (3) IF( ):

[0057] Will , These will be used as the initial values ​​for the next round of feedback. , :

[0058] ,

[0059] }

[0060] 3. Obtain all ciphertext , , , .

[0061] The decryption process for Cb_BC mode is as follows:

[0062] 1. Feedback variables and The initial value is set to : ;

[0063] 2. FOR ( ; ; )

[0064] {

[0065] (1) Ciphertext Decryption: , and XOR yields plaintext :

[0066]

[0067] (2) Encrypt the text and As a feedback function Input:

[0068]

[0069] (3) IF( ):

[0070] Will , These will be used as the initial values ​​for the next round of feedback. , :

[0071] ,

[0072] 3. Obtain all plaintext , , , .

[0073] It should be noted that in this embodiment, the encryption process corresponds to the decryption process, and the feedback variables F and FB in the encryption process are the same as those in the decryption process.

[0074] This embodiment improves upon the traditional BC encryption mode. Based on security enhancement design of encryption nonce, XE structure, and combined feedback function strategies and design methods, the existing CbF combined feedback function is lightweighted without reducing security, making it easy to implement in both hardware and software and with low hardware and software computational overhead. This results in the Cb_BC encryption and decryption working mode of the block cipher algorithm with combined feedback function design, which enhances its security and expands its application flexibility and scope of application.

[0075] The Cb_BC mode possesses both CPA security based on non-repeating nonces and BW-CPA security, making it less prone to misuse. It also maintains confidentiality under concurrent, packet-adaptive chosen-plaintext attacks and can be implemented online for online message processing applications. Furthermore, a novel feedback link form for the algorithm's working mode is designed based on a combined feedback function, enhancing the security of existing algorithm working modes and providing new design ideas for the secure application of algorithm working modes.

[0076] Example 2

[0077] This embodiment also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed corresponding to the working method of the block cipher algorithm with combined feedback described in Embodiment 1.

[0078] Example 3

[0079] The present invention also proposes a computer-readable storage medium storing computer program instructions thereon, wherein the program instructions, when executed by a processor, are used to implement the process corresponding to the working method of the block cipher algorithm with combination feedback described in Embodiment 1.

[0080] It should be noted that, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "set" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances. The accompanying drawings in the embodiments are used to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0081] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for operating a block cipher algorithm with combined feedback, characterized in that, During encryption, the previous plaintext encryption result and the feedback variable generated in the previous encryption process are input into a combined feedback function to obtain the feedback variable required for the current encryption process, and the obtained feedback variable is XORed with the current plaintext and then encrypted to obtain the ciphertext after encryption of the current plaintext; During decryption, the previous ciphertext and the feedback variable generated in the previous decryption process are input into a combined feedback function to obtain the feedback variable required for the current decryption process, and the current ciphertext is decrypted, and the result obtained after decryption is XORed with the feedback variable to obtain the plaintext after decryption of the current ciphertext; Wherein, the feedback variable required for the first encryption or decryption can be set according to requirements; The combined feedback function is where F is the input feedback variable, C is the input ciphertext, I1 is the feedback variable for the XOR operation with the plaintext, and I2 is the feedback variable for inputting the combined feedback function in the next encryption or decryption process. For , , the specific operation of the combined feedback function is: where the function , and the special operation instance is defined as , then 。 2. The method of claim 1, wherein, The encryption process is specifically as follows: Step 1, set initial feedback variable FB1 and F1, encrypt the plaintext P i , i = 1...m; i initial value is 1; Step 2, feedback variable FB i with the plaintext P i is XORed and encrypted to obtain the encrypted result C i ; Step 3, if i < m, then the encryption result C i and the feedback variable F i+1 is input into the combined feedback function to obtain the next encryption process feedback variable FB i+1 , F i+1 , i value is increased by 1; otherwise, the encryption result is directly output; steps 2-3 are repeated to obtain all plaintext encryption results.

3. The method of claim 2, wherein, The decryption process is specifically as follows: Step 1, set the initial feedback variable FB1 and F1, and decrypt the plaintext Ci, i = 1…m; i is initially set to 1; Step 2, encrypting the plaintext P i decrypting, and comparing the decryption result with the feedback variable FB i performing XOR to obtain the plaintext Step 3, if i < m, then ciphertext C i and feedback variable F i is input into the combined feedback function to obtain the next decryption process feedback variable FB i+1 , F i+1 , i value is increased by 1; otherwise, the encryption result is directly output; steps 2-3 are repeated to obtain all plaintexts.

4. The method of claim 3, wherein, The combined feedback function of the encryption and decryption process is specifically as follows: wherein, is a combined feedback function, is an input feedback variable, is an input encryption result; is an output feedback variable FB i+1 , is an output feedback variable F i+1 .

5. An electronic device, comprising: A computer device comprising a memory and a processor, wherein the memory stores a computer program capable of being loaded and executed by the processor, and the computer program corresponds to the method for operating a block cipher algorithm with combined feedback according to any one of claims 1 to 4.

6. A computer readable storage medium having stored thereon computer program instructions, wherein, The program instructions are executed by the processor to implement the process corresponding to the method for operating a block cipher algorithm with combined feedback according to any one of claims 1 to 4.