Question: Implement the Rumba cryptographic hash according to the following description: Let X be the data you wish to hash after 10* padding to a multiple

Implement the Rumba cryptographic hash according to the following description:

Let X be the data you wish to hash after 10* padding to a multiple of 128 bytes

Let X_1, X_2, ..., X_n be X broken into 128-byte chunks

chain = 64 bytes of zero

for i = 1 to n {

chain = compression(concat(chain,X_i))

}

return first 32 bytes of chain

where compression follows the following algorithm:

Let M_1, M_2, M_3, M_4 be the input broken into 48-byte chunks

return chacha20_block(concat("firstRumba20bloc",M_1)) xor

chacha20_block(concat("secondRumba20blo",M_2)) xor

chacha20_block(concat("thirdRumba20bloc",M_3)) xor

chacha20_block(concat("fourthRumba20blo",M_4))

Write a C function with the following header:

void rumba(unsigned char out[32], unsigned char in[], int n)

It should perform the above algorithms on the n bytes found at in and write the output of the hash at out.

I already have the chacha20_block code.

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!