Rebound Distinguishers: Results on the Full Whirlpool Compression Function
Total Page:16
File Type:pdf, Size:1020Kb
Rebound Distinguishers: Results on the Full Whirlpool Compression Function Mario Lamberger1, Florian Mendel1, Christian Rechberger1, Vincent Rijmen1;2;3, and Martin Schl¨affer1 1 Institute for Applied Information Processing and Communications Graz University of Technology, Inffeldgasse 16a, A{8010 Graz, Austria. 2 Department of Electrical Engineering ESAT/COSIC, Katholieke Universiteit Leuven. Kasteelpark Arenberg 10, B{3001 Heverlee, Belgium. 3 Interdisciplinary Institute for BroadBand Technology (IBBT), Belgium. [email protected] Abstract. Whirlpool is a hash function based on a block cipher that can be seen as a scaled up variant of the AES. The main difference is the (compared to AES) extremely conservative key schedule. In this work, we present a distinguishing attack on the full compression function of Whirlpool. We obtain this result by improving the rebound attack on reduced Whirlpool with two new techniques. First, the inbound phase of the rebound attack is extended by up to two rounds using the available degrees of freedom of the key schedule. This results in a near-collision attack on 9.5 rounds of the compression function of Whirlpool with a complexity of 2176 and negligible memory requirements. Second, we show how to turn this near-collision attack into a distinguishing attack for the full 10 round compression function of Whirlpool. This is the first result on the full Whirlpool compression function. Keywords: hash functions, cryptanalysis, near-collision, distinguisher 1 Introduction In the last few years the cryptanalysis of hash functions has become an important topic within the cryptographic community. Especially the collision attacks on the MD4 family of hash functions (MD4, MD5, SHA-1) have weakened the security assumptions of these commonly used hash functions [6, 7, 17, 24{26]. Still, most of the existing cryptanalytic work has been published for this particular family of hash functions. Therefore, the analysis of alternative hash functions is of great interest. In this article, we will present a security analysis of the Whirlpool hash function with respect to collision resistance. Whirlpool is the only hash function standardized by ISO/IEC 10118-3:2004 (since 2000) that does not follow the MD4 design strategy. Furthermore, it has been evaluated and approved by NESSIE [20]. Whirlpool is commonly considered to be a conservative block-cipher based design with an extremely conservative key schedule and follows the wide-trail design strategy [4, 5]. Since its proposal in 2000, only a few results have been published. Table 1. Summary of results for Whirlpool. Complexities are given in compression function evaluations, a memory unit refers to a state (512 bits). The complexities in brackets refer to modified attacks using a precomputed table taking 2128 time/memory to set up. complexity target rounds type source runtime/memory block cipher W 6 2120=2120 distinguisher Knudsen [11] hash function 4.5 2120=27 collision hash function 6.5 2128=27 near-collision Mendel et al. compression function 5.5 2120=27 collision FSE 2009 [16] compression function 7.5 2128=27 near-collision hash function 5.5 2120+s=264−s collision Appendix A hash function 7.5 2128+s=264−s near-collision Appendix A compression function 7.5 2184=28 (2120=2128) collision Sect. 4 compression function 9.5 2176=28 (2112=2128) near-collision Sect. 4 compression function 10 2188=28 (2121=2128) distinguisher Sect. 5 Related Work. At FSE 2009, Mendel et al. proposed a new technique for the analysis of hash functions: the rebound attack [16]. It can be applied to both block cipher based and permutation based constructions. The idea of the rebound attack is to divide an attack into two phases, an inbound and an outbound phase. In the inbound phase, degrees of freedom are used, such that in the outbound phase several rounds can be bypassed in both forward- and backwards direction. This led to successful attacks on round-reduced Whirlpool for up to 7.5 (out of 10) rounds. The results are summarized in Table 1. For the block cipher W that is implicitly used in the Whirlpool compression function, Knudsen described an integral distinguisher for 6 out of 10 rounds [11]. Furthermore, it is assumed that this property may extend also to 7 rounds. Note that in [12] similar techniques were used to obtain known-key distinguishers for 7-rounds of the AES. Our Contribution. The main contribution of this paper is a distinguishing attack on the full compression function of Whirlpool which is achieved by im- proving upon the work of Mendel et al. in [16] in several ways. We start with a description of the hash function Whirlpool. Then, in Sect. 3, we give an overview of the rebound attack and show how it is applied to reduced versions of Whirlpool. In Sect. 4, we describe our improvement of the rebound attack on Whirlpool in detail. This technique enables us to add two rounds in the inbound phase of the attack and thus gives a collision and near-collision attack on the Whirlpool compression function reduced to 7.5 and 9.5 rounds, respectively. Based on this, we describe in Sect. 5 a new generic attack and show how to distinguish the full (all 10 rounds) compression function of Whirlpool from a random function by turning the near-collision attack for 9.5 rounds into a distinguishing attack for 10 rounds. To the best of our knowledge this is the 2 first result on the full Whirlpool compression function. Table 1 summarizes the previous results on Whirlpool as well as the contributions of this paper. 2 Description of Whirlpool Whirlpool is a cryptographic hash function designed by Barreto and Rijmen in 2000 [1]. It is an iterative hash function based on the Merkle-Damg˚arddesign principle (cf. [18]). It processes 512-bit message blocks and produces a 512-bit hash value. If the message length is not a multiple of 512, an unambiguous padding method is applied. For the description of the padding method we refer to [1]. Let M = M1 M2 Mt be a t-block message (after padding). The hash value h = H(M) isk computedk · · · k as follows: H0 = IV (1) Hj = W (Hj−1;Mj) Hj−1 Mj for 0 < j t (2) ⊕ ⊕ ≤ h = Ht (3) where IV is a predefined initial value and W is a 512 bit block cipher used in the Miyaguchi-Preneel mode [18]. The block cipher W used by Whirlpool is very similar to the Advanced Encryption Standard (AES) [19]. The state update transformation and the key schedule update an 8 8 state S and K of 64 bytes in 10 rounds. In one round, the state is updated× by the round transformation ri as follows: ri AK MR SC SB: ≡ ◦ ◦ ◦ The round transformations are briefly described here: { the non-linear layer SubBytes (SB) applies an S-Box to each byte of the state independently. { the cyclical permutation ShiftColumns (SC) rotates the bytes of column j downwards by j positions. { the linear diffusion layer MixRows (MR) is a right-multiplication by the 8 8 circulant MDS matrix cir(1; 1; 4; 1; 8; 5; 2; 9). × { the key addition AddRoundKey (AK) adds the round key Ki to the 8 8 state, × and AddConstant (AC) adds the round constant Ci to the 8 8 state of the key schedule. × After the last round of the state update transformation, the initial value or previous chaining value Hj−1, the message block Mj, and the output value of the last round are combined (xored), resulting in the output of one iteration. A detailed description of the hash function is given in [1]. We denote the resulting state of round transformation ri by Si and the SB SC intermediate states after SubBytes by Si , after ShiftColumns by Si and af- MR ter MixRows by Si . The initial state prior to the first round is denoted by S0 = Mj K0. The same notation is used for the key schedule with round keys ⊕ Ki with K0 = Hj−1. 3 3 The Rebound Attack The rebound attack is a new tool for the cryptanalysis of hash functions and was published by Mendel et al. in [16]. It is a differential attack. The main idea is to use the available degrees of freedom in a collision attack to efficiently fulfill the low probability parts in the middle of a differential trail. The rebound attack consists of an inbound phase with a meet-in-the-middle part in order to exploit the available degrees of freedom, and a subsequent probabilistic outbound phase. AES based hash functions are a natural target for this attack, since their construction principle allows a simple application of the idea. 3.1 Basic Attack Strategy In the rebound attack, the compression function, internal block cipher or permu- tation of a hash function is split into three sub-parts. Let W be a block cipher, then W = W W W . fw ◦ in ◦ bw Wbw Win Wfw inbound outbound outbound Fig. 1. A schematic view of the rebound attack. The attack consists of an inbound and two outbound phases. The rebound attack can be described by two phases (see Fig. 1): { Inbound phase: Is a meet-in-the-middle phase in Win, which is aided by the degrees of freedom that are available to a hash function cryptanalyst. This very efficient combination of meet-in-the-middle techniques with the exploitation of available degrees of freedom is called the match-in-the- middle approach. { Outbound phase: In the second phase, the matches of the inbound phase are computed in both forward- and backward direction through Wfw and Wbw to obtain desired collisions or near-collisions.