{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Midterm_2_2007_sol_Slides

# Midterm_2_2007_sol_Slides - COMP 170 Fall 2007 Midterm 2...

This preview shows pages 1–13. Sign up to view the full content.

COMP 170 – Fall 2007 Midterm 2 Solution

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

View Full Document
Q1. Recall the RSA public key cryptography scheme. Bob posts a public key P = ( n, e ) and keeps a secret key S = ( n, d ) . When Alice wants to send a message 0 < M < n to Bob, she calculates M = M e mod n and sends M to Bob. Bob then decrypts this by calculating ( M ) d mod n . In class we learnt that in order for this scheme to work, n, e, d must have special properties.
(Note: In real life, to ensure a high level of security, n, e, d have to be very large numbers. For simplicity, however, we do not consider that fact here and use small numbers in this question.) For each of the three Public/Secret ( P/S ) key pairs listed below: (i) say whether it is a valid set of RSA Public/Secret key pairs and (ii) justify your answer. (a) P = (91 , 25) , S = (91 , 51) (b) P = (91 , 25) , S = (91 , 49) (c) P = (84 , 25) , S = (84 , 37)

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

View Full Document
Solution: Recall that the conditions for a pair to be correct is that (i) n = pq where p and q are prime numbers and (ii) e · d mod T = 1 where T = ( p - 1)( q - 1) .
Solution: Recall that the conditions for a pair to be correct is that (i) n = pq where p and q are prime numbers and (ii) e · d mod T = 1 where T = ( p - 1)( q - 1) . (a) P = (91 , 25) , S = (91 , 51) This is not a valid key pair. It is true that n = 7 · 13 so p, q are prime. But T = 72 and 25 · 51 mod 72 = 1 . It is true that 25 · 51 mod 91 = 1 but that is not the RSA condition.

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

View Full Document
Solution: Recall that the conditions for a pair to be correct is that (i) n = pq where p and q are prime numbers and (ii) e · d mod T = 1 where T = ( p - 1)( q - 1) . (b) P = (91 , 25) , S = (91 , 49) This is a valid key pair since n = 7 · 13 and 25 · 49 mod 72 = 1 .
Solution: Recall that the conditions for a pair to be correct is that (i) n = pq where p and q are prime numbers and (ii) e · d mod T = 1 where T = ( p - 1)( q - 1) . (c) P = (84 , 25) , S = (84 , 37) This is not a valid key pair since n = 7 · 12 and 12 is not prime .

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

View Full Document
Solution: Recall that the conditions for a pair to be correct is that (i) n = pq where p and q are prime numbers and (ii) e · d mod T = 1 where T = ( p - 1)( q - 1) . (c) P = (84 , 25) , S = (84 , 37) This is not a valid key pair since n = 7 · 12 and 12 is not prime . Note. It is true that e · d mod n = 1 and e · d mod (6 · 11) = 1 but this doesn’t mean anything.
Q2. Calculate the value of 3 1032 mod 50 . Show the steps to obtain the result.

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

View Full Document
Solution: Use repeated squaring to calculate 3 1 mod 50 = 3 3 2 mod 50 = 9 3 4 mod 50 = 9 2 mod 50 = 31 3 8 mod 50 = 31 2 mod 50 = 11 3 16 mod 50 = 11 2 mod 50 = 21 3 32 mod 50 = 21 2 mod 50 = 41 3 64 mod 50 = 41 2 mod 50 = 31 3 128 mod 50 = 31 2 mod 50 = 11 3 256 mod 50 = 11 2 mod 50 = 21 3 512 mod 50 = 21 2 mod 50 = 41 3 1024 mod 50 = 41 2 mod 50 = 31
Solution: Use repeated squaring to calculate 3 1 mod 50 = 3 3 2 mod 50 = 9 3 4 mod 50 = 9 2 mod 50 = 31 3 8 mod 50 = 31 2 mod 50 = 11 3 16 mod 50 = 11 2 mod 50 = 21 3 32 mod 50 = 21 2 mod 50 = 41 3 64 mod 50 = 41 2 mod 50 = 31 3 128 mod 50 = 31 2 mod 50 = 11 3 256 mod 50 = 11 2 mod 50 = 21 3 512 mod 50 = 21 2 mod 50 = 41 3 1024 mod 50 = 41 2 mod 50 = 31 Then 3 1032 mod 50 = ( 3 1024 mod 50 ) · ( 3 8 mod 50 ) mod 50 = 31 · 11 mod 50 = 41

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

View Full Document
Q3. Consider the following two sets of modular equations: (a) x mod 36 = 12 x mod 51 = 5 (b) x mod 35 = 12 x mod 69 = 5 For each of the two sets of equations answer the following question: Does there exist a unique solution for x Z mn , where m and n are the divisors of the two modular equations?
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 44

Midterm_2_2007_sol_Slides - COMP 170 Fall 2007 Midterm 2...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online