Rectangle intermediate encounter attack password analysis method and system

By combining the Rectangle distinguisher with the mid-meeting attack method, and utilizing differential expansion and quadruples construction techniques, the problem of low key recovery efficiency in existing Rectangle attack methods is solved, achieving a more efficient key recovery effect, especially significantly improving the attack effect when the key size is large.

CN119011124AInactive Publication Date: 2024-11-22JINAN UNIVERSITY

Patent Information

Application Number
CN202411455879.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing Rectangle attack methods suffer from inefficiency and high complexity in block cipher analysis, especially when the key size is proportional to the block size, making it difficult to achieve efficient key recovery.

Method used

Combining the Rectangle Discriminator with the Encounter-in-the-Middle Attack Method, a Rectangle Discriminator is constructed that can distinguish between block ciphers and random permutations. Differential expansion is performed using the high-probability input and output differential features. Appropriate plaintext and ciphertext are selected for the attack. The key is traversed and quadruples are constructed. The complete key is obtained using an exhaustive search method.

Benefits of technology

When the key size is relatively large relative to the block size, it significantly improves the efficiency of key recovery and the attack effect, achieves a better balance of attack complexity, and improves the efficiency of key recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011124A_ABST
    Figure CN119011124A_ABST
Patent Text Reader

Abstract

The invention discloses a Rectangle intermediate encounter attack password analysis method and system, and belongs to the technical field of information security symmetric password design and analysis, and the method comprises the steps: obtaining a block encryption algorithm of a data encryption machine; a Rectangle discriminator is constructed based on an encryption algorithm; differential expansion is carried out on two ends of the Rectangle discriminator based on the input and output differential features, and after the data volume required by attack is calculated based on the difference, a message is selected for attack; traversing a secret key of the extension part, sending a plaintext into the extension part, comparing differences, building a data pair, building a forward tetrad by using the data pair, sending a ciphertext into the backward extension part for decryption, and building a backward tetrad; taking an intersection of the tetrad to obtain a matching result; partial key information is obtained according to a matching result, residual key information is obtained by using an exhaustive search method, a complete key of the data encryption machine is obtained, and an analysis result is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information security symmetric cipher design and analysis, and in particular to a Rectangle meet-in-the-middle attack cipher analysis method and system. Background Art

[0002] As an important branch of cryptography, block ciphers have been widely used in network and information security related fields due to their high security, superior encryption and decryption performance, and convenient hardware and software implementation. Famous block ciphers include AES, SKINNY, Deoxys-BC, CRAFT, etc., which use XOR operations, nonlinear S-boxes, and linear P-boxes to complete encryption and decryption operations. Rectangle attack is a variant of differential attack and is currently the most effective analysis method for block ciphers such as SKINNY and Deoxys-BC. The meet-in-the-middle attack was proposed by Hellman in 1977. In recent years, Christina et al. combined the meet-in-the-middle attack with the differential attack to improve the attack results of many block ciphers.

