What Is the Difference between a Preimage Attack and a Collision Attack?
A preimage attack seeks to find the original input that generated a specific, known output hash. The attacker knows the output and wants the input.
A collision attack, conversely, seeks to find two different inputs that produce the same hash output. The specific output value is not pre-determined.
Both attacks target weaknesses in hash function security, but their goals and implications differ significantly for various cryptographic applications.