Cryptography. Part 2.Problem 1. Using Modular Arithmetic. (a) Divide 3^{7} by 7 and write in the form of a whole number plus a remainder (b) Use this to determine the number a if 3^{7} ≡ a (mod 7). (c) State how Fermat's little theorem could have allowed you to obtain this answer without calculation. Problem 2. The Euclidean algorithm. (a) Use the Euclidean algorithm to calculate the greatest common divisor of 94 and 12. (b) Use the Euclidean algorithm to calculate a when 3a ≡ 1 (mod 20). (a is the multiplicative inverse of 3 (mod 20).) Problem 3. Am I beautiful? In class we saw that each successive term in the Fibonacci sequence is obtained by adding together the previous two numbers. We start with a_{0}=0, then a_{1}=1. Then to get a_{2} we add a_{0} and a_{1}. This gives 0+1=1 so a_{2}=1. The next number is a_{3}=1+1=2. The next number is a_{4}=1+2=3. And so on. (a) Write down the next four numbers a_{5}, a_{6}, a_{7} and a_{8} in the Fibonacci sequence. (b) Now calculate a_{1}/a_{0}, a_{2}/a_{1}, a_{3}/a_{2}, a_{4}/a_{3}, a_{5}/a_{4}, a_{6}/a_{5}, a_{7}/a_{6} and a_{8}/a_{7}. Now calculate (1+√5)/2. What do you notice about these numbers? The value you get is called the Golden Ratio. (c) Now we are going to make what is called a Golden Rectangle. The length of the shorter side is 1 metre. The length of the longer side is equal to the value you obtained for a_{8}/a_{7} metres. Calculate the ratio of the sum of the larger and smaller side lengths to the larger side length. What do you notice about this value? (d) It is said that if your face fits nicely into the Golden Rectangle then you are deemed beautiful. Find a photograph of yourself and calculate the length of your head and divide this by the width of your head. How close are you to the Golden Ratio? Based on this result, do you think this statement about beauty being related to the Golden Ratio is true?! Problem 4. RSA Cryptography. We want to receive a code secretly using RSA cryptography. First we choose two prime numbers, say p=5 and q=11. p and q are kept secret. (a) Calculate n=pxq. n is made public. (b) Now find m, the lowest common multiple of p1 and q1. We keep m secret. Next we choose a number r that contains no commmon factors with m. We will choose r=3 here. r is also made public. (c) Using the results of the question 2(b) find t, the multiplicative inverse of r (mod m). We keep t secret. We now wish to receive a number from a sender without anyone finding out what this number is. Recall that n and r are both public. (d) The sender wants to send the number a=5 to us. To do this they calculate the number b where a^{r} ≡ b (mod n). Calculate b by dividing a^{r} by n and finding the remainder. This is the number that the sender sends to us publicly. Note that an external observer has no way of calculating a using only b, n and r (the numbers that are available publicly). (e) We receive the number b and want to decode to find a. To do this we calculate b^{t} (mod n) by dividing b^{t} by n. If you have done everything correctly you should get back a! This is how information is transmitted securely over the internet. (f) Explain two strategies that are currently used to try and decrypt information that is coded using the RSA algorithm.