[0003] Meet-in-the-middle attack: A meet-in-the-middle attack can be understood as a brute force attack that combines the concept of "time-space tradeoff". It builds a partial data table in advance and then performs an exhaustive search and matching on the remaining data, which is more efficient than the traditional brute force attack. The basic process of a meet-in-the-middle attack is as follows: Divided into , the wheel keys (assumed to be independent of each other) are , randomly select plaintext and ciphertext .use Respectively Encrypt / decrypt data to get the data set and Used to match the middle value, judge , If the match is successful, the corresponding key combination (including all The keys of the rounds in the candidate key list are stored in the candidate key list; if the match fails, the key combination is discarded (in this process, some random values ​​may cause incorrect matching). Subsequently, a new plaintext and ciphertext combination is randomly selected to further screen the candidate key list. Repeat this process until only one key is left in the candidate key list, and this key is the correct key. The above description only explains the basic idea of ​​the meet-in-the-middle attack. In practical applications, the meet-in-the-middle attack has evolved into a variety of variants that are adapted to specific scenarios, such as partial matching attacks, three-subset matching attacks, and meet-in-the-middle attacks for full subkey recovery. These variants show higher attack efficiency and pertinence in different encryption scenarios. Rectangle attack and general Rectangle key recovery algorithm: The Boomerang attack is a variant of the differential attack proposed by Wanger in 1999. The target password is Considered as a combination of two subcodes , Upper difference By probability exist, Upper difference By probability exists, so the Boomerang discriminator probability is calculated as The Rectangle attack is a chosen plaintext variant of the Boomerang attack, and it considers the probability of connected parts as much as possible. The probability of the Rectangle distinguisher is ,in , .

[0004] The basic process of the Rectangle attack is as follows: select four different plaintext , satisfying the difference relationship , encrypt the plaintext to the corresponding ciphertext ; If the ciphertext satisfies the differential relationship , then the correct quadruple can be constructed. These quadruple can be used to extract key information and recover the key. In 2022, Song et al. proposed a general Rectangle key recovery algorithm, which significantly improved the efficiency of Rectangle attacks. The algorithm allows flexible selection of the number and position of guessed subkeys when matching plaintext differentials and ciphertext differentials, thereby effectively balancing the time complexity of each step of the attack. In addition, the algorithm is compatible with various previous Rectangle key recovery algorithms, and can use the optimal attack time complexity as the objective function, combined with automated cryptanalysis methods, to generate the optimal attack plan. Based on this method, Song et al. obtained the current best attack results on multiple block ciphers. Summary of the invention

[0005] In order to overcome the above problems, a Rectangle meet-in-the-middle attack cryptanalysis method is proposed, which includes: Obtain a data encryption machine with a built-in key, and obtain a block encryption algorithm of the data encryption machine; Based on the block encryption algorithm, a Rectangle distinguisher is constructed that can distinguish block ciphers from random permutations. The distinction is based on input and output differential features that exist with high probability. The input and output differential features provide a basis for the Rectangle distinguisher to expand to both ends. Based on the input differential / output differential features, differential expansion is performed on both ends of the Rectangle distinguisher, and after the amount of data required for the attack is calculated based on the expanded input differential / output differential, a message is selected for the attack; Traverse the key of the extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, calculate the difference using the partially encrypted plaintext, compare the difference based on the encrypted plaintext with the input difference of the Rectangle distinguisher and use a pair of plaintext and ciphertext that match the input difference to form a data pair, use two pairs of plaintext and ciphertext that match the output difference to form a forward quadruple according to the difference at the ciphertext, and at the same time, traverse the key of the backward extension part, send the ciphertext to the backward extension part of the Rectangle distinguisher for partial decryption, calculate the difference using the decrypted ciphertext, and construct a backward quadruple based on the difference of the decrypted ciphertext; Taking the intersection of the forward quadruple and the backward quadruple to obtain a matching result; Part of the key information is obtained according to the matching result, and the remaining key information is obtained by using an exhaustive search method to obtain the complete key of the data encryption machine, and the analysis result of the Rectangle middle meet-in-the-middle attack is obtained.

[0006] Optionally, the input difference and output difference of the Rectangle distinguisher are differentially expanded toward both ends, and the amount of data required for the attack is calculated based on the input difference or output difference expanded by the Rectangle distinguisher. The content of the selected message for attack specifically includes: Traverse to get the Rectangle discriminator for the block cipher, expand the differential features provided by the discriminator to both ends, and record the forward extension part as , the differential propagation relationship is ,in The forward input difference provided to the discriminator, is the forward extended endpoint difference, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , Provides backward output differential and backward extension endpoint differential for the classifier. The unknown difference in bits, the key involved is recorded as , ; Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, ; Record the required data (plain text P , ciphertext C ), the total amount is ; The total amount of data required for the attack is D .

[0007] Optionally, traverse the key of the forward extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, compare the differential result of the encrypted plaintext with the output differential, and use a pair of plaintext and ciphertext that match the differential to form a data pair, and use two pairs of plaintext and ciphertext that match the output differential to form a forward quadruple based on the differential at the ciphertext. Specifically, the content includes: guess Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. ; The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table .

[0008] Optionally, traversing the key of the backward extension part, sending the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, using the decrypted ciphertext to calculate the difference, and constructing the backward quadruple based on the difference of the decrypted ciphertext specifically includes: guess Partial key in ,remember The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is recorded as , the remaining unknown difference is Bits, composable satisfaction middle The number of data pairs with fixed bit differences is , the number of quadruples that can be constructed is .

[0009] Optionally, obtaining part of the key information according to the matching result, and using the exhaustive search method to obtain the remaining key information specifically includes: Get the unguessable key based on the successfully matched quadruple , Information to obtain the number of candidate keys ; Use exhaustive search to obtain the remaining key information.

[0010] A Rectangle meet-in-the-middle attack cryptanalysis system, the system comprising: an encryption machine acquisition module, a distinguisher expansion module, a data volume calculation module, a quadruple construction module, a quadruple matching module and a key recovery module; The encryption machine acquisition module is used to acquire a data encryption machine with a built-in key, and obtain a block encryption algorithm of the data encryption machine; The distinguisher extension module is used to construct a Rectangle distinguisher that can distinguish block ciphers from random permutations based on the block encryption algorithm. The distinction is based on input and output differential features that exist with high probability. The input and output differential features provide a basis for the Rectangle distinguisher to expand to both ends. The data volume calculation module is used to perform differential expansion on both ends of the Rectangle distinguisher based on the input and output differential features, calculate the amount of data required for the attack based on the expanded input differential / output differential, and select a message for the attack; The four-tuple construction module is used to traverse the key of the extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, calculate the difference using the encrypted plaintext, compare the difference based on the encrypted plaintext with the input difference of the Rectangle distinguisher and use a pair of plaintext and ciphertext that conforms to the input difference to form a data pair, use two pairs of plaintext and ciphertext that conform to the output difference to form a forward four-tuple according to the difference at the ciphertext, and at the same time, traverse the key of the backward extension part, send the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, calculate the difference using the decrypted ciphertext, and construct a backward four-tuple based on the difference of the decrypted ciphertext; The quadruple matching module is used to take the intersection of the forward quadruple and the backward quadruple to obtain a matching result; The key recovery module is used to obtain partial key information according to the matching result, use the exhaustive search method to obtain the remaining key information, obtain the complete key of the data encryption machine, and obtain the analysis result of the Rectangle middle meet-in-the-middle attack.

[0011] Optionally, the process of the data volume calculation module calculating the data volume required for the attack specifically includes: Traverse to get the Rectangle discriminator for the block cipher, expand the differential features provided by the discriminator to both ends, and record the forward extension part as , the differential propagation relationship is ,in The forward input difference provided to the discriminator, is the forward extended endpoint difference, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , The backward input differential and backward extension endpoint differential provided for the distinguisher, The unknown difference in bits, the key involved is recorded as , ; Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, ; Record the required data (plain text P , ciphertext C ), the total amount is ; The total amount of data required for the attack is D .

[0012] Optionally, the four-tuple construction module includes a plaintext four-tuple construction submodule and a ciphertext four-tuple construction submodule: The plaintext four-tuple construction submodule is used to construct a forward four-tuple based on the differential result of the encrypted plaintext; The ciphertext quadruple construction submodule is used to construct a backward quadruple based on the differential result of the encrypted ciphertext.

[0013] Optionally, the workflow of the plaintext four-tuple construction submodule includes: guess Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. ; The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table .

[0014] Optionally, the workflow of the ciphertext quadruple construction submodule specifically includes: guess Partial key in ,remember The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is bits, the remaining unknown difference is Bits, composable satisfaction middle The number of data pairs with fixed bit differences is , the number of quadruples that can be constructed is .

[0015] Compared with the prior art, the present invention has the following beneficial effects: The present invention combines the Rectangle cryptanalysis method with the meet-in-the-middle cryptanalysis method for the first time, and proposes a new Rectangle meet-in-the-middle attack method. This method shows significant advantages over other attack methods when the key size is relatively large relative to the block size. Specifically, although the probability of the distinguisher is limited by the block size, this algorithm shows a stronger advantage in the key recovery stage by combining it with the meet-in-the-middle attack, thereby achieving an overall better attack effect. In addition, when the number of rounds involved in the front and back extensions of the distinguisher is equivalent, or in more detailed scenarios, the unknown difference is equivalent to the number of corresponding keys and the number of guessed keys, due to the characteristics of the meet-in-the-middle attack, the complexity of each step of the attack can be balanced to the greatest extent, thereby achieving a near-optimal attack effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0017] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention; Figure 2 This is a schematic diagram of the Rectangle meet-in-the-middle attack process in an embodiment of the present invention; Figure 3 This is a schematic diagram of one round of SKINNY encryption according to an embodiment of the present invention; Figure 4 Schematic diagram of a Rectangle meet-in-the-middle attack on 38 rounds of SKINNYe-64-256 v2 according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] Embodiment 1 A Rectangle meet-in-the-middle attack cryptanalysis method, such as Figure 1 As shown, the method includes: Obtain a data encryption machine with a built-in key and obtain the block encryption algorithm of the data encryption machine. For a certain security system, obtain its (public) block cipher algorithm for privacy data protection, that is, obtain the encryption machine with a built-in key used by the system to encrypt data.

