Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 Task Three. Collision Finding of Hash Functions (3 marks) SHA-1 is a commonly used hash function. It produces 160-bit hash value. You can download

image text in transcribed

3 Task Three. Collision Finding of Hash Functions (3 marks) SHA-1 is a commonly used hash function. It produces 160-bit hash value. You can download the source code for SHA-1 from the web, but you need to state where you get the original code from. As an example, see this github: https://github.com/clibs/shal We learnt in the lecture that a good hash function should be collision-resistant, meaning that it is difficult to find two messages, m and m', where m # m', such that H(m) = H(m'). In this task, we assume a simplified version of SHA-1, named SSHA-1, is used for hashing. SSHA-1 only outputs 2 32 bits, which are composed from the first 16 bits and the last 16 bits of SHA-1 when hashing a message. Your task is to find a pair of integers (2,2") such that x + x' but the SSHA-1 hash values of the following two messages are the same. Mr. Yang Lee owes (FIRSTNAME] x dollars Mr. Yang Lee owes (FIRSTNAME] x' dollars You should replace (FIRSTNAME] with your first name. Write a C++ or JAVA program to accomplish the task. Your program should output the two messages, their hash values (should be the same), and the number of trials your program has made before it finds the collision. 3 Task Three. Collision Finding of Hash Functions (3 marks) SHA-1 is a commonly used hash function. It produces 160-bit hash value. You can download the source code for SHA-1 from the web, but you need to state where you get the original code from. As an example, see this github: https://github.com/clibs/shal We learnt in the lecture that a good hash function should be collision-resistant, meaning that it is difficult to find two messages, m and m', where m # m', such that H(m) = H(m'). In this task, we assume a simplified version of SHA-1, named SSHA-1, is used for hashing. SSHA-1 only outputs 2 32 bits, which are composed from the first 16 bits and the last 16 bits of SHA-1 when hashing a message. Your task is to find a pair of integers (2,2") such that x + x' but the SSHA-1 hash values of the following two messages are the same. Mr. Yang Lee owes (FIRSTNAME] x dollars Mr. Yang Lee owes (FIRSTNAME] x' dollars You should replace (FIRSTNAME] with your first name. Write a C++ or JAVA program to accomplish the task. Your program should output the two messages, their hash values (should be the same), and the number of trials your program has made before it finds the collision

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_2

Step: 3

blur-text-image_step3

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

ISBN: 1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

Identify and explain major nonprobability sampling methods.

Answered: 1 week ago

Question

What are some metrics for evaluating training and development?

Answered: 1 week ago

Question

Comment on the pH value of lattice solutions of salts.

Answered: 1 week ago

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago