What Is the Difference between a Preimage Attack and a Collision Attack in Hashing?
A preimage attack involves finding the original input (x) that maps to a specific, known hash output (H(x)). It is a reversal of the function.
A collision attack involves finding two different inputs (x and y) that produce the same hash output (H(x) = H(y)). Both attacks compromise the integrity of a hash function but target different security properties.
Collision resistance is often considered a stronger security requirement.