{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

MIT6_042JS10_lec23_sol

# MIT6_042JS10_lec23_sol - Massachusetts Institute of...

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

Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science April 2 Prof. Albert R. Meyer revised March 29, 2010, 739 minutes Solutions to In-Class Problems Week 8, Fri. Problem 1. Let’s try out RSA! There is a complete description of the algorithm at the bottom of the page. You’ll probably need extra paper. Check your work carefully! (a) As a team, go through the beforehand steps. Choose primes p and q to be relatively small, say in the range 10-40. In practice, p and q might contain several hundred digits, but small numbers are easier to handle with pencil and paper. • Try e = 3 , 5 , 7 , . . . until you find something that works. Use Euclid’s algorithm to compute the gcd. • Find d (using the Pulverizer —see appendix for a reminder on how the Pulverizer works —or Euler’s Theorem). When you’re done, put your public key on the board. This lets another team send you a message. (b) Now send an encrypted message to another team using their public key. Select your message m from the codebook below: 2 = Greetings and salutations! 3 = Yo, wassup? 4 = You guys are slow! 5 = All your base are belong to us. 6 = Someone on our team thinks someone on your team is kinda cute. • 7 = You are the weakest link. Goodbye. (c) Decrypt the message sent to you and verify that you received what the other team sent! RSA Public Key Encryption Creative Commons 2010, Prof. Albert R. Meyer .

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

View Full Document
2 Solutions to In-Class Problems Week 8, Fri. Beforehand The receiver creates a public key and a secret key as follows. 1. Generate two distinct primes, p and q . 2. Let n = pq . 3. Select an integer e such that gcd( e, ( p 1)( q 1)) = 1 . The public key is the pair ( e, n ) . This should be distributed widely.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}