Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions