In previous posts I discussed how Joux’s multicollision attack significantly decreases the efficiency of concatenating hash functions and how it can be used to break the birthday limit of md5. Now the obvious remaining question is: if concatenation is not effective, are there better ways to combine two hash functions ? As often in cryptography, it is very easy to come up with a solution which is neat, simple, and wrong: for instance, would you have said that is insecure ? Luckily the smart people at the Emmy Noether Research Group give us two examples of good combiners.

**Hash-tree based concatenation**

In a paper from 2007, Fischlin and Lehmann introduce a security-amplifying combiner based on the concatenation combiner. Their idea is quite simple : to build a multicollision on an n-bits iterative hash function, Joux’s attack requires n consecutive calls to the compression function. In other words, the colliding messages must have a size equal to or larger than bits, where B is the message block size of the hash function.

Conversely, limiting the size of the input messages would also decrease the number of multicollisions found by Joux’s attack, and therefore the probability of finding a pair of messages which collide in both hash functions. For instance, for messages of size blocks, Joux’s attack can only build a multicollision, and the probability of finding a pair of colliding messages drops to .

Input messages obviously have an arbitrary size, so to ensure that the concatenation combiner only process a small number of message blocks, a hash-tree structure can be used. For instance, if we decide to break the message in groups of 4 blocks the hash-tree would look like this:

The size of the groups is a tradeoff between security and speed, but you should be safe as long as you keep the groups smaller than blocks.

**The combiner**

In 2009 the same Fischlin and Lehmann introduced a new family of secure combiners. The basic combiner of this family is called , and it has the following construction:

where:

– and are the two hash functions to combine

– is the XOR operator

–

–, in other words the binary representation of

is preprended to the message before hashing with (k=0 or 1)

–

With a combination of XOR operations, concatenations and permutations, the combiner outputs bits hash values (same length as the classical concatenation combiner) and is robust against collisions. In their article the authors describe several modifications of which provide additional properties, such as pre-image robustness and indifferentiability from random oracles.

**Last words**

In march Fischlin and Lehmann will present at the CT-RSA 2010 conference a paper titled *“Hash Function Combiners in TLS and SSL”*, it should be fun 🙂

## Leave a Reply