[0020] Based on the block encryption algorithm, a Rectangle distinguisher is constructed that can distinguish block ciphers from random permutations. The distinction is based on input and output differential features that exist with high probability. The input and output differential features provide a basis for the Rectangle distinguisher to expand to both ends.

[0021] Based on the input and output differential features, the two ends of the Rectangle distinguisher are differentially expanded, and after the amount of data required for the attack is calculated based on the expanded input differential / output differential, a message is selected for the attack. In this embodiment, the input differential corresponds to the selection of a plaintext attack, and the output differential corresponds to the selection of a ciphertext attack. When attacking, enough plaintext (or ciphertext) is selected so that at least one correct quadruple can be left after subsequent operations for exhaustive search, and the selected plaintext (or ciphertext) (uniformly recorded as a message or data) is used for the attack, that is, these data are processed to generate a quadruple.

[0022] Based on the input difference / output difference feature, the two ends of the Rectangle distinguisher are differentially expanded, and after the amount of data required for the attack is calculated based on the expanded input difference / output difference, a message is selected for the attack. The forward quadruple and the backward quadruple are intersected to obtain a matching result.

[0023] The Rectangle distinguisher for the block cipher is obtained by searching, and the probability is recorded as , the number of quadruplets that satisfy the discriminator input difference should be at least . Extend the differential features provided by the distinguisher to both ends, such as Figure 2 As shown. The forward extension part is , the differential propagation relationship is ,in The input difference provided to the discriminator, To extend the endpoint differential, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , The meaning and , similar, The unknown difference in bits, the key involved is recorded as , Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, . Record the required data (plain text P , ciphertext C ) The total amount is ; The time required to perform this step is The hash table used to store data can store D entries, the total amount of data required for the attack is D ; Rectangle meet-in-the-middle attack flow chart is as follows Figure 2 shown.

[0024] The key of the extended part is traversed, and the plaintext is sent to the forward extension part of the Rectangle distinguisher, and the difference is calculated using the partially encrypted plaintext. The difference based on the encrypted plaintext is compared with the input difference of the Rectangle distinguisher and a pair of plaintext and ciphertext that conforms to the input difference is used to form a data pair. Two pairs of plaintext and ciphertext that conform to the output difference are used to form a forward quadruple according to the difference at the ciphertext. At the same time, the key of the backward extension part is traversed, and the ciphertext is sent to the backward extension part of the Rectangle distinguisher for partial decryption. The difference is calculated using the decrypted ciphertext, and a backward quadruple is constructed based on the difference of the decrypted ciphertext.

[0025] In the embodiment of the present invention, a pair of plaintext (P1, C1) (P2, C2) is encrypted using a guessed (i.e. traversed) key (the guessed key is only some subkey bits used in the involved cipher rounds, and (P1*, C1) (P2*, C2) is obtained). If P1* XOR P2* meets the difference in the forward extension of the distinguisher, a data pair {(P1*, C1) (P2*, C2)} is formed, otherwise the data pair is discarded (the encrypted position is determined by the guessed key. If only one round is guessed, the difference after one round is used, and encryption can be performed in a non-full round). Assuming that two data pairs {(P1*, C1), (P2*, C2)} and {(P3*, C3), (P4*, C4)} have been obtained, they are matched according to the difference at the ciphertext. If C1 XOR C3 and C2 XOR C4 both meet the difference at the ciphertext, the two data pairs form a four-tuple. Specifically: Traverse (partial or complete) of the keys in the extended part, send the plaintext to the forward extension part of the distinguisher for partial encryption, compare the differential result of the (partially) encrypted pair of plaintext and ciphertext with the differential feature provided by the distinguisher (or extended), and use the plaintext and ciphertext that match the differential to form a data pair (discard the non-matching ones). Then use the two plaintext and ciphertext pairs that match the output differential to form a 4-tuple based on the differential at the ciphertext; at the same time, send the ciphertext to the backward extension part of the distinguisher for partial decryption, and perform similar operations to form a 4-tuple.

[0026] Guess (traverse) the (partial) keys involved in the extension part, establish a key counter list for the unguessed keys, partially encrypt and decrypt the plaintext and ciphertext according to the guessed keys, and , The data pairs and quadruplets are constructed respectively, and the specific steps include: A) guessing Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table ; B) Perform the same operation on the ciphertext, record The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is recorded as , the remaining unknown difference is bits, but since the plaintext is selected, when constructing a data pair from the ciphertext, the plaintext and ciphertext need to be stored in the hash table and matched, so the constructible middle The number of data pairs with fixed bit differences is , similarly, the number of quadruples that can be constructed is Here we multiply This is to ensure that the constructed data pairs do not exist in the same plaintext structure, that is, to eliminate redundancy. This is because all data is in a plaintext structure.

[0027] Get the forward quadruple and the backward quadruple, and take the intersection to get the matching result. The time required to encrypt and decrypt the plaintext and ciphertext based on the guessed key part is ; respectively in and The time required to construct data pairs and quadruples is , and requires A hash table of entries stores data pairs and quadruples.

[0028] Using a 4-tuple to get the unguessable key The number of selected keys is The time consumption of this step is , here The calculation methods include guess filtering and pre-built hash tables.

[0029] Part of the key information is obtained according to the matching result, and the remaining key information is obtained by using an exhaustive search method to obtain the complete key of the data encryption machine, and the analysis result of the Rectangle middle meet-in-the-middle attack is obtained.

[0030] The key information currently obtained may not be able to completely restore the master key. Therefore, exhaustive search or enumeration to restore the master key takes time , when using exhaustive search to recover the master key, the auxiliary parameter Need to meet ; When restoring the master key using the method of enumerating all candidate keys, .

[0031] The master key is used to decrypt the private data to obtain the plain text of the private data.

[0032] The above steps can be summarized into the following algorithm: General Rectangle meet-in-the-middle attack cryptanalysis method: Initialization: Build plaintext structures, each structure A plain text.

