Broken MACS, Hashes HW

In other words hk x sha1useridx mod 2k after reading

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (Hi−1 ) for i ≥ 1. For the purpose of this homework, each student’s hash function is the last k bits of SHA1 seeded with his or her CSELabs username. In other words, h|k (x) = SHA1(userid||x) mod 2k . After reading Section 2.1.6 of HAC (available from http://www.cacr.math.uwaterloo.ca/hac/about/ chap2.pdf), answer the following questions. (a) [10 points] Write a computer program to compute the number of components, average/max tail length, and min/average/max cycle length in your h|16 . Your output should print out these 6 numbers. Tail and cycle are defined in 2.35. To avoid the confusion, tail length is defined as the number edges of the path to a cycle from a point. In the following Figure, the number of components is 2, tail length of node 13 is 3, tail length of node 12 is 1, and the tail length of 6 is 0. The Average tail length is (3+2+1+1)/4 = 1.75. (i.e. average length of tails starting from the terminal points with no preimage.) The cycle length of [1, 4, 6, 9] is 4. Your main submission should briefly describe how your program works and how to compile it; yo...
View Full Document

Ask a homework question - tutors are online