DOC PREVIEW
BARRY CS 477 - There are two problems

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS477‐01 Fall 2008 Homework #2 Instructions: There are two problems in this homework. One is a programming exercise and the other is similar to the bitwise XOR we practiced in the class. You only need to do ONE! You can choose the one you like and that will count for your homework#2. But if you want to try both, you are more than welcome to do so and 3 extra points will be awarded (and will be added to your grade for test No. 2) if you get both correct. The deadline for homework#2 is October 8th Wednesday 4:30pm. If you choose to do programming, you need to send me your source code (not executable file) to [email protected] , and schedule a time to come to my office hours to explain the program. If you choose the HMAC, you have to bring a hardcopy with you to the class on the due day. Question 1. Implementation of SHA‐1 You can use any languages, for example C++ or java, to implement the secure hash authentication function. You can find the pseudocode for SHA‐1 on http://en.wikipedia.org/wiki/SHA. You can also use the two examples provided on that web page to test your program: Example 1. SHA1("The quick brown fox jumps over the lazy dog") = 2fd4e1c6 7a2d28fc ed849ee1 bb76e739 1b93eb12 Example 2. SHA1("The quick brown fox jumps over the lazy cog") = de9f2c7f d25e1b3a fad3e85a 0bd17d9b 100db4b3 Question 2. Computing HMAC using bitwise XOR We have talked about HMAC using bitwise XOR as the embedded hash function in class, and briefly looked at a simple example. In this homework you need to compute the hash value, which is the HMAC(K, M) in Figure 1, given two messages. Please refer to the bitwise XOR document (http://euclid.barry.edu/~chchuan/cs477/CS477_bitwise_hash.pdf) for the details of bitwise XOR as well as the binary representation for characters. Here are the settings for the parameters in the system: For bitwise XOR: Block size = 8 bits (this means n = 8 in the Figure 1) For HMAC: ipad = 0011011000110110, opad = 0101110001011100, K+ = 0011100101001111 (The “b” bits in Figure 1 equals 16.) Notice that after the first embedded hash function, the output H(Si||M) (originally n = 8 bits) is padded into b (16) bits. You can append zeros to the right end of H(Si||M) to make it a 16‐bit string. Please compute the hash values for the following two messages: Message 1: Learning without thought is labor lostMessage 2: Life is really simple but we insist on making it complicatedAnd answer the following two questions: Q1. How does the size of a message affect the size of the output hash value? Q2. Will the hash value be different using a different K+ value? Figure 1.


View Full Document

BARRY CS 477 - There are two problems

Download There are two problems
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view There are two problems and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view There are two problems 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?