Abstract
Security of a recently proposed bitwise block cipher GIFT is evaluated in this paper. In order to mount full round attacks on the cipher, biclique cryptanalysis method is applied. Both variants of the block cipher are attacked using Independent biclique approach. For recovering the secret keys of GIFT-64, the proposed attack requires 2127.45 full GIFT-64 encryption and 28 chosen plain texts. For recovering the secret keys of GIFT-128, the proposed attack requires 2127.82 full GIFT-128 encryption and 218 chosen plain texts. The attack complexity is compared with that of other attacks proposed previously. The security level of GIFT is also compared with that of the parent block cipher PRESENT, based on the analysis.
Introduction
The security required for information transactions has become extremely significant nowadays. Because of this reason light weight block cipher design has become a hot research topic which can offer excellent security to IoT exponents like wireless sensor networks, RFID etc. Some of the most popular block ciphers which claim excellent security in hardware/software, against different kinds of attacks are listed in [3, 29]. In many cases the cipher may not possess as much security as claimed by the designers. Different methods and tools are available to gauge the security of block ciphers.
Linear [23] and differential cryptanalysis [9] are two conventional techniques used to evaluate the strength of ciphers. Both the methods exploit the weakness of substitution layer as well as permutation layer to retrieve the secret key of the cipher [13, 16, 24]. However, it can be observed that most of the linear/ differential attacks can be applied only for reduced round analysis. Both methods do not evaluate the performance of key layer except in related key attacks [8]. With the help of related keys, the numbers of rounds which can be attacked is slightly increased, but still full round attacks are almost impossible on most of the ciphers.
Meet-in-the-middle attack [1, 5] is another method which offers excellent data complexity requirement. Still this method is considered as less efficient compared to linear, differential or integral attacks, since a large part of the cipher is to be kept independent of the selected key bits, which is difficult in most of the cases. But the application of bicliques along with meet-in-the-middle attacks, leads to excellent results. However, in this paper, concept of biclique is used along with ‘matching with precomputation’ instead of meet-in-the-middle attack, considering the convenience.
Biclique cryptanalysis is considered to be a new analysis method proposed by Khovratovich et al. [7]. This method is originated from splice and cut frame work [14, 18] and developed for hash function cryptanalysis in the beginning. Later in 2011 Biclique method is applied by Bogdanov et al. [2] to propose a full round attack on AES. After that biclique method became well known for block cipher cryptanalysis and applied by cryptologists on various light weight block ciphers [6, 26]. Biclique method exploits the weakness of permutation and key layers. Substitution layer properties are not analysed by this method.
The procedure of Biclique cryptanalysis in proposing attacks against any block cipher is almost similar. But the implementation of the attack depends on the structure of block cipher. Biclique attack mainly exploits the weakness of key layer and permutation layer. Even if GIFT is evolved from PRESENT an attack proposed on PRESENT is not applicable to GIFT since both key layer and permutation layer of PRESENT and GIFT are different. Formation of an effective biclique is very important since the complexity of attack is directly influenced by it. The data complexity of the attack is affected by the bits position at which the differential injected, performance of key and permutation layers and number of biclique rounds. The time complexity of the attack is mainly determined by the recomputation, which in turns determined by the performance of key and permutation layer and selection of differential bits. So an attacker proposes a biclique attack on a cipher only after examining the properties keenly. An attack proposed on a cipher is just irrelevant to another cipher.
Here biclique cryptanalysis is applied to the light weight block cipher GIFT [25]. Summary of the attacks carried out on GIFT is given in Table 1. Since GIFT is evolved from the block cipher PRESENT [3], details of latest biclique attacks proposed on PRESENT are also given in Table 1. A comparison of security levels of the two ciphers can be obtained from here. The unbalanced biclique attack proposed in [12] also attack full round GIFT but the data complexity is very high especially in the case of GIFT-128. Biclique attacks are done in two steps. First step is constructing the biclique. The second step can be either proposing a ‘Meet-in-the-Middle attack’ (MITM) or ‘Matching with precomputation’. The unbalanced Biclique attack proposed in [12] uses MITM as the second part where Matching with Precomputation is applied in this paper. Product of time complexity and data complexity is also shown in Table 1 just for comparison of performance. The product has lowest values for the attack proposed in this paper. The data complexity required for mounting a successful attack on GIFT-64 is 28, which is the lowest among the data complexity required for the attacks listed here. The reason for the very low data complexity requirement for biclique attack proposed on GIFT-64 is the interleaved key bit additions. Out of 64 data bits in GIFT-64, key bits are added only to 32 data bits, which eliminates 32 Ex-OR gates and corresponding power dissipation in each round, but reduces the security level. Table 2 compares the security strength of GIFT with other block ciphers of key length 128 bits, based on biclique attacks proposed by various cryptologists.
Attack complexity comparison of various attacks on GIFT
Attack complexity comparison of various attacks on GIFT
Security strength comparison of GIFT with other block ciphers of key length 128 bits, based on biclique attacks
This paper is organized as follows. Section 2 describes the structure and functioning of GIFT. Section 3 explains about the theory and steps of biclique cryptanalysis. The full round attack proposed on GIFT-64 is given in section 4 and the full round attack proposed on GIFT-128 is given in section 5. Section 6 concludes the article.
The block cipher GIFT proposed by S.Banik et al. [25] has two versions based on the number of data bits, denoted by GIFT-64 and GIFT-128, having 64 and 128 data bits respectively. Both versions have a key size of 128 bits. GIFT-64 performs one complete encryption through 28 rounds while GIFT-128 performs the same through 40 rounds. Each round consists of 3 operations called SubCells, PermBits, and AddRoundKey, which perform substitution, permutation and key addition respectively.
SubCells
The same invertible sbox GS is used for both versions of GIFT. Every nibble of the cipher state is substituted by the application of GS
The inputs and corresponding outputs of the sbox in hexadecimal notation is given in Table 3.
Specification of GIFT sbox
Specification of GIFT sbox
After this operation, the intermediate cipher text bits are permuted, the details of which are given in [25].
AddRoundKey
For each round, round key and round constants are generated and added.
An n/2-bit round key RK is extracted from the key state, it is further partitioned into 2 s-bit words RK = U||V=us–1..u0||vs–1..v0, where s = 16,32 for GIFT-64 and GIFT-128 respectively.
For GIFT-64, U and V are Ex-ORed to {b4i +1} and {b4i} of the cipher state respectively.
B4i +1 ← b4i +1 ⊕ ui, b4i ← b4i ⊕ v i , ∀ i ∈ {0,..,15}.
For GIFT-128, U and V are XORed to {b4i +2} and {b4i +1} of the cipher state respectively.
b4i +2 ← b4i +2 ⊕ ui, b4i +1 ← b4i +1 ⊕ vi, ∀ i ∈ {0,..,31}. For both versions of GIFT, a 6-bit round constant C = c5c4c3c2c1c0 are XORed into the cipher state at bit position 23, 19, 15, 11, 7 and 3 respectively
For both versions of GIFT, the key schedule and round constants are the same, but differ in key extraction. In each round, a round key is extracted from the key state before the key state update.
For GIFT-64, two 16-bit words of the key state are extracted as the round key RK = U||V.
For GIFT-128, four 16-bit words of the key state are extracted as the round key RK = U||V.
The key state is then updated as follows, k7||k6||..||k1||k0 ← k1 ⪢ 2||k0 ⪢ 12||..||k3||k2, where ⪢ i represents an i bits right rotation within a 16-bit word.
Using affine LFSR, round constants are generated and added.
Biclique cryptanalysis
Theory and step by step procedure of Biclique cryptanalysis is explained in this section. Complexity calculation is also detailed.
Steps in biclique cryptanalysis
Four steps are involved in biclique cryptanalysis which are explained in the following sections.
Key Space Partitioning: First the attacker has to select the biclique dimension d. If k is the key length, the entire key space is now divided into 2k - 2d spaces of 22d keys.
Biclique Construction: A biclique is constructed by two groups of elements where all elements of one group is connected with all elements of other group. Let
Let K[0,0] be the base key, Δi be the forward differential and ∇j be the reverse differential, then a group of keys are defined as
The attacker has to select forward and backward differentials carefully to mount an attack of lowest complexity. The schematic diagram of a Biclique is shown in Fig. 1.

