50 likes | 176 Views
Information Security. CS 483 By Dr. Daniyal Alghazzawi (5). What is a Hash Function?. What is a Hash Function?. Compression Efficiency One-way Weak collision resistance for a given x , it is hard to find a y≠x such that h(x)=h(y) x h(x) y h(y) where h(y)=h(x)
E N D
Information Security CS 483 By Dr. DaniyalAlghazzawi (5)
What is a Hash Function? • Compression • Efficiency • One-way • Weak collision resistance for a given x, it is hard to find a y≠x such that h(x)=h(y)xh(x)yh(y) whereh(y)=h(x) • Strong collision resistance it is hard to find any x and y such that h(x)=h(y)xh(x)yh(y) whereh(y)=h(x)
Collisions • Collisions must exist since the input space is much larger than the output space. For example: • suppose a hash function generates a 128-bit output • there are 2128 possible unique-output values for the hash • suppose the input values consist of 150 bits • there are 222 input values hash to each possible output value 1 2 : 2128 : 2150 Hash Function (128 bits) 1 2 : 2128
Efficiently • Alice can sign a message M by using her private key; she computes S = [M]Alice. Then, she sends M and S to Bob. • [M]Aliceis costly to compute if M is big. • wasting bandwidth in sending M and S (which are the same size) if M is big. • Alice can compute h(M), which can viewed as a “fingerprint”, and sign M by computing S = [h(M)]Alice. Then, she sends M and S to Bob. • more efficient for Alice to sign h(M) than M since the expensive private key operation only needs to be applied to the small fingerprint h(M) instead of to the entire file M. • bandwidth is conserved, as Alice sends few extra bits to Bob.