{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 4 Solutions

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

This preview shows pages 1–3. Sign up to view the full content.

HW #4: Hash Functions, Message Authentication Code, Key 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 Problem 2 [10+5+5 = 20pts]

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

View Full Document
(1) Bob downloaded a 30GB tar.gz file from Alice’s server today. Bob needs to know
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern