Biclique attack

Last updated

A biclique attack is a variant of the meet-in-the-middle (MITM) method of cryptanalysis. It utilizes a biclique structure to extend the number of possibly attacked rounds by the MITM attack. Since biclique cryptanalysis is based on MITM attacks, it is applicable to both block ciphers and (iterated) hash-functions. Biclique attacks are known for having weakened both full AES [1] and full IDEA, [2] though only with slight advantage over brute force. It has also been applied to the KASUMI cipher and preimage resistance of the Skein-512 and SHA-2 hash functions. [3]

Contents

The biclique attack is still (as of April 2019) the best publicly known single-key attack on AES. The computational complexity of the attack is , and for AES128, AES192 and AES256, respectively. It is the only publicly known single-key attack on AES that attacks the full number of rounds. [1] Previous attacks have attacked round reduced variants (typically variants reduced to 7 or 8 rounds).

As the computational complexity of the attack is , it is a theoretical attack, which means the security of AES has not been broken, and the use of AES remains relatively secure. The biclique attack is nevertheless an interesting attack, which suggests a new approach to performing cryptanalysis on block ciphers. The attack has also rendered more information about AES, as it has brought into question the safety-margin in the number of rounds used therein.

History

The original MITM attack was first suggested by Diffie and Hellman in 1977, when they discussed the cryptanalytic properties of DES. [4] They argued that the key-size was too small, and that reapplying DES multiple times with different keys could be a solution to the key-size; however, they advised against using double-DES and suggested triple-DES as a minimum, due to MITM attacks (MITM attacks can easily be applied to double-DES to reduce the security from to just , since one can independently bruteforce the first and the second DES-encryption if they have the plain- and ciphertext).

Since Diffie and Hellman suggested MITM attacks, many variations have emerged that are useful in situations, where the basic MITM attack is inapplicable. The biclique attack variant was first suggested by Dmitry Khovratovich, Rechberger and Savelieva for use with hash-function cryptanalysis. [5] However, it was Bogdanov, Khovratovich and Rechberger who showed how to apply the concept of bicliques to the secret-key setting including block-cipher cryptanalysis, when they published their attack on AES. Prior to this, MITM attacks on AES and many other block ciphers had received little attention, mostly due to the need for independent key bits between the two 'MITM subciphers' in order to facilitate the MITM attack — something that is hard to achieve with many modern key schedules, such as that of AES.

The biclique

For a general explanation of what a biclique structure is, see the article for bicliques.

In a MITM attack, the keybits and , belonging to the first and second subcipher, need to be independent; that is, they need to be independent of each other, else the matched intermediate values for the plain- and ciphertext cannot be computed independently in the MITM attack (there are variants of MITM attacks, where the blocks can have shared key-bits. See the 3-subset MITM attack). This property is often hard to exploit over a larger number of rounds, due to the diffusion of the attacked cipher.

Simply put: The more rounds you attack, the larger subciphers you will have. The larger subciphers you have, the fewer independent key-bits between the subciphers you will have to bruteforce independently. Of course, the actual number of independent key-bits in each subcipher depends on the diffusion properties of the key-schedule.

The way the biclique helps with tackling the above, is that it allows one to, for instance, attack 7 rounds of AES using MITM attacks, and then by utilizing a biclique structure of length 3 (i.e. it covers 3 rounds of the cipher), you can map the intermediate state at the start of round 7 to the end of the last round, e.g. 10 (if it is AES128), thus attacking the full number of rounds of the cipher, even if it was not possible to attack that amount of rounds with a basic MITM attack.

The meaning of the biclique is thus to build a structure effectively, which can map an intermediate value at the end of the MITM attack to the ciphertext at the end. Which ciphertext the intermediate state gets mapped to at the end, of course depends on the key used for the encryption. The key used to map the state to the ciphertext in the biclique, is based on the keybits bruteforced in the first and second subcipher of the MITM attack.

The essence of biclique attacks is thus, besides the MITM attack, to be able to build a biclique structure effectively, that depending on the keybits and can map a certain intermediate state to the corresponding ciphertext.

How to build the biclique

Bruteforce

Get intermediate states and ciphertexts, then compute the keys that maps between them. This requires key-recoveries, since each intermediate state needs to be linked to all ciphertexts.

(This method was suggested by Bogdanov, Khovratovich and Rechberger in their paper: Biclique Cryptanalysis of the Full AES [1] )

Preliminary:
Remember that the function of the biclique is to map the intermediate values, , to the ciphertext-values, , based on the key such that:

Procedure:
Step one: An intermediate state(), a ciphertext() and a key() is chosen such that: , where is the function that maps an intermediate state to a ciphertext using a given key. This is denoted as the base computation.

Step two: Two sets of related keys of size is chosen. The keys are chosen such that:

In other words:
An input difference of 0 should map to an output difference of under a key difference of . All differences are in respect to the base computation.
An input difference of should map to an output difference of 0 under a key difference of . All differences are in respect to the base computation.

Step three: Since the trails do not share any non-linear components (such as S-boxes), the trails can be combined to get:
,
which conforms to the definitions of both the differentials from step 2.
It is trivial to see that the tuple from the base computation, also conforms by definition to both the differentials, as the differentials are in respect to the base computation. Substituting into any of the two definitions, will yield since and .
This means that the tuple of the base computation, can also be XOR'ed to the combined trails:

Step four: It is trivial to see that:



If this is substituted into the above combined differential trails, the result will be:

Which is the same as the definition, there was earlier had above for a biclique:

It is thus possible to create a biclique of size ( since all keys of the first set of keys, can be combined with the keys from the second set of keys). This means a biclique of size can be created using only computations of the differentials and over . If for then all of the keys will also be different in the biclique.

This way is how the biclique is constructed in the leading biclique attack on AES. There are some practical limitations in constructing bicliques with this technique. The longer the biclique is, the more rounds the differential trails has to cover. The diffusion properties of the cipher, thus plays a crucial role in the effectiveness of constructing the biclique.

Other ways of constructing the biclique

Bogdanov, Khovratovich and Rechberger also describe another way to construct the biclique, called 'Interleaving Related-Key Differential Trails' in the article: "Biclique Cryptanalysis of the Full AES [1] ".

Biclique Cryptanalysis procedure

Step one: The attacker groups all possible keys into key-subsets of size for some , where the key in a group is indexed as in a matrix of size . The attacker splits the cipher into two sub-ciphers, and (such that ), as in a normal MITM attack. The set of keys for each of the sub-ciphers is of cardinality , and is called and . The combined key of the sub-ciphers is expressed with the aforementioned matrix .

Step two: The attacker builds a biclique for each group of keys. The biclique is of dimension-d, since it maps internal states, , to ciphertexts, , using keys. The section "How to build the biclique" suggests how to build the biclique using "Independent related-key differentials". The biclique is in that case built using the differentials of the set of keys, and , belonging to the sub-ciphers.

Step three: The attacker takes the possible ciphertexts, , and asks a decryption-oracle to provide the matching plaintexts, .

Step four: The attacker chooses an internal state, and the corresponding plaintext, , and performs the usual MITM attack over and by attacking from the internal state and the plaintext.

Step five: Whenever a key-candidate is found that matches with , that key is tested on another plain-/ciphertext pair. if the key validates on the other pair, it is highly likely that it is the correct key.

Example attack

The following example is based on the biclique attack on AES from the paper "Biclique Cryptanalysis of the Full AES [1] ".
The descriptions in the example uses the same terminology that the authors of the attack used (i.e. for variable names, etc).
For simplicity it is the attack on the AES128 variant that is covered below.
The attack consists of a 7-round MITM attack with the biclique covering the last 3 rounds.

Key partitioning

The key-space is partitioned into groups of keys, where each group consist of keys.
For each of the groups, a unique base-key for the base-computation is selected.
The base-key has two specific bytes set to zero, shown in the below table (which represents the key the same way AES does in a 4x4 matrix for AES128):

The remaining 14 bytes (112 bits) of the key is then enumerated. This yields unique base-keys; one for each group of keys.
The ordinary keys in each group is then chosen with respect to their base-key. They are chosen such that they are nearly identical to the base-key. They only vary in 2 bytes (either the 's or the 's) of the below shown 4 bytes:

This gives and , which combined gives different keys, . these keys constitute the keys in the group for a respective base key.

Biclique construction

bicliques is constructed using the "Independent related-key differentials" technique, as described in the "How to construct the biclique" section.
The requirement for using that technique, was that the forward- and backward-differential trails that need to be combined, did not share any active non-linear elements. How is it known that this is the case?
Due to the way the keys in step 1 is chosen in relation to the base key, the differential trails using the keys never share any active S-boxes (which is the only non-linear component in AES), with the differential trails using the key . It is therefore possible to XOR the differential trails and create the biclique.

MITM attack

When the bicliques are created, the MITM attack can almost begin. Before doing the MITM attack, the intermediate values from the plaintext:
,
the intermediate values from the ciphertext:
,
and the corresponding intermediate states and sub-keys or , are precomputed and stored, however.

Now the MITM attack can be carried out. In order to test a key , it is only necessary to recalculate the parts of the cipher, which is known will vary between and . For the backward computation from to , this is 4 S-boxes that needs to be recomputed. For the forwards computation from to , it is just 3 (an in-depth explanation for the amount of needed recalculation can be found in "Biclique Cryptanalysis of the full AES [1] " paper, where this example is taken from).

When the intermediate values match, a key-candidate between and is found. The key-candidate is then tested on another plain-/ciphertext pair.

Results

This attack lowers the computational complexity of AES128 to , which is 3–5 times faster than a bruteforce approach. The data complexity of the attack is and the memory complexity is .

Related Research Articles

<span class="mw-page-title-main">Advanced Encryption Standard</span> Standard for the encryption of electronic data

The Advanced Encryption Standard (AES), also known by its original name Rijndael, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001.

In cryptography, a block cipher is a deterministic algorithm that operates on fixed-length groups of bits, called blocks. Block ciphers are the elementary building blocks of many cryptographic protocols. They are ubiquitous in the storage and exchange of data, where such data is secured and authenticated via encryption.

Differential cryptanalysis is a general form of cryptanalysis applicable primarily to block ciphers, but also to stream ciphers and cryptographic hash functions. In the broadest sense, it is the study of how differences in information input can affect the resultant difference at the output. In the case of a block cipher, it refers to a set of techniques for tracing differences through the network of transformation, discovering where the cipher exhibits non-random behavior, and exploiting such properties to recover the secret key.

In cryptography, linear cryptanalysis is a general form of cryptanalysis based on finding affine approximations to the action of a cipher. Attacks have been developed for block ciphers and stream ciphers. Linear cryptanalysis is one of the two most widely used attacks on block ciphers; the other being differential cryptanalysis.

In cryptography, a block cipher mode of operation is an algorithm that uses a block cipher to provide information security such as confidentiality or authenticity. A block cipher by itself is only suitable for the secure cryptographic transformation of one fixed-length group of bits called a block. A mode of operation describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.

<span class="mw-page-title-main">Ciphertext</span> Encrypted information

In cryptography, ciphertext or cyphertext is the result of encryption performed on plaintext using an algorithm, called a cipher. Ciphertext is also known as encrypted or encoded information because it contains a form of the original plaintext that is unreadable by a human or computer without the proper cipher to decrypt it. This process prevents the loss of sensitive information via hacking. Decryption, the inverse of encryption, is the process of turning ciphertext into readable plaintext. Ciphertext is not to be confused with codetext because the latter is a result of a code, not a cipher.

In mathematics, particularly algebraic topology and homology theory, the Mayer–Vietoris sequence is an algebraic tool to help compute algebraic invariants of topological spaces, known as their homology and cohomology groups. The result is due to two Austrian mathematicians, Walther Mayer and Leopold Vietoris. The method consists of splitting a space into subspaces, for which the homology or cohomology groups may be easier to compute. The sequence relates the (co)homology groups of the space to the (co)homology groups of the subspaces. It is a natural long exact sequence, whose entries are the (co)homology groups of the whole space, the direct sum of the (co)homology groups of the subspaces, and the (co)homology groups of the intersection of the subspaces.

The meet-in-the-middle attack (MITM), a known plaintext attack, is a generic space–time tradeoff cryptographic attack against encryption schemes that rely on performing multiple encryption operations in sequence. The MITM attack is the primary reason why Double DES is not used and why a Triple DES key (168-bit) can be brute-forced by an attacker with 256 space and 2112 operations.

KASUMI is a block cipher used in UMTS, GSM, and GPRS mobile communications systems. In UMTS, KASUMI is used in the confidentiality (f8) and integrity algorithms (f9) with names UEA1 and UIA1, respectively. In GSM, KASUMI is used in the A5/3 key stream generator and in GPRS in the GEA3 key stream generator.

<span class="mw-page-title-main">Boomerang attack</span> Form of cryptanalysis

In cryptography, the boomerang attack is a method for the cryptanalysis of block ciphers based on differential cryptanalysis. The attack was published in 1999 by David Wagner, who used it to break the COCONUT98 cipher.

