QuestionQuestion

1. A simple hash function can be constructed using the XOR operation as follows: divide the binary message into fixed-size (of size n) blocks, and then XOR all of the corresponding i-th bits in all of the blocks, for 1 ≤ i ≤ n. The XOR hash value will be block of size n.
(a) Use simple XOR hash algorithm described above to calculate a hex value of the 16-bit hash for the given plaintext:
Do you want me to sit in a corner and rust, or just fall apart where I'm standing?
Note: Take into account ASCII codes for ‘space’ characters, upper-case letter, and punctuation.
(b) Try to produce a binary sequence of an arbitrary length, padded if necessary with zeros to obtain message of the length 16k for some k, such that it has the same hash as the message, i.e. produce the weak collision. Explain what methods and tools did you use to solve the task. In case that you wrote the program, please submit the source code.

(c) If you receive the message:

It is an important and popular fact that things are not always what they seem.
together with the XOR hash 7729 (hex), would you say that it is a valid message?

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Part a)
We used the below web resource to convert the given message into its binary equivalent (ASCII).

https://www.branah.com/ascii-converter

Then we split the result into blocks of 16 bits as below:
0100010001101111
0010000001111001
0110111101110101
0010000001110111
0110000101101110
0111010000100000
0110110101100101
0010000001110100
0110111100100000
0111001101101001
0111010000100000
0110100101101110
0010000001100001
0010000001100011
0110111101110010
0110111001100101
0111001000100000
0110000101101110
0110010000100000
0111001001110101
0111001101110100
0010110000100000
0110111101110010
0010000001101010
0111010101110011
0111010000100000
0110011001100001
0110110001101100
0010000001100001
0111000001100001
0111001001110100
0010000001110111
0110100001100101
0111001001100101
0010000001001001
0010011101101101
0010000001110011
0111010001100001
0110111001100100
0110100101101110
0110011100111111

In the end we have XOR-ed the groups from above using the provided hashing algorithm and we have obtained 0100 0110 0101 0000, which corresponds to 4650 in hex....

By purchasing this solution you'll be able to access the following files:
Solution.docx.

$15.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Cryptography Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats