Reference no: EM132999807
BIT112 Mathematics for IT
Task: Explore how Public Key Cryptography works.
Using your Student ID, generate two primes and encrypt your student ID with your own Private Key. Send this to a recipient with a Public Key and recover your original Student ID.
Use the Wiener attack to break your private key and is this way steal your identity by using your private key to encode another number and masquerade as you.
In your answers to each part properly number each question and your answer to it. Please refer to the ‘How to write a technical report" in the resources directory.
Making your own Keys:
Explore how Public Key Cryptography works and summarise this in your own words with particular attention to how the method generates these keys.
From your exploration above, generate Private and Public Keys using an example.
Using your student ID, determine how bits the number part can be represented with.
For a particular number of binary bits determine the number of prime numbers available in that bit range.
(a) Using the Wolframalpha "nextprime" function and your student ID create two prime numbers which are of the form 4x+1. Such that P1=4x 1+1 and P2=4x 2+1.
(b) Check that they have the same number of binary bits.
(a) Using the Wolframalpha "nextprime" function and your student ID create two prime numbers which are of the form 4x+3. Such that P3=4x 3+3 and P4=4x 4+3.
(b) Check that they have the same number of binary bits.
(a) Use P1 and P2 to generate your public keys and encrypt your student ID.
Use P3 and P4 to generate your public keys and encrypt your student ID.
Create a private key and use this to decrypt and recover your student ID.
Breaking the Keys:
Using Overmars triangles: Let P1=C1 and P2=C2 and let the smallest value of the two squares be n express the sides of each triangle as:
c=n^2+(n+2m-1)^2 b=2n(n+2m-1) a=(2m-1)(2m+2n-1)
N:N_1= P1 P2. Find N_1 as two sums of two squares?
Using Euler's factorization method, show how the original prime numbers can be recovered using the sum of squares method.
Can N_2= P3 P4 be expressed as the sum of two squares? Can Euler's Factorization be used? Why?
Represent P3 and P4 as the difference of two squares
N:N_2= P3 P4 as two differences of two squares
Factorise with Fermat's Method.
If φ(n)=(P_1-1)(P_2-1) show that if φ(n) and N are known, the primes P1 and P2 can be recovered.
Using your public key, show how your private keys can be recovered using the Wiener attack.
As the villain, armed with this information and masquerading as you, send a different encrypted Student ID (not yours) encrypted with the recovered key. Use the same public key as earlier to recover the masquerading Student ID.
Attachment:- Mathematics for IT.rar