Hash Functions, Message Authentication Codes
Ahmet Burak Can Hacettepe University
abc@hacettepe.edu.tr
1 Information Security
Hash Functions, Message Authentication Codes Ahmet Burak Can - - PowerPoint PPT Presentation
Hash Functions, Message Authentication Codes Ahmet Burak Can Hacettepe University abc@hacettepe.edu.tr 1 Information Security Security Services Confidentiality : Symmetric encryption solves Integrity Authentication
abc@hacettepe.edu.tr
1 Information Security
Information Security 2
Confidentiality : Symmetric encryption solves Integrity Authentication Non'repudiation Access control Availability
Sender computes a CRC for the message Sender appends the CRC code to the message and
The receiver computes the CRC of the message.
Information Security 3
Information Security 4
M CRC
Chk Sum
M
ChkS um
M
Chk Sum
CRC
Chk Sum’
= ?
INTERNET
Maps an arbitrary length input to a fixed'size output.
Desirable features:
It should be hard to find two inputs and such that () = ()
Information Security 5
Information Security 6
Birthday Problem (“paradox”): When √N or more are
Probability of n persons having different birthdays:
Information Security 7
Information Security 8
If a hash function produces bits of output, an attacker
But why “collision resistance”?
Information Security 9
A fixed'size “compression function”.
Design:
Information Security 10
compression function
yi'1||xi yi'1 yi m = x1 x2 . . . xn yn
m H(m)
xi
MD5 (Rivest)
SHA'1 (NIST
RIPEMD'160
Information Security 11
Algorithm Speed (MByte/s.) MD5 205 SHA-1 72 RIPEMD-160 51
Crypto++ 5.1 benchmarks, 2.1 GHz P4
A simple message integrity checking method:
What happens if an attacker changes both m and H(m)
A secret key system can be used to generate a
12 Information Security
Let MACK(m) be a message authentication code for m
An attacker shouldn’t be able to generate a valid (m,
It aims to protect against undetected modifications on
Information Security 13
prefix: MACK(m) = H(K || m)
suffix: MACK(m) = H(m || K)
send half of the digest envelope: MACK(m) = H(K1 || m || K2) HMAC: MACK(m) = H(K2 || H(K1 || m))
Information Security 14