Authentication encryption method, verification and decryption method, system and device based on block cipher

Through the authenticated encryption method based on block cipher, the security and efficiency issues of the authenticated encryption scheme under the quantum computing model are solved, and efficient and secure data protection is achieved in the quantum computing environment.

CN120223293BActive Publication Date: 2025-09-12NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510676937.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-12
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

Existing classical authenticated encryption schemes are not secure under the quantum computing model and cannot effectively resist quantum counterfeiting attacks and quantum differentiation attacks. In addition, existing quantum-safe authenticated encryption schemes such as QCB and SLAE have deficiencies in parallel computing and efficiency, making it difficult to meet the requirements of high security and high efficiency.

Method used

An authenticated encryption method based on block cipher is adopted. The plaintext is encrypted through the codebook mode and the associated data is processed using the PMAC mode to generate an authentication tag, thereby achieving security and parallel computing under the quantum computing model. The specific steps include plaintext block encryption, ciphertext block concatenation and authentication tag generation.

Benefits of technology

It realizes the protection of confidentiality, integrity and authentication of data under the quantum computing model, has the ability to resist quantum computing attacks, has high parallel computing efficiency, and meets the needs of high-efficiency applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223293B_ABST
    Figure CN120223293B_ABST
Patent Text Reader

Abstract

This application discloses an authenticated encryption method, a verified decryption method, a system, and a device based on a block cipher. The authenticated encryption method includes: determining the underlying block cipher and key, selecting an initial vector (IV) that has not been used in encryption under the current key, and using a triple of the initial vector, associated data, and plaintext as input to the authenticated encryption algorithm; the encryption portion encrypts the masked plaintext using a codebook mode to obtain ciphertext; the authentication portion processes the masked associated data using a PMAC mode to obtain an authentication intermediate value, performs an XOR operation on the plaintext blocks, and then encrypts them using a block cipher; XORs the authentication intermediate value and the encrypted result using the block cipher to generate an authentication tag; and the initial vector, associated data, ciphertext, and authentication tag are sent as a ciphertext message to a receiving end or stored for decryption. This application can protect the confidentiality and integrity of data under quantum computing and can be parallelized to improve computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to an authentication encryption method, verification and decryption method, system and device based on block cipher. Background Art

[0002] To meet the security requirements of data confidentiality, integrity, and authentication in future quantum computing applications, as well as forward security threats such as "store first, decrypt later" in real-world applications, authenticated encryption schemes must not only offer security under the classical computing model but also under the quantum computing model. Currently, most classical authenticated encryption schemes (such as GCM (Galois / Counter Mode) and OCB (Offset Codebook Mode)) lack security under the quantum computing model and are susceptible to quantum forgery and quantum differentiation attacks. Authenticated encryption schemes that are provably secure under the quantum computing model are relatively rare. Typical designs include QCB (Quantum-secure Codebook Mode) and SLAE (Sponge-based Leakage-resilient Authenticated Encryption). QCB is based on a tunable block cipher. While parallel computation is possible, it requires the use of a tunable block cipher, placing higher and more complex requirements on the underlying cryptographic primitives, which generally reduces the efficiency of the authenticated encryption scheme. SLAE, based on the Sponge architecture, cannot perform parallel operations during encryption and decryption, limiting data encryption and decryption efficiency and making it difficult to meet the high efficiency requirements of authenticated encryption schemes in practical applications. Authenticated encryption schemes that are provably secure under classical computing models are often constructed directly based on block ciphers, offering advantages in efficiency and design flexibility. However, there are currently no publicly available authenticated encryption schemes that are provably secure under quantum computing models directly based on block ciphers. Therefore, designing authenticated encryption schemes that are provably secure under quantum computing models based on block ciphers has important theoretical and practical value for enhancing data confidentiality, integrity, and authentication under quantum computing conditions.

[0003] There is no provably secure authenticated encryption scheme in the existing public literature that is directly based on block cipher design under the quantum computing model. Other provably secure authenticated encryption schemes under the quantum computing model, such as QCB based on tunable block cipher and SLAE based on Sponge structure, cannot meet the application requirements of high security and high computing efficiency under the quantum computing model. Summary of the Invention

[0004] In view of this, the present application provides an authenticated encryption method, a verified decryption method, a system and a device based on block cipher, including an authenticated encryption method and a verified decryption method, which has the advantages of security and parallelism under the quantum computing model, and provides a new method for the design of symmetric encryption working mode based on block cipher, which has important theoretical significance and practical value for enhancing the confidentiality, integrity and authentication of data under quantum computing.

[0005] The present application discloses an authenticated encryption method based on a block cipher, which is applied to a sending end or an encryption party and includes:

[0006] Step 1: Determine the underlying block cipher used and key , select the current key Initialization vector not used in encryption , the initial vector , linked data , plain text The triplet As input to the authenticated encryption algorithm;

[0007] Step 2: Encryption part uses codebook mode to encrypt the masked plaintext , get the ciphertext ; The mask is based on the initial vector Sure;

[0008] Step 3: The authentication part uses the PMAC mode to process the masked associated data , get the certified intermediate value , XOR the plaintext blocks and encrypt them with block cipher, and authenticate the intermediate value XOR the result encrypted with the block cipher to generate the authentication tag ;

[0009] Step 4: Initialize the vector , linked data 、ciphertext , certification label composed of It is sent to the receiving end as a ciphertext message or stored for decryption.

[0010] Furthermore, the sender or encryptor shares a key with the receiver or decryptor , the plaintext According to the block cipher The packet length The total number of groups is ,but , the last group The length of the interval In the same way, the associated data Grouping, the total number of groups is ,but , where the last group The length of the interval middle.

[0011] Furthermore, the step 2 includes:

[0012] Using a block cipher Encryption Initialization Vector , get the secret value , secret value Add 1 and use block cipher Encrypted secret value ,for , that is, the first group except the last one plaintext packets With mask After XOR, use block cipher Encryption and masking XOR generates ciphertext blocks , is the exclusive OR operator symbol, Represents a block cipher with key K To encrypt;

[0013] For the last plaintext packet , the plaintext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last plaintext group Same length and then XOR generates the last ciphertext block ; is a function of length;

[0014] The ciphertext is obtained by concatenating all ciphertext groups ,Right now , Cascade symbol.

[0015] Furthermore, the step 3 includes:

[0016] The secret value Add 2 and use block cipher Encrypted secret value ;for , that is, the first group except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. ;

[0017] For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it into a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. ;

[0018] according to and , get the certified intermediate value , ;according to and , get the certified intermediate value , ;

[0019] If the last group of the plaintext is an incomplete group, fill it with a complete group, and then perform an XOR operation on all the plaintext groups, that is, ; Use block cipher after masking After encryption, the authentication tag is generated by XORing the authentication intermediate value .

[0020] The present application also discloses a verification and decryption method based on block cipher, which is applied to a receiving end or a decryption party and includes:

[0021] Step 1: Make sure the same block cipher is used as the sender or encryptor and the same key , receive the ciphertext message from the sender or read it from storage , ciphertext message Including initial vector , linked data 、ciphertext , certification label ;

[0022] Step 2: Decryption part uses codebook mode to decrypt the masked ciphertext , get the plaintext ; The mask is based on the initial vector Sure;

[0023] Step 3: Verify the associated data after masking using the PMAC mode , get the verification intermediate value , XOR the plaintext blocks and encrypt them using a block cipher, verifying the intermediate value XOR with the result of block cipher encryption to generate a verification tag ;

[0024] Step 4: Verify the tag Equal to certification tag , then the verification is passed and the decrypted plaintext is output .

[0025] Furthermore, the receiving end or decrypting party shares the key with the sending end or encrypting party , the ciphertext According to the block cipher The total number of groups is ,but , the last group The length of the interval In; Associate data Grouping, the total number of groups is ,but , where the last group The length of the interval middle.

[0026] Furthermore, the step 2 includes:

[0027] Encrypting the initialization vector using a block cipher , get the secret value , add 1 and use block cipher Encrypted secret value ;for , that is, the first group except the last one Ciphertext groups With mask After XOR, use the inverse operation of the block cipher Decrypt and then mask XOR, generate plaintext group ; is the exclusive OR operator symbol, Indicates encryption using a block cipher with a key of K. Indicates that the key is Block cipher The inverse operation of To decrypt;

[0028] For the last ciphertext block , the ciphertext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last ciphertext group Same length and then XOR, generate the last plaintext group ; is a function of length;

[0029] Concatenate all plaintext groups to get the plaintext ,Right now .

[0030] Furthermore, the step 3 includes:

[0031] The secret value Add 2 and use block cipher Encrypted secret value ;for , that is, the first group except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. ;

[0032] For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it into a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. ;

[0033] according to and , get the verification intermediate value , ;according to and , get the verification intermediate value , ;

[0034] If the last group of the plaintext is an incomplete group, fill it with a complete group, and then perform an XOR operation on all the plaintext groups, that is, , use a block cipher after masking After encryption, XOR with the verification intermediate value to generate the verification tag .

[0035] Furthermore, the step 4 includes:

[0036] If the verification tag Not equal to certification label , the verification fails, and the output represents the ciphertext message Invalid characters .

[0037] The present application also discloses an authenticated encryption system based on a block cipher, which is used to implement the authenticated encryption method based on a block cipher described above, and comprises:

[0038] Input module, used to determine the underlying block cipher used and key , select the current key Initialization vector not used in encryption , the initial vector , linked data , plain text The triplet As input to the authenticated encryption algorithm;

[0039] Ciphertext generation module, used to encrypt the plaintext after masking using the codebook mode , get the ciphertext ; The mask is based on the initial vector Sure;

[0040] Authentication tag generation module, used for authentication part to process masked associated data using PMAC mode , get the certified intermediate value , XOR the plaintext blocks and encrypt them with block cipher, and authenticate the intermediate value XOR the result encrypted with the block cipher to generate the authentication tag ;

[0041] Data sending module, used to send the initial vector , linked data 、ciphertext , certification label composed of It is sent to the receiving end as a ciphertext message or stored for decryption.

[0042] The present application also discloses a block cipher-based verification and decryption system for implementing the block cipher-based verification and decryption method described above, comprising:

[0043] Input module, used to confirm that the same block cipher is used as the sender or encryptor and the same key , receive the ciphertext message from the sender or read it from storage As input to the verification and decryption algorithm, the ciphertext message Including initial vector , linked data 、ciphertext , certification label ;

[0044] Plaintext generation module, used to decrypt the ciphertext masked by decryption using the codebook mode , get the plaintext ; The mask is based on the initial vector Sure;

[0045] Verification tag generation module, used to verify some of the associated data after processing the mask using the PMAC mode , get the verification intermediate value , XOR the plaintext blocks and encrypt them using a block cipher, verifying the intermediate value XOR with the result of block cipher encryption to generate a verification tag ;

[0046] Data verification module, used for data integrity verification, if the verification tag Equal to certification tag , then the verification is passed and the decrypted plaintext is output .

[0047] The present application also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the above-mentioned authentication encryption method based on block cipher, or implements the above-mentioned verification and decryption method based on block cipher.

[0048] Due to the adoption of the above technical solution, this application has the following advantages:

[0049] 1. Provable security under the quantum computing model. The authenticated encryption and verified decryption methods of this application are resistant to quantum computing attacks and can achieve secure encrypted communication or encrypted storage under the Q2 quantum computing model, protecting the confidentiality and integrity of data.

[0050] 2. Directly based on block cipher design. The authenticated encryption and verified decryption methods of this application are directly based on the encryption and decryption algorithm design of block ciphers. The underlying block cipher only needs to meet the security requirements under the quantum computing model.

[0051] 3. Parallel computing: The processes of encrypting plaintext, processing associated data, and decrypting ciphertext in the authenticated encryption and verified decryption methods of this application can all be fully parallelized, resulting in high computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0053] Figure 1 A flowchart of an authentication encryption method based on a block cipher according to an embodiment of the present application is shown;

[0054] Figure 2 A schematic diagram of the encryption principle of an authentication encryption method based on a block cipher according to an embodiment of the present application;

[0055] Figure 3 This is a schematic diagram of the authentication principle of a block cipher-based authentication encryption method according to an embodiment of the present application;

[0056] Figure 4 A flowchart of a block cipher-based verification and decryption method according to an embodiment of the present application is shown;

[0057] Figure 5 A schematic diagram showing the principle of the decryption part in a block cipher-based verification and decryption method according to an embodiment of the present application;

[0058] Figure 6 This is a schematic diagram of the verification principle of a block cipher-based verification and decryption method in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The present application is further described with reference to the accompanying drawings and embodiments. The embodiments described are only a part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.

[0060] See also Figure 1 The present application provides an embodiment of an authenticated encryption method based on a block cipher, which is applied to a sending end or an encryption party. The embodiment includes:

[0061] The sender or encryptor shares a key with the receiver or decryptor , the plaintext message Encrypted to ciphertext message ,in is the initial vector, For linked data, For plain text, is the ciphertext, For authentication tags. By the block length of the underlying block cipher The total number of groups is ,but , the last group The length of the interval In the same way, the associated data Grouping, the total number of groups is ,but , where the last group The length of the interval The authentication and encryption process is as follows Figure 1 As shown, it includes steps S1 to S4:

[0062] S1, determines the underlying block cipher used and randomly selected keys . You can choose to use a public design such as AES, SM4, or other quantum-safe block ciphers. The key of the underlying block cipher method . Select the current key Unused initial vector Then the triple of initial vector, associated data, and plaintext is As input to the authenticated encryption algorithm.

[0063] S2, the encrypted part uses the Electronic Code Book (ECB) mode to encrypt the masked plaintext Get the ciphertext .

[0064] Specifically, see Figure 2 , first encrypt the initial vector using a block cipher , get the secret value , add 1 and use block cipher Encrypted secret value .for , that is, the first group except the last one plaintext packets With mask After XOR, use block cipher Encryption and masking XOR generates ciphertext blocks , where multiplication is a finite field Multiplication, the same below. Represents a block cipher with key K To encrypt.

[0065] For the last plaintext packet , first convert the plaintext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last plaintext group Same length and then XOR generates the last ciphertext block ; is a function of length.

[0066] The ciphertext is obtained by grouping and concatenating the ciphertext ,Right now .

[0067] S3, the authentication part uses the PMAC (Parallelizable MAC, parallelized message authentication code) mode to process the associated data , the XOR sum (Checksum) of the plaintext group is then encrypted using the block cipher, and the results of the two are XORed to generate the authentication tag .

[0068] Specifically, first the secret value Add 2 and use block cipher Encrypted secret value .for , that is, the first group except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. .

[0069] For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it with 1 1 and several 0s to form a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. .

[0070] The above associated data group mask and encrypt the obtained value XOR to obtain the authentication intermediate value or .

[0071] If the last group of the plaintext is an incomplete group, fill it with 0 to make it a complete group, and then XOR all the plaintext groups together, that is, . Use a block cipher after masking After encryption, the authentication tag is generated by XORing the authentication intermediate value ,like Figure 3 shown.

[0072] S4, the initial vector, associated data, ciphertext, and authentication tag It is sent to the receiving end as a ciphertext message or stored for decryption.

[0073] See also Figure 4 The present application also provides an embodiment of a verification and decryption method based on a block cipher, which is applied to a receiving end or a decryption party. The embodiment includes:

[0074] The receiver or decryptor shares the key with the sender or encryptor , the ciphertext message Verify decryption to plaintext Or give invalid characters for the ciphertext message ,in is the initial vector, For linked data, For plain text, is the ciphertext, is the authentication tag. Group by the length of the underlying block cipher, the total number of groups is ,but , the last group The length of the interval Also associate data Grouping, the total number of groups is ,but , where the last group The length of the interval The verification and decryption process is as follows Figure 4 As shown, steps S5 to S8 are included:

[0075] S5, confirm that the same underlying block cipher is used as the sender or encryptor and the same key , and block ciphers The inverse operation of Receive ciphertext message from sender or read from storage , including the initial vector , linked data 、ciphertext , certification label .

[0076] S6, the decryption part uses the Electronic Codebook Mode (ECB) to decrypt the masked ciphertext Get the plaintext .

[0077] Specifically, see Figure 5 , first encrypt the initial vector using a block cipher , get the secret value , add 1 and use block cipher Encrypted secret value .for , that is, the first group except the last one Ciphertext groups With mask After XOR, use the inverse operation of the block cipher Decrypt and then mask XOR generates plaintext packets .

[0078] For the last ciphertext block , first the ciphertext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last ciphertext group Same length and then XOR generates the last plaintext group .

[0079] The plaintext is obtained by grouping and concatenating the plaintext ,Right now .

[0080] S7, the verification part uses the PMAC mode to process the associated data , the XOR sum (Checksum) of the plaintext group is then encrypted using the block cipher, and the results of the two are XORed to generate the verification tag .

[0081] Specifically, first the secret value Add 2 and use block cipher Encrypted secret value .for , that is, the first group except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. .

[0082] For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it with 1 1 and several 0s to form a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. .

[0083] XOR the values ​​obtained by masking and encrypting the above associated data groups to obtain the verification intermediate value or .

[0084] If the last group of the plaintext is an incomplete group, fill it with 0 to make it a complete group, and then XOR all the plaintext groups together, that is, . Use a block cipher after masking After encryption, XOR with the verification intermediate value to generate the verification tag ,like Figure 6 shown.

[0085] S8, determine whether the verification tag is equal to the authentication tag. , then verify the plaintext obtained by output decryption .

[0086] S8 also includes: , the verification fails, and the output represents the ciphertext message Invalid characters .

[0087] The present application also provides an embodiment of an authenticated encryption system based on a block cipher, which is used to implement the authenticated encryption method based on a block cipher described in the above embodiment, and includes:

[0088] Input module, used to determine the underlying block cipher used and key , select the current key Initialization vector not used in encryption , the initial vector , linked data , plain text The triplet As input to the authenticated encryption algorithm;

[0089] Ciphertext generation module, used to encrypt the plaintext after masking using the codebook mode , get the ciphertext ; The mask is based on the initial vector Sure;

[0090] Authentication tag generation module, used for authentication part to process masked associated data using PMAC mode , get the certified intermediate value , XOR the plaintext blocks and encrypt them with block cipher, and authenticate the intermediate value XOR the result encrypted with the block cipher to generate the authentication tag ;

[0091] Data sending module, used to send the initial vector , linked data 、ciphertext , certification label composed of It is sent to the receiving end as a ciphertext message or stored for decryption.

[0092] The present application also provides an embodiment of a block cipher-based authentication and decryption system, which is used to implement the block cipher-based authentication and decryption method described in the above embodiment, including:

[0093] Input module, used to confirm that the same block cipher is used as the sender or encryptor and the same key , receive the ciphertext message from the sender or read it from storage As input to the verification and decryption algorithm, the ciphertext message Including initial vector , linked data 、ciphertext , certification label ;

[0094] Plaintext generation module, used to decrypt the ciphertext masked by decryption using the codebook mode , get the plaintext ; The mask is based on the initial vector Sure;

[0095] Verification tag generation module, used to verify some of the associated data after processing the mask using the PMAC mode , get the verification intermediate value , XOR the plaintext blocks and encrypt them using a block cipher, verifying the intermediate value XOR with the result of block cipher encryption to generate a verification tag ;

[0096] Data verification module, used for data integrity verification, if the verification tag Equal to certification tag , then the verification is passed and the decrypted plaintext is output .

[0097] The present application also provides an embodiment of an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the above-mentioned block cipher-based authentication encryption method, or implements the above-mentioned block cipher-based verification and decryption method.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present application can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present application should be included in the scope of protection of the claims of the present application.

Claims

1. An authenticated encryption method based on a block cipher, applied to a sending end or an encryption party, characterized in that: include: Step 1: Determine the underlying block cipher used and key , select the current key Initialization vector not used in encryption , the initial vector , linked data , plain text The triplet As input to the authenticated encryption algorithm; Step 2: Encryption part uses codebook mode to encrypt the masked plaintext , get the ciphertext ; The mask is based on the initial vector Sure; Step 3: The authentication part uses the PMAC mode to process the masked associated data , get the certified intermediate value , XOR the plaintext blocks and encrypt them with block cipher, and authenticate the intermediate value XOR the result encrypted with the block cipher to generate the authentication tag ; Step 4: Initialize the vector , linked data 、ciphertext , certification label composed of Send to the receiving end as a ciphertext message or store for decryption; The step 2 includes: Using a block cipher Encryption Initialization Vector , get the secret value , secret value Add 1 and use block cipher Encrypted secret value ,for , is the total number of groups, i.e. the number of groups except the last one plaintext packets With mask After XOR, use block cipher Encryption and masking XOR generates ciphertext blocks , is the exclusive OR operator symbol, Indicates that the key is Block cipher To encrypt; For the last plaintext packet , the plaintext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last plaintext group Same length and then XOR generates the last ciphertext block ; is a function of length; The ciphertext is obtained by concatenating all ciphertext groups ,Right now , is the cascade symbol; The step 3 comprises: The secret value Add 2 and use block cipher Encrypted secret value ;for , that is, the first group except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. , is the exclusive OR operator symbol, Indicates that the key is Block cipher To encrypt; For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it into a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. ; is the total number of groups; according to and , get the certified intermediate value , ;according to and , get the certified intermediate value , ; If the last group of the plaintext is an incomplete group, fill it with a complete group, and then perform an XOR operation on all the plaintext groups, that is, ; Use block cipher after masking After encryption, the authentication tag is generated by XORing the authentication intermediate value .

2. The block cipher-based authenticated encryption method according to claim 1, wherein: The sender or encryptor shares a key with the receiver or decryptor , the plaintext By block cipher The packet length The total number of groups is ,but , the last group The length of the interval In the same way, the associated data Grouping, the total number of groups is ,but , where the last group The length of the interval middle.

