Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This assignment consists of two programming exercises, we prefer to use Python or Java. In the first exercise, you are required to learn how to
This assignment consists of two programming exercises, we prefer to use Python or Java. In the
first exercise, you are required to learn how to design and implement RSA. For the second one, you
have to learn how to find a collision on a Hash Function.
Exercise : Design and implement a simple package based on the RSA algorithm to provide
encryptingdecrypting and digital signature signing and verifying.
a Generate two prime numbers: and
b Miller Rabin: to test the prime number.
c Euclid's algorithm: to find the encryption key e
d Extended Euclid's algorithm EEA: to find the decryption key d
e choose any hash function which is available as free source.
f A main method to show different usage of RSA including dialogues between two
parties Alice and Bob that reflect encryptingdecrypting and digital signature signing
and verifying.
g Combine all of the above in a GUI model to test the functions.
Exercise : Finding a collision on hash function.
a Define a hash function SHAv outputs the first bits nibbles of SHA For
example, SHA of CYS is:
SoSHAv should outputs
b Find any collision in SHAv You should find two different messages such that the Linux
command:
echo n msg shasum cut c
produces the same answer when msg is replaced by each message. To enable us to verify
your answer, please make sure the two messages are typable on a regular keyboard!
Hint: You should not write the code for SHA; you should use an existing library. Also,
it's a good idea to find shorter collisions first. For example, start off finding a collision for
the first bits nibbles; that's a lot easier. The challenge that bits gives you is that
you probably can't store all the intermediate hashes you generate in memory Read
about Floyd's algorithm Nevertheless, you should be able to write a program which
finds a bit collision in a few hours on a regular desktop or laptop computer.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started