A security analyst needs to verify that a downloaded file has not been tampered with. The publisher provides a SHA-256 hash. Which property of the hash function is being relied upon?
Trap 1: Avalanche effect
The avalanche effect refers to a small change in input causing a drastic change in output. While important for hash functions, it is not the property directly relied upon for integrity verification using a provided hash.
Trap 2: Collision resistance
Collision resistance ensures that it is hard to find any two different inputs that hash to the same value. However, in this scenario, the attacker is given the original hash and must find a different file with that hash, which is second pre-image resistance. Collision resistance is a stronger property but not specifically required.
Trap 3: Pre-image resistance
Pre-image resistance ensures that given a hash, it is hard to find any input that produces it. However, in this scenario, the analyst already has the original file's hash and is comparing computed hash to that. Pre-image resistance is about reversing the hash, not about finding a different input with the same hash. Second pre-image resistance is the correct property.
- A
Avalanche effect
Why wrong: The avalanche effect refers to a small change in input causing a drastic change in output. While important for hash functions, it is not the property directly relied upon for integrity verification using a provided hash.
- B
Collision resistance
Why wrong: Collision resistance ensures that it is hard to find any two different inputs that hash to the same value. However, in this scenario, the attacker is given the original hash and must find a different file with that hash, which is second pre-image resistance. Collision resistance is a stronger property but not specifically required.
- C
Second pre-image resistance
Second pre-image resistance is correct. Given the provided SHA-256 hash of the original file, the property ensures that an attacker cannot find a different file that produces the same hash, thus verifying integrity.
- D
Pre-image resistance
Why wrong: Pre-image resistance ensures that given a hash, it is hard to find any input that produces it. However, in this scenario, the analyst already has the original file's hash and is comparing computed hash to that. Pre-image resistance is about reversing the hash, not about finding a different input with the same hash. Second pre-image resistance is the correct property.