Question: 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

 Q1. Using the Martyas-Meyer-Oseas hash function (described below), build a Merkle

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!