In cryptography, higher-order differential cryptanalysis is a generalization of differential cryptanalysis, an attack used against block ciphers. While in standard differential cryptanalysis the difference between only two texts is used, higher-order differential cryptanalysis studies the propagation of a set of differences between a larger set of texts. Xuejia Lai, in 1994, laid the groundwork by showing that differentials are a special case of the more general case of higher order derivates. Lars Knudsen, in the same year, was able to show how the concept of higher order derivatives can be used to mount attacks on block ciphers. These attacks can be superior to standard differential cryptanalysis. Higher-order differential cryptanalysis has notably been used to break the KN-Cipher, a cipher which had previously been proved to be immune against standard differential cryptanalysis.

In cryptography, an interpolation attack is a type of cryptanalytic attack against block ciphers.

Disk encryption is a special case of data at rest protection when the storage medium is a sector-addressable device. This article presents cryptographic aspects of the problem. For an overview, see disk encryption. For discussion of different software packages and hardware devices devoted to this problem, see disk encryption software and disk encryption hardware.

<span class="mw-page-title-main">Threefish</span> Block cipher

Threefish is a symmetric-key tweakable block cipher designed as part of the Skein hash function, an entry in the NIST hash function competition. Threefish uses no S-boxes or other table lookups in order to avoid cache timing attacks; its nonlinearity comes from alternating additions with exclusive ORs. In that respect, it is similar to Salsa20, TEA, and the SHA-3 candidates CubeHash and BLAKE.

This article summarizes publicly known attacks against block ciphers and stream ciphers. Note that there are perhaps attacks that are not publicly known, and not all entries may be up to date.

Turingery or Turing's method was a manual codebreaking method devised in July 1942 by the mathematician and cryptanalyst Alan Turing at the British Government Code and Cypher School at Bletchley Park during World War II. It was for use in cryptanalysis of the Lorenz cipher produced by the SZ40 and SZ42 teleprinter rotor stream cipher machines, one of the Germans' Geheimschreiber machines. The British codenamed non-Morse traffic "Fish", and that from this machine "Tunny".

<span class="mw-page-title-main">Simon (cipher)</span> Family of lightweight block ciphers

Simon is a family of lightweight block ciphers publicly released by the National Security Agency (NSA) in June 2013. Simon has been optimized for performance in hardware implementations, while its sister algorithm, Speck, has been optimized for software implementations.

The 3-subset meet-in-the-middleattack is a variant of the generic meet-in-the-middle attack, which is used in cryptology for hash and block cipher cryptanalysis. The 3-subset variant opens up the possibility to apply MITM attacks on ciphers, where it is not trivial to divide the keybits into two independent key-spaces, as required by the MITM attack.

Prince is a block cipher targeting low latency, unrolled hardware implementations. It is based on the so-called FX construction. Its most notable feature is the alpha reflection: the decryption is the encryption with a related key which is very cheap to compute. Unlike most other "lightweight" ciphers, it has a small number of rounds and the layers constituting a round have low logic depth. As a result, fully unrolled implementation are able to reach much higher frequencies than AES or PRESENT. According to the authors, for the same time constraints and technologies, PRINCE uses 6–7 times less area than PRESENT-80 and 14–15 times less area than AES-128.

<span class="mw-page-title-main">LEA (cipher)</span> Republic of Korea national standard block cipher

The Lightweight Encryption Algorithm is a 128-bit block cipher developed by South Korea in 2013 to provide confidentiality in high-speed environments such as big data and cloud computing, as well as lightweight environments such as IoT devices and mobile devices. LEA has three different key lengths: 128, 192, and 256 bits. LEA encrypts data about 1.5 to 2 times faster than AES, the most widely used block cipher in various software environments.

References

  1. 1 2 3 4 5 6 Bogdanov, Andrey; Khovratovich, Dmitry; Rechberger, Christian. "Biclique Cryptanalysis of the Full AES" (PDF). Archived from the original (PDF) on 2012-06-14.
  2. Khovratovich, Dmitry; Leurent, Gaëtan; Rechberger, Christian (2012). "Narrow-Bicliques: Cryptanalysis of Full IDEA". Eurocrypt 2012. pp. 392–410. CiteSeerX   10.1.1.352.9346 .
  3. Bicliques for Preimages: Attacks on Skein-512 and the SHA-2 family
  4. Diffie, Whitfield; Hellman, Martin E. "Exhaustive Cryptanalysis of the NBS Data Encryption Standard" (PDF). Archived from the original (PDF) on 2016-03-03. Retrieved 2014-06-11.
  5. Khovratovich, Dmitry; Rechberger, Christian; Savelieva, Alexandra. "Bicliques for Preimages: Attacks on Skein-512 and the SHA-2 family" (PDF).