Hash Functions




CS166

Chris Pollett

Oct 1, 2012

Outline

Non-crypto Hash (1)

Non-crypto Hash (2)

Non-crypto Hash (3)

Cyclic Redundancy Check Codes More Details

More on CRC codes.

HW Problem

Problem 5.4 How many collisions would you expect to find in the following cases? (a) Your hash function generates a 12-bit output and you hash 1024 randomly selected messages. (b) Your hash function generates an `n`-bit output and you hash `m` randomly selected messages.

Answer: (a) The odds that a given message hash `h` is not shared with another message hash `h'` of the others is `1 - 1/2^(12)`. So the odds that 1023 other message hashes are different from `h` is `(1 - 1/2^(12))^(1023)`. So the expected number of message hashes that do not have other message hashes of the same value is `1024(1 - 1/2^(12))^(1023)`. So the expected number of message hashes that do have other message hashes of the same value is `1024(1 - (1 - 1/2^(12))^(1023)) approx 226`.

(b) Replacing 1024 with `m` in the previous derivation and `2^12` with `2^n`, give the equation `m(1 - (1 - 2^(-n))^(m-1))`.

Popular Crypto Hashes

Crypto Hash Design

Introducing the Tiger Hash

More on Tiger Hash

Tiger Outer Round

Outer Round of Tiger Hash

Tiger Inner Rounds

Inner Round of Tiger Hash

Tiger Hash: One Round

Tiger Hash Key Schedule

Key Schedule of Tiger Hash

Tiger Hash Summary (1)

Tiger Hash Summary (2)

HMAC

HMAC - Which Way?

The Right Way to HMAC

Hash Uses