Schematic view of Biclique.
Bicliques are usually constructed at beginning or end of the cipher using a few numbers of rounds. Meet-in-the-middle attack or matching with pre-computation can be used, for attacking the remaining rounds. Based on the selection of differential type, two methods are used for biclique construction. Attacker can select either independent differential or interleaved differential. The bicliques applied in this paper are constructed using independent differentials.
Data Collection: The complete cipher E is now divided into 3 sub-ciphers E1, E2 and B in such a way that
Key Testing: Here the attacker check weather
Another key set is to be chosen and tested, if the attacker can’t find the right key element in the chosen key set.
Here an independent biclique is constructed over the subcipher
Which means cipher text C0 is obtained by encrypting S0 with base key K[0,0].
Now using the selected forward differentials Δ
i
the base intermediate state S0 is connected with all possible cipher texts C
i
. Mathematically
If no active non-linear operations are shared by the trails of forward differentials Δ
i
and backward differentials Δ
j
, then all the 2d inputs differences Δ
j
can be connected with the entire 2d output differences Δ
i
.
From the above equations one can understand that the number of calculations is minimized. Mathematically, 22d keys can be tested using 2×2d calculations, using independent bicliques of dimension d.
Here the length of the differentials depends on the number of rounds with which a full diffusion occurs. Biclique differential length is changed with the speed with which diffusion happens. In order to cover the remaining number of rounds, which is usually larger in number, matching with pre-computation is preferred to meet-in-the-middle attacks when the constructed biclique is short.
Matching with precomputation
Matching with pre-computation is used for the remaining rounds of the cipher other than biclique rounds. As shown in the Section 3.1, the cipher E is represented by Equation (1)
Suppose subcipher E1 encrypts P and subcipher E2 decrypts S. Both operations lead to the intermediate state V. The Equations (2), (3), (4), (5) and (6) give a mathematical representation of matching, which is done in different steps
2d values are calculated from the operations represented by Equations (2) and (3). The results with intermediate values are stored in the memory. For the remaining 22d-2d computations these stored values are used.
Only the part of key schedule and round transformation that differ from the stored values need to be recomputed. This approach effectively leads to reduced computational complexity.
From the above discussions it is evident that 2k - 2d bicliques need to be constructed in order to cover the complete key space. The total complexity of a biclique attack is given by Cfull = 2k–2d (Cbiclique+Cdecrypt+Cprecompute+Crecompute+Cfalsepos), where
–Cbiclique is the costs for the construction of a biclique,
–Cdecrypt is the complexity of the oracle for the decryption of 2d ciphertexts,
–Cprecompute is the costs for the computation of intermediate stage V for 2d computations using sub cipher E1 and E2
–Crecompute is the complexity of recomputing 22d values of the matching bits vi,j in both directions,
–Cfalsepos is the complexity for eliminating the false positives.
It can be observed that Crecompute dominates the time complexity among the 5 factors.
Biclique cryptanalysis of full round GIFT-64
An attacker has to find new bicliques by injecting proper differentials which leads to minimal time and data complexity in every new attack. In literature it can be seen that the same cryptanalysis procedure is applied by cryptologists repeatedly to find improvised results by proposing better attacks. The attack proposed in this paper brings better results in cryptanalysis of GIFT block cipher. In this section biclique cryptanalysis of GIFT-64 is presented.
Biclique construction and sub-cipher partitioning
A 4 dimensional Biclique is constructed using the last 5 rounds i.e., round 24 to round 28. In each round 32 key bits are Ex-ORed with the intermediate data.
Here two groups of key bits {k64, k65, k84, k85} and {k104, k105, k124, k125} are chosen for constructing Δ i differential and Δ j differential respectively, which injects a non-zero difference to the cipher, whereas all other key bits do not manipulate the cipher state. It is observed that an effective biclique, which can attack the full round GIFT-64, can be constructed using the above mentioned forward and backward differentials.
The whole cipher is divided into 3 sub-ciphers, as per Equation (1). The details of sub-ciphers and the bits matched are given in Table 4.
GIFT -64 sub-cipher details and bits matched
GIFT -64 sub-cipher details and bits matched
The biclique constructed over the sub-cipher

