Security and Communication Networks

Volume 2017, Article ID 5980251, 9 pages

https://doi.org/10.1155/2017/5980251

## Improvements for Finding Impossible Differentials of Block Cipher Structures

^{1}School of Electronics and Information, Shanghai Dian Ji University, Shanghai, China^{2}Department of Computer Science and Engineering, Shanghai Jiao Tong University, Shanghai, China^{3}Westone Cryptologic Research Center, Beijing 100070, China

Correspondence should be addressed to Yiyuan Luo; nc.ude.ujds@yyoul

Received 30 March 2017; Accepted 17 July 2017; Published 29 August 2017

Academic Editor: Jesús Díaz-Verdejo

Copyright © 2017 Yiyuan Luo and Xuejia Lai. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

We improve Wu and Wang’s method for finding impossible differentials of block cipher structures. This improvement is more general than Wu and Wang’s method where it can find more impossible differentials with less time. We apply it on Gen-CAST256, Misty, Gen-Skipjack, Four-Cell, Gen-MARS, SMS4, MIBS, , LBlock, E2, and SNAKE block ciphers. All impossible differentials discovered by the algorithm are the same as Wu’s method. Besides, for the 8-round MIBS block cipher, we find 4 new impossible differentials, which are not listed in Wu and Wang’s results. The experiment results show that the improved algorithm can not only find more impossible differentials, but also largely reduce the search time.

#### 1. Introduction

Impossible differential cryptanalysis, introduced by Biham et al. [1] and Knudsen [2] independently, is a special case of differential cryptanalysis that uses differentials with probability zero to sieve the right keys from the wrong keys. It is one of the most powerful attacks for block ciphers and is considered in many block cipher designs [3–10]. The best cryptanalytic results for some block ciphers are obtained by impossible differential cryptanalysis [1, 11]. For example, the currently best attack on the 31-round Skipjack is still the impossible differential cryptanalysis by Biham et al. [1].

The key step in impossible differential cryptanalysis of a block cipher is to find the longest impossible differential. Given two variables , the difference of and is usually denoted as . An impossible differential for an -subblock block cipher is in the form , where and . means the probability of the output difference is after rounds of a block cipher for an input difference is zero. At the first glance, impossible differentials are obtained manually by observing the block cipher structure. However, since the emergence of impossible differential cryptanalysis, automated techniques for finding impossible differentials have been introduced.

The first automated technique is called the Shrinking method introduced by Biham et al. [1]. This method is simple but very useful. It only considers truncated differentials whose differences distinguish only between zero and arbitrary nonzero difference. Given a block cipher, the adversary first designs a mini version of this block cipher, which scales down the block cipher but preserves the global structure. Then the adversary exhaustively searches for this mini cipher and obtains some truncated impossible differentials. Usually these truncated impossible differentials of the mini cipher remain impossible differentials in the normal version. This method can deal with most block ciphers in the real world. However, it becomes very slow if the number of subblocks of a block cipher is as large as , since exhaustive search on the mini version of this type of cipher is still a heavy load for most computers.

The second automated technique is based on the miss in the middle approach. This method combines two differentials, one from the input and the other from the output, both with probability 1. However, these two differentials cannot meet in the middle since they can never be equal in the middle. The method [12, 13] and the UID method [14] both belong to this category. In the method and the UID method, the adversary first represents the block cipher structure as a matrix; then given a differential pair , he calculates the -round intermediate difference from forwardly and the -round intermediate difference from backwardly by the matrix method. If there is a contradiction for these two intermediate differences, then an impossible differential is verified. Representing a block cipher by the matrix has been a popular method in impossible differential and integral and zero correlation linear cryptanalysis [8, 10, 15–20].

In [21], Wu and Wang extend the -method and UID method to a more generalized method which does not use the miss in the middle approach. They treat the -round block cipher structure as a system of equations, which describe the propagation behavior of differences in the inner primitives, especially sbox permutations or branch swapping of the block cipher structure. To judge if a truncated differential is impossible, they predict information about unknown variables from the known ones iteratively. Finally a truncated differential is verified by checking the constrained conditions in the system. This method is similar to a linear programming method for solving optimization problems.

In [22], Sun et al. show that Wu and Wang’s automatic search method can find all impossible differentials of a cipher that are independent of the choices of the inner primitives. However, Wu and Wang’s method can only find all truncated impossible differentials since the choice of truncated difference may result in missing some impossible differentials. Wu and Wang’s method only considers differences and , where and are zero or nonzero values. They assign an indicator to indicate the choice of and , representing by a subblock without difference and by 1 a subblock with a difference. The relationships between nonzero differences have been omitted. For example, may be equal to some , where . If some linear constraints between nonzero variables in and are needed, Wu and Wang claimed their method could still work by translating all linear constraints into the system of equations. However, this method increases the run complexity and implementation of the search method. Since it changes the equation system for every value of and if the relationship between and is complicated, the matrix will be very large.

The idea of the UID method is that it represents the differential with symbols and utilizes the propagation property of the linear accumulated symbols. The idea of the Wu-Wang method is to utilize solving linear equations to determine an impossible differential. We show that the Wu-Wang method can be improved by combining the idea of the UID method and Wu-Wang method. Instead of using 1 to represent the nonzero difference, we use a letter symbol to represent a difference and different symbols represent different nonzero values. This method can represent more relationships between these subblocks. For example, if and for a 4-subblock structure where and are different nonzero values, then we have and . In our method, the matrix of the system does not need to be changed with . We also improve the Wu-Wang method by simplifying the test of whether there are solutions for linear systems. Since the most time consuming part is the matrix operation, our improved method can find more impossible differentials in less time.

We implement the method in java language and apply it to many block cipher structures, including Gen-CAST256 [15], Gen-Skipjack [23], Four-Cell [24], Gen-MARS [12], Gen-RC6 [23], SMS4 [14], Misty [25], MIBS [26], [27], LBlock [28], E2 [29], and SNAKE [30] ones. For these block ciphers, we rediscover all known impossible differentials. Especially for the 8-round MIBS cipher, we find 4 new impossible differentials, which are not listed in Wu and Wang’s work. Our improvement largely reduced the run time for finding impossible differentials. In [31], the results for MIBS, LBlock, and E2 are obtained in a few hours on a 2.66 GHz processor with MAGMA package. However, our results for MIBS, LBlock, and E2 are obtained within 10 seconds on a 2.20 GHz processor.

#### 2. Preliminaries

In this section we introduce some basic concepts and notions used in this paper. We first introduce the block cipher structures. Next we review the solvability of a system of linear equations.

##### 2.1. Block Cipher Structures

There are mainly two block cipher structures, which are the Feistel structure and its generalizations and the substitute permutation network (SPN). The round function of most of those structures consists of three basic operations: the sbox look-up, the exclusive-or addition (Xor), and the branch swapping, where the only nonlinear component is the sbox look-up operation. In differential cryptanalysis, the Xor differences of plaintext/ciphertext pairs are considered; we omit the key and constant addition since they have no relevance to our analysis. We assume that a block cipher structure has subblocks (branches), and the input and output differences are denoted by and , respectively.

##### 2.2. The Solvability of a Linear System

Now we review the basics in linear algebra of determining the solvability of a system of linear equations. Let , be two positive integers, ; let be a system of linear equations with variables, where is matrix over ; and and are two bit vectors; then the augmented matrix can determine the solvability of the linear system.

A regular method is to deduce the reduced row echelon form (a.k.a. row canonical form) of matrix by Gauss-Jordan elimination algorithm. The reduced row echelon form of a matrix is unique and denoted by . One starts to check from the last row to the first, to see if there exists a row in which the first entries are zeros and the last entry is nonzero. If there are such rows, then the linear system has no solution. For example, if the augmented matrix of a linear system in reduced row echelon form is where is nonzero, then the linear system has no solution.

#### 3. Mathematical Models for Finding IDs of Block Cipher Structures

Our improvement is based on Wu and Wang’s method. If the nonlinear sbox in a block cipher structure is a permutation, then there is a constraint on the input difference and output difference for ; that is, and can only both be zero or both be nonzero, denoted by . The intermediate value of a block cipher structure is called the state. The state is updated with the round structure. In order to find impossible differential for an -round block cipher structure, we first set differential variables for the states and then transform the -round block cipher structure into a system of linear equations and constraints, denoted by . Then for a given differential , where and , we can check if it is impossible by solving with initial values ; if has no solution, then .

Here we take the 5-round Feistel structure as an example. We first assign differential variables for 5-round Feistel structure. In Figure 1, , are permutations; the output difference of for input difference is ; thus . According to the computation graph of 5-round Feistel structure, we obtain the following system of equations and constraints: In order to check if is an impossible differential where is a nonzero value, we solve the above system with , , , and . Since and we have and . From linear equations of , we get ; thus since ; next from linear equations we obtain ; however and ; thus the system has no solution and is an impossible differential for 5-round Feistel structure.