The ECOH hash functions are based on concrete mathematical functions. They were designed such that the problem of finding collisions should be reducible to a known and hard mathematical problem (the subset sum problem). It means that if one could find collisions, one would be able to solve the underlying mathematical problem which is assumed to be hard and unsolvable in polynomial time. Functions with these properties are known provably secure and are quite unique among the rest of hash functions. Nevertheless, second pre-image (and thus a collision) was later found because the assumptions given in the proof were too strong.
Semaev Summation Polynomial
One way of finding collisions or second pre-images is solving Semaev Summation Polynomials. For a given elliptic curve E, there exists polynomials
that are symmetric in
variables and that vanish exactly when evaluated at abscissae of points whose sum is 0 in
. So far, an efficient algorithm to solve this problem does not exist and it is assumed to be hard (but not proven to be NP-hard).
More formally: Let
be a finite field,
be an elliptic curve with Weierstrass equation having coefficients in
and
be the point of infinity. It is known that there exists a multivariable polynomial
if and only if there exist <
such that
. This polynomial has degree
in each variable. The problem is to find this polynomial.
Second pre-image attack
Description of the attack: This is a Wagner’s Generalized Birthday Attack. It requires 2143 time for ECOH-224 and ECOH-256, 2206 time for ECOH-384, and 2287 time for ECOH-512. The attack sets the checksum block to a fixed value and uses a collision search on the elliptic curve points.
For this attack we have a message M and try to find a M' that hashes to the same message. We first split the message length into six blocks. So
. Let K be a natural number. We choose K different numbers for
and define
by
. We compute the K corresponding elliptic curve points
and store them in a list. We then choose K different random values for
, define
, we compute
, and store them in a second list. Note that the target Q is known.
only depends on the length of the message which we have fixed.
depends on the length and the XOR of all message blocks, but we choose the message blocks such that this is always zero. Thus,
is fixed for all our tries.
If K is larger than the square root of the number of points on the elliptic curve then
we expect one collision between the two lists. This gives us a message
with:
This means that this message leads to the target value Q and thus to a second preimage, which was the question. The workload we have to do here is two times K partial hash computations. For more info, see "A Second Pre-image Attack Against Elliptic Curve Only Hash (ECOH)".
Actual parameters:
- ECOH-224 and ECOH-256 use the elliptic curve B-283 with approximately
points on the curve. We choose
and get an attack with complexity
.
- ECOH-384 uses the elliptic curve B-409 with approximately
points on the curve. Choosing
gives an attack with complexity 
- ECOH-512 uses the elliptic curve B-571 with approximately
points on the curve. Choosing
gives an attack with complexity 