Four Dimensional Biclique diagram of GIFT –64.
The data bit positions at which Δ i and differentials inject non zero differences on biclique rounds are given in Table 5. The ‘-‘ symbol indicates that the differential key bits do not appear in that particular round. The bit positions are given in the ascending order.
GIFT - 64 data bit positions at which non zero differential key bits appear
The plain text P is derived through a decryption oracle. The recomputation in forward and backward directions is performed according to blue/red lines as shown in Fig. 3. Number of active sboxes can be calculated from the same figure.

Recomputation in forward and backward directions for GIFT-64.
Pre-Computation: According to Equation (2) calculate value of four bits v0, v1, v17 and v18 of round 12 for each values of i, where i={0 ... 2d-1}, from P i and K[i,0] in forward direction. According to Equation (3) calculate value of four bits v0, v1, v17 and v18 of round 13 for each values of j, where j={0 ... 2d-1}, from S j and K[0,j] in backward direction.
–Forward computation: According to Equation (4) compute matching bits of vi,j from Pi and K[i,j] in forward direction. Since forward differential key bits do not appear up to round 3, active sboxes appear from round 4 only, so that a maximum of 48 active sboxes are eliminated while calculating the forward recomputation complexity. Cdecrypt is the complexity of the oracle for the decryption of 2d cipher texts.
–Backward computation: According to Equation (5) compute matching bits of vi,j from S i and K[i,j] in backward direction.
Now we match four bits v0, v1, v17 and v18 using Equation (6). The adversary confirms the key bits just by validating the equation using the bits matched.
Time complexity calculation
Cfull = 2n–2d (Cbiclique+Cdecrypt+Cprecompute+ Crecompute+Cfalsepos),
Number of active sboxes in forward recomputation = 4 + 8+4×16 + 8+2 = 86
Number of active sboxes in backward recomputation = 4 + 4+7×16 + 8+2 = 130
Total number of active sbox = 216
Total number of sbox = 28×16 = 448
The time complexity calculation of GIFT-64 is given in Table 6.
Complexity calculations for GIFT-64
Complexity calculations for GIFT-64
Biclique construction and sub-cipher partitioning
The biclique attack carried out on GIFT-128 is similar to the biclique attack proposed on GIFT-64. So here the attack is discussed briefly. Here also the whole cipher is divided into 3 sub ciphers, E1, E2 and B according to Equation (1).
The details of sub ciphers and the bits matched are given in Table 7. For matching, the bits are selected carefully in order to minimise the number of active sboxes. The biclique is constructed over the rounds 37, 38, 39 and 40. Δ i differential and differential are constructed using the set of key bits {k32, k33, k96, k97} and {k2, k3, k66, k67} respectively. The bit positions at which the above selected group of key bits inject differences in biclique rounds are given in Table 8. The bit positions are given in the ascending order.
GIFT - 128 sub-cipher details and bits matched
GIFT - 128 sub-cipher details and bits matched
GIFT - 128 data bit positions at which non zero differential key bits appear
The biclique constructed over 4 rounds is shown in Fig. 4 and the recomputation along forward and backward directions are shown in Fig. 5. Since the forward differential affects only 18 bits, the data complexity does not exceed 218.

