8

In this answer and discussion, it is considered a distributable hash

$$\tilde H(m)\ =\ H\Bigl(\bigl(H(m_1\mathbin\| 1)\oplus H(m_2\mathbin\|2)\oplus\dots\oplus H(m_n\mathbin\|n)\bigr)\mathbin\|n\Bigr)$$

where the $m_i$ are $n$ segments (say of fixed size) of message $m$, and $H$ is a cryptographic hash (say of $b$-bit and assumed secure in the ROM).

What can we say about the collision-resistance of $\tilde H$ as a function of $b$ ?

fgrieu
  • 149,326
  • 13
  • 324
  • 622

2 Answers2

13

What can we say about the collision-resistance of $\tilde H$ as a function of $b$ ?

That it is effectively nonexistent; it is easy to generate collisions (and second preimages).

You can generate a second preimage by selecting two blocks $m'_i, m''_i$ to correspond to each original block $m_i$; you compute $H(m'_i \mathbin\| i), H(m''_i \mathbin\| i)$, and then use linear algebra (e.g. Gaussian Elimination) to see which combination of $m'_i, m''_i$ all xor the same as the original sequence of $m_i$; that combination hashes to the same value. As long as the original message is at least $b$ blocks long (that is, $n \ge b$), such a combination exists with good probability.

Once you can create second preimages, you can generate collisions by picking a message and generating a second preimage for it.

Geoffroy Couteau
  • 21,719
  • 2
  • 55
  • 78
poncho
  • 154,064
  • 12
  • 239
  • 382
5

While the other answer is correct, I want to point out that the construction is theoretically collision-resistant when $n$ is a fixed constant (independent of the security parameter) and $H$ is modeled as a random oracle.

Specifically, to find a collision, the adversary would (with overwhelming probability) have to find a structure like $H(m_1 \| 1) \oplus \cdots \oplus H(m_n \| n) = H(m'_1 \| 1) \oplus \cdots \oplus H(m'_n \| n) $. For a random oracle with $b$ output bits, and an adversary who makes $q$ queries, the probability of any subset of the queries satisfying such a relation is at most $q^{2n}/2^b$.

$q^{2n}/2^b$ is technically a negligible function, which makes this construction technically collision resistant in the asymptotic sense. But it's really bad/impractical, since in practice your parameters should satisfy $b\ge 256n$.

Mikero
  • 14,908
  • 2
  • 35
  • 58