11.12b. Calculate the hash function for the FIRST 16 LETTERS of the message only: “I leave twenty mill"
Thanks :)
11.12 This problem introduces a hash function similar in spirit to \( \mathrm{SHA} \) that operates on letters instead of binary data. It is called the toy tetragraph hash (tth). 6 Given a message consisting of a sequence of letters, the produces a hash value consisting of four letters. First, th 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 the 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 \times 4 \) block of text and covert it to numbers \( (A=0, B=1 \), etc.). For example, for the block \( \mathrm{ABCDEFGHIJKLMNOP} \), we have 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:
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: \begin{tabular}{c|c|c|c} \hline B & C & D & A \\ \hline\( G \) & \( H \) & \( E \) & \( F \) \\ \hline\( L \) & 1 & \( J \) & \( \mathrm{~F} \) \\ \hline\( P \) & \( O \) & \( \mathrm{~N} \) & \( \mathrm{M} \) \\ \hline \end{tabular} \begin{tabular}{c|c|c|c} \hline 1 & 2 & 3 & 0 \\ \hline 8 & 7 & 4 & 5 \\ \hline 11 & 8 & 9 & 10 \\ \hline 15 & 14 & 13 & 12 \\ \hline \end{tabular} Now, add each column mod 26 and add the result to the running total. The new running 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 ABCDEFGHIJKLMNOP, then the hash is FHJL. a. Draw figures comparable to Figures \( 11.919 \) and \( 11.10 \square \) to depict 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."