3. A verification and decryption method based on block cipher, applied to a receiving end or a decryption party, characterized in that: include: Step 1: Make sure the same block cipher is used as the sender or encryptor and the same key , receive the ciphertext message from the sender or read it from storage , ciphertext message Including initial vector , linked data 、ciphertext , certification label ; Step 2: Decryption part uses codebook mode to decrypt the masked ciphertext , get the plaintext ; The mask is based on the initial vector Sure; Step 3: Verify the associated data after masking using the PMAC mode , get the verification intermediate value , XOR the plaintext blocks and encrypt them using a block cipher, verifying the intermediate value XOR with the result of block cipher encryption to generate a verification tag ; Step 4: Verify the tag Equal to certification label , then the verification is passed and the decrypted plaintext is output ; The step 2 includes: Encrypting the initialization vector using a block cipher , get the secret value , add 1 and use block cipher Encrypted secret value ;for , is the total number of groups, i.e. the number of groups except the last one Ciphertext groups With mask After XOR, use the inverse operation of the block cipher Decrypt and then mask XOR, generate plaintext group ; is the exclusive OR operator symbol, Represents a block cipher with key K To encrypt, Indicates that the key is Block cipher The inverse operation of To decrypt; For the last ciphertext block , the ciphertext The length of the code is 1 group ,use Mask and then use block cipher Encryption, encrypted value and mask XOR, truncating it to the last ciphertext group Same length and then XOR, generate the last plaintext group ; is a function of length; Concatenate all plaintext groups to get the plaintext ,Right now ; The step 3 comprises: The secret value Add 2 and use block cipher Encrypted secret value ;for , is the total number of groups, i.e. the number of groups except the last one Related data groups With mask After XOR, use block cipher Encryption, i.e. ; is the exclusive OR operator symbol, Indicates that the key is Block cipher To encrypt; For the last associated data group, if it is a complete group, that is, its length is ,but , and mask it XOR reuse block cipher Encryption, i.e. ; If it is an incomplete group, that is, the length is less than , fill it into a complete group, then , and mask it XOR reuse block cipher Encryption, i.e. ; according to and , get the verification intermediate value , ;according to and , get the verification intermediate value , ; If the last group of the plaintext is an incomplete group, fill it with a complete group, and then perform an XOR operation on all the plaintext groups, that is, , use a block cipher after masking After encryption, XOR with the verification intermediate value to generate the verification tag .

4. The verification and decryption method based on block cipher according to claim 3, characterized in that: The receiver or decryptor shares the key with the sender or encryptor , the ciphertext By block cipher The total number of groups is ,but , the last group The length of the interval In; Associate data Grouping, the total number of groups is ,but , where the last group The length of the interval middle.

5. The verification and decryption method based on block cipher according to claim 3, characterized in that: The step 4 comprises: If the verification tag Not equal to certification label , the verification fails, and the output represents the ciphertext message Invalid characters .

6. An authenticated encryption system based on a block cipher, used to implement the authenticated encryption method based on a block cipher according to claim 1 or 2, characterized in that: include: Input module, used to determine the underlying block cipher used and key , select the current key Initialization vector not used in encryption , the initial vector , linked data , plain text The triplet As input to the authenticated encryption algorithm; Ciphertext generation module, used to encrypt the plaintext after masking using the codebook mode , get the ciphertext ; The mask is based on the initial vector Sure; Authentication tag generation module, used for authentication part to process masked associated data using PMAC mode , get the certified intermediate value , XOR the plaintext blocks and encrypt them with block cipher, and authenticate the intermediate value XOR the result encrypted with the block cipher to generate the authentication tag ; Data sending module, used to send the initial vector , linked data 、ciphertext , certification label composed of It is sent to the receiving end as a ciphertext message or stored for decryption.

7. A block cipher-based authentication and decryption system, used to implement the block cipher-based authentication and decryption method according to any one of claims 3 to 5, characterized in that: include: Input module, used to confirm that the same block cipher is used as the sender or encryptor and the same key , receive the ciphertext message from the sender or read it from storage As input to the verification and decryption algorithm, the ciphertext message Including initial vector , linked data 、ciphertext , certification label ; Plaintext generation module, used to decrypt the ciphertext after decryption using the codebook mode , get the plaintext ;The mask is determined based on the initial vector; Verification tag generation module, used to verify some of the associated data after processing the mask using the PMAC mode , get the verification intermediate value , XOR the plaintext blocks and encrypt them using a block cipher, verifying the intermediate value XOR with the result of block cipher encryption to generate a verification tag ; Data verification module, used for data integrity verification, if the verification tag Equal to certification label , then the verification is passed and the decrypted plaintext is output .

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, When the computer program is executed by the processor, it implements the block cipher-based authentication encryption method according to claim 1 or 2, or implements the block cipher-based verification and decryption method according to any one of claims 3 to 5.

Citation Information

Patent Citations

  • Message discrimination method based on block cipher

    CN102136904A