Four dimensional Biclique diagram of GIFT –128.

Recomputation in forward and backward directions for GIFT-128.
The attack procedure is the same as that given in section 4.2. The bits matched during the recomputation are v0, v1, v2 and v3 of rounds 18 and 19. Forward and backward re-computations of GIFT-128 are performed according to blue and red lines as shown in Fig. 5.
Time complexity calculation
Cfull = 2n–2d (Cbiclique+Cdecrypt+Cprecompute+ Crecompute+Cfalsepos),
Number of active sboxes in forward recomputation = 2 + 4+18 + 12×32 + 16 + 4 = 428
Number of active sboxes in backward recomputation = 4 + 16 + 13×32 + 16 + 4+1 = 457
Total number of active sbox = 885
Total number of sbox = 40×32 = 1280
The time complexity calculation of GIFT-128 is given in Table 9.
Complexity calculations for GIFT-128
Complexity calculations for GIFT-128
The security strength of both variants of full round GIFT is evaluated using biclique cryptanalysis. The overall complexity of the attacks proposed in this paper is minimal according to our knowledge and belief. The attack complexities are also compared with that of other light weight block ciphers. It can be observed that the data complexities required for the attacks on both variants of GIFT are very small because key addition is performed only with half the number of intermediate data bits. This technique will reduce the area and power consumption of the cipher but considerably lower the security strength.
