Hashing Flashcards
What is a hash function?
A hash function takes input of arbitrary length and maps it to a fixed-length value.
h(x)
Why is this one-way mapping useful?
Can be used to find when data has been altered as the hash will no longer be the same. A comparison can be done to prove this.
What are the properties required for a hash function to be used in security
Pre-image resistance
Second pre-image resistance
Collision Resistance
What is pre-image resistance?
Hash functions are one way and therefore it is computationally infeasible to find y given x, where:
y = h(x)
What is second pre-image resistance?
Given x, it is computationally infeasible to find x’ such that x is different but the hash of x and x’ is the same.
What is collision resistance?
It is computationally infeasible to find x and x’ such that x and x’ are different but the hash of each produces the same output.
What is a message digest?
‘Checksum’, sent with the message and is used by the receive to compare with their hash of the same content. Where both hashes match then the integrity of the message has been preserved
What are message authentication codes?
Hash function in which the key is also hashed. This provides authentication as the sender’s key must be known in order to produce the same hash.
What are the drawbacks of hashing?
Can’t determine what’s been changed in a given message, just that something has changed.
Hashing doesn’t provide integrity in cases where the hash itself has been compromised.