Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

home / study / engineering / computer science / questions and answers / we defin

ID: 3691613 • Letter: H

Question

home / study / engineering / computer science / questions and answers / we define the following hash function working on ... Question We define the following hash function working on input strings of arbitrary length greater than 10. The end of the input string is padded with 0's to be a multiple of 10 (es. the input 1011001110111 becomes 10110011101110000000). The message digest is a bit string of length 10. Assume the messeage m is of length k x 10. The bit number i for i =1,...,10 is obtained by taking the XOR of all the bits mi+j x10 of the message for j =1, ..., k. For example, the bit number 3 of the digest of the meaasge 101100111011100000000111011100 (of length 3 x 10) is: m3m13m23 = 111=1. In this problem, can you please show how the collision was calculated and the pre-image determined? Find a collision for the hash function we described. A simple collision can be observed for the two messages message 1 : 0 0 0 0 0 0 0 0 0 0 0 message 2 : 1 0 0 0 0 0 0 0 0 0 1 Both the messages produce the same digest 0 0 0 0 0 0 0 0 0 0 when hashed using the given scheme. Find a preimage of the digest 1100011111. One of the many preimages of the digest (d) 1 1 0 0 0 1 1 1 1 1 1 = 0 oplus 1 1 = 0 oplus 1 0 = 0 oplus 0 0 = 0 oplus 0 0 = 0 oplus 0 1 = 1 oplus 0 1 = 1 oplus 0 1 = 1 oplus 0 1 = 1 oplus 0 1 = 1 oplus 0 message (m) = 0 0 0 0 0 1 1 1 1 1 1 1 Is this hash function suitable for cryptography? Justify your answer.

Explanation / Answer

A hash function that is suitable for cryptography must ensure that it would be practically impossible to invert. This means that given a hash value or a digest, it is impossible to re-create the original input data. The input data is called the message and the output data is called the hash value or digest.

A hash function that is apt for cryptography must have the following properties:

Calculating collision resistance of a hash function:

To determine whether a hashing function is apt for the purpose of cryptography, we determine the collision resistance of the hashing function. Collision Resistance measures the possiblity to pick two inputs messages that will produce the same hash value.

If we are able to create two inputs that generate the same hash, it is easy to breakup and hack digital signatures thereby posing a huge security risk.

Calculating Preimage Resistance of a hash function:

The pre-image resistance of a hash function determines how difficult it is to fabricate an input message that hashes to a specific value. If the pre-image resistance of a hash function is low, it is easy to break into hashed passwords.