Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2.7 This problem introduces a hash function similar in spirit to SHA that operates on let- ters instead of binary data. It is called the

image text in transcribed

2.7 This problem introduces a hash function similar in spirit to SHA that operates on let- ters instead of binary data. It is called the toy tetragraph hash (tth). Given a message consisting of a sequence of letters, tth produces a hash value consisting of four letters. First, tth divides the message into blocks of 16 letters, ignoring spaces, punctuation, and capitalization. If the message length is not divisible by 16, it is padded out with nulls. A four-number running total is maintained that starts out with the value (0,0,0, 0); this is input to a function, known as a compression function, for processing the first block. The compression function consists of two rounds. Round 1: Get the next block of text and arrange it as a row-wise 4 X 4 block of text and convert it to numbers (A = 0, B = 1), for example, for the block ABCDEFGHIJKLMNOP, we have AB C D EF G H IJ KL MNO P 0 1 4 5 8 9 12 13 2 3 67 10 11 14 15 Then, add each column mod 26 and add the result to the running total, mod 26. In this example, the running total is (24, 2, 6, 10). Round 2: Using the matrix from round 1, rotate the first row left by 1, second row left by 2, third row left by 3, and reverse the order of the fourth row. In our example, 5 BCDA GHE F LIJK P ON M 1 2 3 0 6 7 4 5 11 8 9 10 15 14 13 12 Now, add each column mod 26 and add the result to the running total. The new run- ning total is (5,7,9,11). This running total is now the input into the first round of the compression function for the next block of text. After the final block is processed, convert the final running total to letters. For example, if the message is ABCDEF- GHIJKLMNOP, then the hash is FHJL. a. Draw figures of the overall tth logic and the compression function logic. b. Calculate the hash function for the 48-letter message "I leave twenty million dollars to my friendly cousin Bill." c. To demonstrate the weakness of tth, find a 48-letter block that produces the same hash as that just derived. Hint: Use lots of As. 2.7 This problem introduces a hash function similar in spirit to SHA that operates on let- ters instead of binary data. It is called the toy tetragraph hash (tth). Given a message consisting of a sequence of letters, tth produces a hash value consisting of four letters. First, tth divides the message into blocks of 16 letters, ignoring spaces, punctuation, and capitalization. If the message length is not divisible by 16, it is padded out with nulls. A four-number running total is maintained that starts out with the value (0,0,0, 0); this is input to a function, known as a compression function, for processing the first block. The compression function consists of two rounds. Round 1: Get the next block of text and arrange it as a row-wise 4 X 4 block of text and convert it to numbers (A = 0, B = 1), for example, for the block ABCDEFGHIJKLMNOP, we have AB C D EF G H IJ KL MNO P 0 1 4 5 8 9 12 13 2 3 67 10 11 14 15 Then, add each column mod 26 and add the result to the running total, mod 26. In this example, the running total is (24, 2, 6, 10). Round 2: Using the matrix from round 1, rotate the first row left by 1, second row left by 2, third row left by 3, and reverse the order of the fourth row. In our example, 5 BCDA GHE F LIJK P ON M 1 2 3 0 6 7 4 5 11 8 9 10 15 14 13 12 Now, add each column mod 26 and add the result to the running total. The new run- ning total is (5,7,9,11). This running total is now the input into the first round of the compression function for the next block of text. After the final block is processed, convert the final running total to letters. For example, if the message is ABCDEF- GHIJKLMNOP, then the hash is FHJL. a. Draw figures of the overall tth logic and the compression function logic. b. Calculate the hash function for the 48-letter message "I leave twenty million dollars to my friendly cousin Bill." c. To demonstrate the weakness of tth, find a 48-letter block that produces the same hash as that just derived. Hint: Use lots of As

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Identify the four financial statements of a business.

Answered: 1 week ago

Question

4. What decision would you make and why?

Answered: 1 week ago