#### BIT112 Mathematics for IT

## BIT112 Mathematics for IT Solution

Book solution for this assignment at only $100 AUD now

__Task:__** Explore how Public Key Cryptography works.**

__Task:__

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 4
*x*+1. Such that P_{1}=4*x*_{ 1}+1 and P_{2}=4*x*_{ 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 4
*x*+3. Such that P_{3}=4*x*_{ 3}+3 and P_{4}=4*x*_{ 4}+3.

(b) Check that they have the same number of binary bits.

- (a) Use P
_{1}and P_{2}to generate your**public**keys and encrypt your student ID. - Use P
_{3}and P_{4}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:__- Express P
_{1}and P_{2 }as the sum of two squares (for example . - Draw these as two right angle triangles (a,b,c). Note that ,
- (a) Using the equations below: Let P
_{1}=C_{1}and P_{2}=C_{2}and let the smallest value of the two squares be express the sides of each triangle as:

(b) Test that both your triangle solutions meet the condition that: . Show geometrically.

(c) Multiply P_{1} and P_{2 }together: P_{1} P_{2. } Can be expressed as the sum of two squares? Does this correspond to part 2(iii)(a).

(d) Using Euler’s factorization method, show how the original prime numbers can be recovered using the sum of squares method.

- (a) Can P
_{3}P_{4}be expressed as the sum of two squares as in (iii)(c)? Can Euler’s Factorization now be used? Why?

(b) Represent P_{3} and P_{4} as the difference of two squares.

(c) Find P_{3} P_{4} as the difference of two squares & factorise with Fermat’s Method.

- For Primes, P
_{1}and P_{2 }, subtract 1 and multiply these together: and show that if are known, the original primes P_{1}and P_{2 }can be recovered. - Using your public key, show how your private keys can be recovered using the Wiener attack by recovering P
_{1}and P_{2}. - 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.

__Final Report:__

Your final report is a professional representation of parts (1) and (2) above, drawing on the relevant literature (including journals) where relevant and properly referencing these. You should also look at linkages between parts (1) and (2) and explore the structures of primes with particular attention to why primes of the type 4*x*+1 are weaker than 4*x*+3.

Please refer to the ‘How to write a technical report” in the Resources/Assignment” directory. Also the marking rubric will provide a guide to how the assignment report will be marked. Some useful references can also be found there. This is not a definitive list and students should use their initiative to find additional sources of information.