Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. Using the Martyas-Meyer-Oseas hash function (described below), build a Merkle tree for the following strings as leaf nodes. (Hint: Build a balanced tree version

image text in transcribed

Q1. Using the Martyas-Meyer-Oseas hash function (described below), build a Merkle tree for the following strings as leaf nodes. (Hint: Build a balanced tree version of the Merkle tree with all leaves at the same level.) Also, determine what is returned when queries for RAT and DOG are made. POT, PIE, CAT, COW, RAT, OWL, YAK Martyas-Meyer-Oseas hash function: As shown below, to compute the hash of a string, say RAT, we take one character at a time, represent it as an 8-bit ASCII character (or 2 hexa characters). For example, Rin ASCII is hexa 52 or binary 0101 0010. (ASCII - Simple English Wikipedia, the free encyclopedia). The steps are as follows: 1. = = Consider one character at a time for each string. Represent it as an 8-bit ASCII string. This is what the figure refers to as mi or the ith character. For example, in RAT, we have i=1,2,3 where m1 = "R, m2 = A, and m3 = T, 2. Hi-1 is the hash of the previous character. For i=1, we assume Ho = X or ASCII hexa 58 or in binary 01011000. 3. Apply a given function gon Hi-1. Assume g(H) = an 8-bit string that is equal to the complement of bits in H; For example, if H=X (ASCII) = 01011000 (binary); then g(H)= 10100111. 4. Now, using g(H) as the key, encrypt the input character mi. Use the following encryption function: Divide the key into two halves: LK and RK; Divide the plaintext into two halves: LT and RT; Then ciphertext=LC||RC where LC=LK XOR RT; and RC = RK XOR LT; where LC, RC, LT, and RT are each 4 bits; Plaintext and ciphertext are each 8 bits. For example, in the above example where g(H)=10100111 and m1 = R or (0101 0010), we get LK=1010; RK=0111; LT-0101; RT=0010; LC = LK XOR RT = 1010 XOR 0010 = 1000; RC=RK XOR LT = 0111 XOR 0101 = 0010; So ciphertext = LC||RC = 1000 0010; This is the output Hi. 5. Repeat steps 1-4 with all characters in the given string. The final hash is the hash of the given string. Q1. Using the Martyas-Meyer-Oseas hash function (described below), build a Merkle tree for the following strings as leaf nodes. (Hint: Build a balanced tree version of the Merkle tree with all leaves at the same level.) Also, determine what is returned when queries for RAT and DOG are made. POT, PIE, CAT, COW, RAT, OWL, YAK Martyas-Meyer-Oseas hash function: As shown below, to compute the hash of a string, say RAT, we take one character at a time, represent it as an 8-bit ASCII character (or 2 hexa characters). For example, Rin ASCII is hexa 52 or binary 0101 0010. (ASCII - Simple English Wikipedia, the free encyclopedia). The steps are as follows: 1. = = Consider one character at a time for each string. Represent it as an 8-bit ASCII string. This is what the figure refers to as mi or the ith character. For example, in RAT, we have i=1,2,3 where m1 = "R, m2 = A, and m3 = T, 2. Hi-1 is the hash of the previous character. For i=1, we assume Ho = X or ASCII hexa 58 or in binary 01011000. 3. Apply a given function gon Hi-1. Assume g(H) = an 8-bit string that is equal to the complement of bits in H; For example, if H=X (ASCII) = 01011000 (binary); then g(H)= 10100111. 4. Now, using g(H) as the key, encrypt the input character mi. Use the following encryption function: Divide the key into two halves: LK and RK; Divide the plaintext into two halves: LT and RT; Then ciphertext=LC||RC where LC=LK XOR RT; and RC = RK XOR LT; where LC, RC, LT, and RT are each 4 bits; Plaintext and ciphertext are each 8 bits. For example, in the above example where g(H)=10100111 and m1 = R or (0101 0010), we get LK=1010; RK=0111; LT-0101; RT=0010; LC = LK XOR RT = 1010 XOR 0010 = 1000; RC=RK XOR LT = 0111 XOR 0101 = 0010; So ciphertext = LC||RC = 1000 0010; This is the output Hi. 5. Repeat steps 1-4 with all characters in the given string. The final hash is the hash of the given string

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_2

Step: 3

blur-text-image_3

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

4-1. What is meant by the term you attitude? [LO-1]

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago