midterm-solutions

# 3 compute φ n p 1 q 1 the totient of n this is the

This preview shows pages 3–4. Sign up to view the full content.

3. Compute φ ( n ) = ( p - 1)( q - 1), the totient of n . This is the number of numbers among 1 , 2 ,...,n - 1 which have no factor in common with n . 4. Choose an exponent e such that 1 < e < φ ( n ), where e and φ ( n ) are relatively prime. e is the encoding exponent . 5. Find d such that de 1 (mod φ ( n )), by either trial and error or the Euclidean algorithm. d is called the decoding exponent . Then the public key (which is used to encode messages to be sent to you) is the pair of numbers ( n,e ); the private key is the single number d . To encrypt the message W , compute C = W e (mod n ), and send that. To decode the ciphertext C , compute C d (mod n ). This will be W . Question: Why do we choose a decoding exponent d such that de 1 (mod φ ( n ))? In particular, what theorem must we use to prove that this is the correct decoding exponent, and why? Solution. The reason for this choice of decoding exponent is that decoding should re- verse encoding: that is, after encoding and then decoding we should get back the original message. Encoding and then decoding corresponds to raising the original message W to the de power and reducing (mod n ). Euler’s theorem allows us to ignore multiples of φ ( n ) in the exponent; de is one more than a multiple of φ ( n ), and so W de W (mod n ). 10. We saw two proofs that 2 is irrational. Explain why one of these proofs fails to 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
show that 4 is irrational. (The answer should be speciﬁc to one of the proofs we saw in class; the observation that 4 is rational, by itself, does not suﬃce.) Solution. In one proof that we gave, we wrote 2 = c/d , which we rearranged to get c 2 = 2 d 2 . We then observed that c 2 is divisible by 2 and so c must be divisible by 2, which is why the proof worked. But if c 2 is divisible by 4, then c is not necessarily divisible by 4. In the other proof we gave, we considered the prime factorizations of c and d in c 2 = 2 d 2 . On the left-hand side, there must be an even number of twos in the prime factorization; on the right-hand side there must be an odd number of twos. But this does not work when 2 is replaced with 4 because now both sides have an even number of twos. END OF EXAM 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page3 / 4

3 Compute φ n p 1 q 1 the totient of n This is the number...

This preview shows document pages 3 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online