Question: In this problem, we are going to have a simple hash function that can have a collision. generate the hash function of an English word
In this problem, we are going to have a simple hash function that can have a collision.
generate the hash function of an English word as follows:
Take the character Convert it to Binary Ascii bit Right circular shift XoR with
Take the right most bit
For example, lets say we have a word card We will convert this to a bit binary hash value as
follows:
c Asciiright circular shiftxor with
right most bit
a Asciiright circular shiftxor with
right most bit
r Asciiright circular shiftxor with
right most bit
d Asciiright circular shiftxor with
right most bit
So the final hash value of card is
Since the final hash value is just bit long therefore, there might be multiple strings that will
produce the same hash value.
Find two different strings of length that will produce the same hash value using the above hash
function. You need to show the way you are computing the hash value. You will not get any
point if you just write down the two strings.
Part
In your previous part, you constructed a hash value from a hash function. In this part, we are
going to construct a Merkle tree from a list of word. In Markle tree structure, we pair words,
computes the has values of each and then compute another hash value from the pair of hash
values. Lets say, we have two words card and cart and we can construct the Markle tree as
follows:
card Hash value from previous part
t Asciiright circular shiftxor with
right most bit
cart Hash Value
We will use a little bit different hash function while constructing the hash value for the upper
level of the tree. Markel Tree
cardcart right circular shiftxor with
right most bits
The construction is shown in the above diagram.
Using the above example as reference, construct a Merkle tree for the following words
dump, lamp, fact, hand, send, lord, mask, aunt, park, dark, load, code, back, loss, yard, good
Lets say someone claim that the word lock should be there. What branch of the binary tree will
you disclose? Explain the calculation based on the branch you reveal and prove that the word
lock should not be there.
Lets say someone claim that the word dark should not be there. What branch of the binary tree
will you disclose? Explain the calculation based on the branch you reveal and prove that the word ock should not be there.
Lets say someone claim that the word dark should not be there. What branch of the binary tree
will you disclose? Explain the calculation based on the branch you reveal and prove that the word dark should be there.
Lets say someone claim that the word dark should not be there. What branch of the binary tree
will you disclose? Explain the calculation based on the branch you reveal and prove that the
word dark should be there.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
