instead of binary data. It is called the toy tetragraph hash (tth).8 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 Pound 1: Get the next block of text and

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
2.7 This problem introduces a hash function similar in spirit to SHA that operates on letters
instead of binary data. It is called the toy tetragraph hash (tth).8 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 4x4 block of text and convert it to numbers (A=0, B=1), for
example, for the block ABCDEFGHIJKLMNOP, we have
81 thank William K. Mason and The American Cryptogram Association for providing this example.
A
B C D
0 1 2 3
E
F
G H
4
6 7
5
8 9 10 11
I
J
K
L
M
N
OP
12 13 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,
Transcribed Image Text:2.7 This problem introduces a hash function similar in spirit to SHA that operates on letters instead of binary data. It is called the toy tetragraph hash (tth).8 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 4x4 block of text and convert it to numbers (A=0, B=1), for example, for the block ABCDEFGHIJKLMNOP, we have 81 thank William K. Mason and The American Cryptogram Association for providing this example. A B C D 0 1 2 3 E F G H 4 6 7 5 8 9 10 11 I J K L M N OP 12 13 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,
BCD A
G HEF
LIJK
PON M
1 2
6 7
11
15 14
3
0
4 5
10
13 12
8 9
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 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.
Transcribed Image Text:BCD A G HEF LIJK PON M 1 2 6 7 11 15 14 3 0 4 5 10 13 12 8 9 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 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Hash Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education