[0033] 1. For each guessed key : a) Partially encrypted plaintext; b) Build Satisfaction Bit-fixed differential data pairs are stored in a hash table; c) Build Four tuples are generated and stored in a hash table; 2. For each guessed key : a) Partially decrypt ciphertext; b) Build Satisfaction The bit-fixed difference data pairs are stored in a hash table; c) Build Four tuples; 2. Match the quadruple constructed in both directions, and use each successfully matched quadruple to extract of candidate keys, count and update the key counter or enumerate the test.

[0034] In this embodiment, , Mutually independent, if independence fails in application, algorithm efficiency may be improved by using key bridges.

[0035] Embodiment 2 A Rectangle meet-in-the-middle attack cryptanalysis system, the system comprising: an encryption machine acquisition module, a distinguisher expansion module, a data volume calculation module, a quadruple construction module, a quadruple matching module and a key recovery module; The encryption machine acquisition module is used to acquire a data encryption machine with a built-in key and obtain the block encryption algorithm of the data encryption machine. For a certain security system, the (public) block cipher algorithm used for privacy data protection is obtained, that is, the encryption machine with a built-in key used by the system to encrypt data is obtained.

[0036] The distinguisher extension module is used to construct a Rectangle distinguisher that can distinguish block ciphers from random permutations based on the block encryption algorithm. The distinction is based on input and output differential features that exist with high probability. The input and output differential features provide a basis for the Rectangle distinguisher to expand to both ends.

[0037] Based on the input and output differential features, the two ends of the Rectangle distinguisher are differentially expanded, and after the amount of data required for the attack is calculated based on the expanded input differential / output differential, a message is selected for the attack. In this embodiment, the input differential corresponds to the selection of a plaintext attack, and the output differential corresponds to the selection of a ciphertext attack. When attacking, enough plaintext (or ciphertext) is selected so that at least one correct quadruple can be left after subsequent operations for exhaustive search, and the selected plaintext (or ciphertext) (uniformly recorded as a message or data) is used for the attack, that is, these data are processed to generate a quadruple.

[0038] In this embodiment, the input difference corresponds to the selected plaintext attack, and the output difference corresponds to the selected ciphertext attack. When attacking, enough plaintexts (or ciphertexts) are selected so that at least one correct quadruple is left after subsequent operations for exhaustive search, and the selected plaintexts (or ciphertexts) (collectively referred to as messages or data) are used to attack, that is, these data are processed to generate quadruple.

[0039] The data volume calculation module is used to perform differential expansion on both ends of the Rectangle distinguisher based on the input and output differential features, calculate the data volume required for the attack based on the expanded input differential / output differential, and then select a message for the attack.

[0040] The Rectangle distinguisher for the block cipher is obtained by searching, and the probability is recorded as , the number of quadruplets that satisfy the discriminator input difference should be at least . Extend the differential features provided by the distinguisher to both ends, such as Figure 2 As shown. The forward extension part is , the differential propagation relationship is ,in The input difference provided to the discriminator, To extend the endpoint differential, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , The meaning and , similar, The unknown difference in bits, the key involved is recorded as , Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, . Record the required data (plain text P , ciphertext C ) The total amount is ; The time required to perform this step is , the hash table used to store data can store D entries, and the total amount of data required for the attack is D ; Rectangle meets in the middle to provide a flow chart as follows Figure 2 shown.

[0041] The quadruple construction module is used to traverse the key of the extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, calculate the difference using the encrypted plaintext, compare the difference based on the encrypted plaintext with the input difference of the Rectangle distinguisher and use a pair of plaintext and ciphertext that conforms to the input difference to form a data pair, use two pairs of plaintext and ciphertext that conform to the output difference to form a forward quadruple according to the difference at the ciphertext, and at the same time, traverse the key of the backward extension part, send the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, calculate the difference using the decrypted ciphertext, and construct a backward quadruple based on the difference of the decrypted ciphertext.

[0042] In the embodiment, a pair of plaintext (P1, C1) (P2, C2) is encrypted using the guessed (traversed) key (the guessed key is only some subkey bits used in the expansion round involved, not the main key) to obtain (P1 * ,C1)(P2 * ,C2). If P1 * XOR P2 * The difference in the forward extension of the distinguisher forms a data pair {(P1 * ,C1)(P2 * ,C2)}, otherwise the data pair is discarded (the guessed key determines where to encrypt. If only one round of guessing is done, the difference is compared with the difference after this round). Suppose there are two data pairs here {(P1 * ,C1),(P2 * ,C2)},{(P3 * ,C3),(P4 * ,C4)} Then match the two data pairs at the ciphertext. If C1 XOR C3, C2 XOR C4 both satisfy the difference at the ciphertext, then the two data pairs form a four-tuple. Specifically: Traverse (partial or complete) of the keys in the extended part, send the plaintext to the forward extension part of the distinguisher for partial encryption, compare the differential result of the (partially) encrypted plaintext and ciphertext with the differential feature provided by the distinguisher, and use the plaintext and ciphertext that match the differential to form a data pair (discard the non-matching ones). Then use the two plaintext and ciphertext that match the output differential to form a 4-tuple based on the difference at the ciphertext; at the same time, send the ciphertext to the backward extension part of the distinguisher for partial decryption, and perform similar operations to form a 4-tuple.

[0043] Guess (traverse) the (partial) keys involved in the extension part, establish a key counter list for the unguessed keys, partially encrypt and decrypt the plaintext and ciphertext according to the guessed keys, and , The data pairs and quadruplets are constructed respectively, and the specific steps include: A) guessing Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table ; B) Perform the same operation on the ciphertext, record The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is recorded as , the remaining unknown difference is bits, but since the plaintext is selected, when constructing a data pair from the ciphertext, the plaintext and ciphertext need to be stored in the hash table and matched, so the constructible middle The number of data pairs with fixed bit differences is , similarly, the number of quadruples that can be constructed is Here we multiply This is to ensure that the constructed data pairs do not exist in the same plaintext structure, that is, to eliminate redundancy. This is because all data is in a plaintext structure.

[0044] The quadruple matching module is used to take the intersection of the forward quadruple and the backward quadruple to obtain a matching result.

[0045] The time required to encrypt and decrypt plaintext and ciphertext based on the guessed partial key is ; respectively in and The time required to construct data pairs and quadruples is , and requires A hash table of entries stores data pairs and quadruples.

[0046] guess Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table .

[0047] Using a 4-tuple to get the unguessable key The number of candidate keys is The time consumption of this step is , here The calculation methods include guess filtering and pre-built hash tables.

[0048] The key recovery module is used to obtain partial key information according to the matching result, use the exhaustive search method to obtain the remaining key information, obtain the complete key of the data encryption machine, obtain the analysis result of the Rectangle middle encounter attack, and realize the analysis result of the encounter attack password.

[0049] The key information currently obtained may not be able to completely restore the master key. Therefore, exhaustive search or enumeration to restore the master key takes time , when using exhaustive search to recover the master key, the auxiliary parameter Need to meet ; When restoring the master key using the method of enumerating all candidate keys, .

[0050] The master key is used to decrypt the private data to obtain the plain text of the private data.

[0051] The above steps can be summarized into the following algorithm: General Rectangle meet-in-the-middle attack cryptanalysis method: Initialization: Build plaintext structures, each containing A plain text.

[0052] 1. For each guessed key : d) Partially encrypted plaintext; e) Build Satisfaction Bit-fixed differential data pairs are stored in a hash table; f) Build Four tuples are generated and stored in a hash table; 2. For each guessed key : a) Partially decrypt ciphertext; b) Build Satisfaction The bit-fixed difference data pairs are stored in a hash table; c) Build Four tuples; 3. Match the quadruple constructed in both directions, and use each successfully matched quadruple to extract of candidate keys, count and update the key counter or enumerate the test.

[0053] In this embodiment, , Independent of each other, if independence fails when applied, the algorithm efficiency will be improved due to the use of key bridges.

[0054] Embodiment 3 The new method of the present invention can be used to act on the block cipher SKINNYe-64-256 v2 and obtain the latest 38-round attack results.

[0055] SKINNYe-64-256 v2 uses the same round function as SKINNY and SKINNYe-64-256, such as Figure 3 As shown in the figure, the 64-bit state is divided into 16 half bytes (4 bits). In the figure, SC is a nonlinear S-box substitution, AC and ART respectively represent the introduction of (XOR) round constants and round adjustable keys into the cipher state, ShiftRows and MixColumns are linear operations of shifting bytes in each row and mixing bytes in each column. The rules are in Figure 3 Winning bid.

[0056] To meet higher security requirements, the adjustable key arrangement of SKINNYe-64-256 v2 is unique. First, the 256-bit master key is divided into four 4×4 arrays of the same size as the state, denoted as , the round key is After the first round, the round key update is mainly divided into the following two steps: apply the permutation to each Each nibble of .

[0057] The 26-round Rectangle distinguisher representation for SKINNYe-64-256 v2 under the related key setting is shown in Table 1: Table 1

[0058] Using the new Rectangle meet-in-the-middle cryptographic analysis method of the present invention, the above-mentioned distinguisher is used to attack. The attack process is as follows: Figure 4 shown. Figure 4 In the table, unfilled cells represent zero differentials. Cells filled with valid digits (hexadecimal) represent non-zero fixed differentials, cells filled with gray represent arbitrary non-zero differentials, and cells filled with bold lines represent the key value required to guess the key and perform differential comparison.

[0059] Extend the classifier forward and backward by 6 rounds, and the difference distribution is as follows Figure 4 In the forward expansion process, the fifth round state is allowed to pass By probability propagation (according to the corresponding difference distribution table) Therefore, the discriminator probability becomes The attack parameters are as follows: D The number of ciphertexts that can be constructed is , in order to ensure that at least one quadruple that satisfies the input difference is found, ;Unknown difference in plain text , involving the number of keys ; Unknown difference in ciphertext , involving the number of keys . Select the number of plaintext , the overall data complexity of the attack (due to the selection of plaintext under four related keys, the data complexity is no greater than , the attack is effective). This step requires encrypting the selected plaintext to obtain the corresponding ciphertext, and the time consumption is .

[0060] By using the idea of ​​the general Rectangle key recovery algorithm, choose to guess all and , in order to achieve the best attack effect. Use the guessed key to partially encrypt / decrypt the plaintext / ciphertext. The time consumption of this step is .

[0061] Respectively , The data pairs and quadruplets are formed in the process for matching and subsequent extraction of key information. The time consumption of this step is Also required A hash table with entries is used to store quadruple groups (the storage space can be recycled and is only counted by the maximum required storage space).

[0062] By querying the hash table and performing data comparison, the quadruple constructed in both directions is matched and the key information is extracted. The extracted key information will help to significantly reduce the time consumed by exhaustive search for the master key. The time complexity required for this step is Here and Independent of each other, , and because , All guessed. Here it is 1.

[0063] The master key is restored by enumerating all candidate keys. After this step, the attack ends and the attacker can obtain the key used for the attacked block cipher encryption and obtain data access rights through the key. The time consumption of this step is .

[0064] In summary, the total time consumption of this attack is 38 rounds of encryption.

[0065] At present, the best cryptanalysis results for SKINNYe-64-256 v2 can only break through to round 37. By adopting the new cryptanalysis method proposed in this invention, the number of attack rounds can be increased to round 38 (the full round encryption of the algorithm is 44 rounds), significantly reducing its security boundary redundancy.

[0066] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A Rectangle meet-in-the-middle attack cryptanalysis method, characterized in that: The method comprises: Obtain a data encryption machine with a built-in key, and obtain a block encryption algorithm of the data encryption machine; Based on the block encryption algorithm, a Rectangle distinguisher is constructed that can distinguish block ciphers from random permutations. The distinction is based on input differential / output differential features that exist with high probability. The input differential / output differential features provide a basis for the Rectangle distinguisher to expand to both ends. Based on the input differential / output differential features, differential expansion is performed on both ends of the Rectangle distinguisher, and after the amount of data required for the attack is calculated based on the expanded input differential / output differential, a message is selected for the attack; Traverse the key of the extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, use the partially encrypted plaintext to calculate the difference, compare the difference based on the encrypted plaintext with the input difference of the Rectangle distinguisher and use a pair of plaintext and ciphertext that conforms to the input difference to form a data pair, use two pairs of plaintext and ciphertext that conform to the output difference to form a forward quadruple according to the difference at the ciphertext, and at the same time, traverse the key of the backward extension part, send the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, use the decrypted ciphertext to calculate the difference, and construct a backward quadruple based on the difference of the decrypted ciphertext; Taking the intersection of the forward quadruple and the backward quadruple to obtain a matching result; Part of the key information is obtained according to the matching result, and the remaining key information is obtained by using an exhaustive search method to obtain the complete key of the data encryption machine, and the analysis result of the Rectangle middle meet-in-the-middle attack is obtained.

2. The Rectangle meet-in-the-middle attack cryptanalysis method according to claim 1, characterized in that: The input difference and output difference of the Rectangle distinguisher are differentially expanded to both ends. The amount of data required for the attack is calculated based on the input difference / output difference features expanded by the Rectangle distinguisher. The content of the selected message for attack specifically includes: Traverse to get the Rectangle discriminator for the block cipher, expand the differential features provided by the discriminator to both ends, and record the forward expansion part as , the differential propagation relationship is ,in The forward input difference provided to the discriminator, is the forward extended endpoint difference, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , Provides backward output differential and backward extension endpoint differential for the classifier. The unknown difference in bits, the key involved is recorded as , ; Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, ; Let the plaintext be P, the corresponding ciphertext be C, and the total amount is ; The total amount of data required for the attack is D.

3. The Rectangle meet-in-the-middle attack cryptanalysis method according to claim 1, characterized in that: Traverse the key of the forward extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, compare the differential result of the encrypted plaintext with the output differential, and use a pair of plaintext and ciphertext that match the differential to form a data pair. Use two pairs of plaintext and ciphertext that match the output differential to form a forward quadruple based on the differential at the ciphertext. The specific contents include: guess Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. ; The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table .

4. The Rectangle meet-in-the-middle attack cryptanalysis method according to claim 3, characterized in that: Traversing the key of the backward extension part, sending the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, using the decrypted ciphertext to calculate the difference, and constructing the backward quadruple based on the difference of the decrypted ciphertext specifically includes: guess Part of the key in The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is recorded as , the remaining unknown difference is Bits, composable satisfaction middle The number of data pairs with fixed bit differences is , the number of quadruples that can be constructed is .

5. The Rectangle meet-in-the-middle attack cryptanalysis method according to claim 4, characterized in that: Part of the key information is obtained according to the matching result, and the content of the remaining key information is obtained by using the exhaustive search method, specifically including: Get the unguessable key based on the successfully matched quadruple , Information to obtain the number of candidate keys ; Use exhaustive search to obtain the remaining key information.

6. A Rectangle meet-in-the-middle attack cryptanalysis system, the system being used to implement the analysis method according to any one of claims 1 to 5, characterized in that: The system comprises: an encryption machine acquisition module, a distinguisher expansion module, a data volume calculation module, a quadruple construction module, a quadruple matching module and a key recovery module; The encryption machine acquisition module is used to acquire a data encryption machine with a built-in key, and obtain a block encryption algorithm of the data encryption machine; The distinguisher extension module is used to construct a Rectangle distinguisher that can distinguish block ciphers from random permutations based on the block encryption algorithm. The distinction is based on input and output differential features that exist with high probability. The input and output differential features provide a basis for the Rectangle distinguisher to expand to both ends. The data volume calculation module is used to perform differential expansion on both ends of the Rectangle distinguisher based on the input and output differential features, calculate the amount of data required for the attack based on the expanded input differential / output differential, and select a message for the attack; The four-tuple construction module is used to traverse the key of the extension part, send the plaintext to the forward extension part of the Rectangle distinguisher, calculate the difference using the encrypted plaintext, compare the difference based on the encrypted plaintext with the input difference of the Rectangle distinguisher and use a pair of plaintext and ciphertext that conforms to the input difference to form a data pair, use two pairs of plaintext and ciphertext that conform to the output difference to form a forward four-tuple according to the difference at the ciphertext, and at the same time, traverse the key of the backward extension part, send the ciphertext to the backward extension part of the Rectangle distinguisher for decryption, calculate the difference using the decrypted ciphertext, and construct a backward four-tuple based on the difference of the decrypted ciphertext; The quadruple matching module is used to take the intersection of the forward quadruple and the backward quadruple to obtain a matching result; The key recovery module is used to obtain partial key information according to the matching result, use the exhaustive search method to obtain the remaining key information, obtain the complete key of the data encryption machine, and obtain the analysis result of the Rectangle middle meet-in-the-middle attack.

7. The Rectangle meet-in-the-middle attack cryptanalysis system according to claim 6, characterized in that: The process of the data volume calculation module calculating the amount of data required for the attack specifically includes: Traverse to get the Rectangle discriminator for the block cipher, expand the differential features provided by the discriminator to both ends, and record the forward expansion part as , the differential propagation relationship is ,in The forward input difference provided to the discriminator, is the forward extended endpoint difference, The unknown difference in bits, the key involved is recorded as , ; The backward extension part is , , Provides backward output differential and backward extension endpoint differential for the classifier. The unknown difference in bits, the key involved is recorded as , ; Build plaintext structures, each containing plaintexts, to ensure that at least one quadruple satisfies the plaintext difference, Need to meet , therefore, ; Let the plaintext be P, the corresponding ciphertext be C, and the total amount is ; The total amount of data required for the attack is D.

8. The Rectangle meet-in-the-middle attack cryptanalysis system according to claim 6, characterized in that: The four-tuple construction module includes a plaintext four-tuple construction submodule and a ciphertext four-tuple construction submodule: The plaintext four-tuple construction submodule is used to construct a forward four-tuple based on the differential result of the encrypted plaintext; The ciphertext quadruple construction submodule is used to construct a backward quadruple based on the differential result of the encrypted ciphertext.

9. The Rectangle meet-in-the-middle attack cryptanalysis system according to claim 8, characterized in that: The workflow of the plaintext quadruple construction submodule includes: guess Partial key in ,remember The number of keys guessed in is bits, and encrypt the plaintext using the guessed key, i.e. ; The difference that can be determined by guessing is bits, the remaining unknown difference is bit; according to In The bit fixed differential is used to form data pairs, and the number of data pairs is , store it in the hash table; use the formed data pairs to construct quadruple groups, the number of quadruple groups that can be constructed is , which is recorded as , stored in the hash table .

10. The Rectangle meet-in-the-middle attack cryptanalysis system according to claim 8, characterized in that: The workflow of the ciphertext quadruple construction submodule specifically includes: guess Partial key in ,remember The number of keys guessed in is bits, use the guessed key to partially decrypt the ciphertext, i.e. , the difference that can be determined by guessing is recorded as , the remaining unknown difference is Bits, composable satisfaction middle The number of data pairs with fixed bit differences is , the number of quadruples that can be constructed is .

Citation Information

Patent Citations

  • Novel fault attack method for SKINNY-N-N algorithm

    CN117811725A

Cited By

  • Quantum intermediate encounter attack method and system for AES, electronic equipment and storage medium

    CN122533736A