A MAC provides:
- Both parties share the key, so it can’t give non-repudiation.
Message authentication, MACs and their requirements, HMAC, one-way hash functions and their properties (preimage, second-preimage and collision resistance), attacks and the birthday paradox, UNIX password storage with salt, dictionary attacks, MD5 and the SHA family.
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
MAC: a short tag computed from the message AND a shared secret key; proves integrity and origin.
A MAC provides:
Properties: preimage resistance (one-way), second-preimage resistance (weak collision), collision resistance (strong collision).
Finding ANY two messages with the same hash breaks:
Birthday attack: collisions take about 2^(n/2) tries for an n-bit hash, so 128-bit hashes give only ~64-bit collision security.
For a 160-bit hash, a birthday attack needs about:
Salt: a random value stored with each password hash; identical passwords give different hashes and precomputed tables fail.
Seen again This deck, slide 31: dictionary attacks
Dictionary attack: hash common words and compare. Salt + slow hashes make it expensive.
MD5: 128-bit digest, 512-bit blocks. Broken (collisions); don’t use for security.
SHA-1: 160-bit (broken). SHA-2: SHA-224/256/384/512. SHA-512 processes 1024-bit blocks in 80 rounds.
The digest size of SHA-256 is: