P2L8 Hashes Flashcards
Weak vs Strong Collision resistance
WEAK: When you can find m2 such that H(m2) = H(m1). It is weak only to a given input message. STRONG: Hash function is resistant to any pair of different messages. This implies the weaker property.
pigeonhole problem of hash functions
there are many more ‘pigeons’ than there are ‘pigeon holes’. Because the size of the hash is fixed size, but the input is not. So many inputs will match to the same output value.
determining hash length
In this snippet the top row is ‘l’ not 1. The bottom row means you need to find 232 possibilities before you reach a hash collision.
If length of a hash is 128 bits, then how many messages does an attacker need to search in order to find two that share the same hash?
64
In SHA 2, how many rounds are used to process a message block?
80
why use hash based message authentication?
- Hash functions are very efficient (execute faster)
- library code widely available
HMAC is secure because…
A secret key is hashed with the message content. An attacker cannot compute the HMAC value for m2.
Hash functions are used for message authentication but not…
digital signatures
Hash based message auth scenario
- Alice and bob share secret key.
- Alice authenticates herself by sending ‘Hello’ message and hashing the message along with shared secret key.
- Bob receives this hash value along with hello message in plaintext, bob can hash the hello message along with the shared key
- Bob sees whether that hash value matches the value he received. If they match, then Alice is authenticated.
Digital signatures steps
- alice hashes m
- then signs hash value of m with private key
- then she sends message m in plaintext along with signature
what is recommended minimum length of a hash?
128 bits