Homework 4 Solutions

Homework 4 Solutions - HW #4: Hash Functions, Message...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Distribution and Protocols CS 392/6813: Computer Security Fall 2009 [100pts] DUE 11/03/2008 (midnight) Problem 1 [30pts] Assume that the IP address assignment is performed using the following function: IP: H Æ {0,1} 32 , which on input of a host h on the internet, outputs its IP address as a 32-bit long number uniformly distributed at random. At least how many hosts would we need to gather over the internet such that at least two have of them have the same IP address with a probability greater than 0.6? Show all steps involved. Does this represent a good way for IP address assignment? Why or why not? If a hash function output space is N and if each output is equally likely (i.e. the output is uniformly distributed), then using the birthday paradox, we have probability of finding at least one collision in k trials is: p = (1 – e –k(k-1)/(2*N) ) Here, we have to find k such that p > 0.6, and N = 2^32 i.e., we have to find k such that, 1 – e –k(k-1)/(2*N) > 0.6 or e –k(k-1)/(2*N) < 0.4 Taking log base e both sides, –k(k-1)/(2*N) = -0.916 Î –k 2 + k = -0.916 * 2 * 2^32 Î k 2 - k - 0.916 * 2 * 2^32 =0 Solving the above quadratic equation for the positive value of k, we get, k = 88704 (double check that it satisfies the inequality above) Therefore, with this method of IP address assignment, at least two hosts, out of a total of 88704 of hosts, will have the same IP address, with a probability 0.6 (which is very high). Clearly, this is unworkable since there is a large number of hosts on the internet
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2010 for the course CS 6813 taught by Professor Saxena during the Fall '09 term at NYU Poly.

Page1 / 4

Homework 4 Solutions - HW #4: Hash Functions, Message...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online