Home
Writeups Misc About
No Difference

No Difference

There are two possible solutions to this problem. One involves the method of differential cryptanalysis (normally done on the substitution box SBOX like these), and another brute-force, or more specifically birthday attack solution.

I attempt this using the birthday attack solution. The idea is that the space of state is too small. Indeed, the shuffling of the first stage of the hash:

Only state[4:] are modified from the block's content. Hence, the state space is only 4 bytes (32 bits). To add on, the SBOX is not a true permutation (can verify this by sorting the values in SBOX), and a lot of the values are repeated. Hence, collision is extremely easy with this Substitution-Permutation Network (SPN). The other components of the SPN can be ignored as it is only some transformation of the state in the first stage, hence if we can find two different messages that yield the same state after the first stage, then deterministically we will obtain the same output.

Hence, we can create a one-block birthday attack in 216 steps, which should not take too long.

Python Implementation:

The differential analysis approach is well written on Cryptohack, so I would not cover in here. (also as at the time of writing I am clueless on how it works lmao)