










































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











































































*Slides borrowed from Vitaly Shmatikov
bit strings of any length (^) n-bit strings
x’ x’’ x y’ y hash function H ◆ Hash function H is a lossy compression function
T
T = K(K-1)…(K-T+1) - samples without replacement
T
T ≈ 1 - T(T-1)/2K
2 )
n/
n
2 ) O( n ) T ≈ O( n/ )
goodFile Software manufacturer wants to ensure that the executable file is received by users without modification… Sends out the file to users and publishes its hash in the NY Times The goal is integrity, not secrecy Idea: given goodFile and hash(goodFile), very hard to find badFile such that hash(goodFile)=hash(badFile) BigFirm™ User VIRUS badFile The Times hash(goodFile)
M 1 M 2 M 3 M 4 IHV 0 Com- press Com- press Com- press Com- press IHV 4
Current message block Current buffer (five 32-bit registers A,B,C,D,E) Buffer contains final hash value Similar to a block cipher, with message itself used as the key for each round Four rounds , 20 steps in each Let’s look at each step in more detail… Fifth round adds the original buffer to the result of 4 rounds
f t 5 bitwise left-rotate W t K t
Special constant added (same value in each 20-step round, 4 different constants altogether) Logic function for steps
rd
Integrity and authentication: only someone who knows KEY can compute correct MAC for a given message Alice Bob KEY KEY message MAC (message authentication code) message, MAC(KEY,message) = ? Recomputes MAC and verifies whether it is equal to the MAC attached to the message