CS 341: Cryptography

RSA Party Instructions

The second attempt at a party will happen from 8:30-9:40AM Wednesday, February 2. Code and results will be due by 11:59PM the same day.

What to do

  1. Test your program on the Example results below to make sure you get the same results I got.
  2. Generate a new key set. Go to this key submission page and post your (e, n).
  3. Pick a nearby partner with whom to exchange messages. Each of you should choose a message from your list, encode it, encrypt it using your partner's encryption key, and e-mail your message to your partner. When you get your partner's message, decrypt it using your own decryption key, decode it, and see whether you received the message that was sent.
  4. Do the same thing again (with a new message), but this time, sign your message by computing D_you(E_recipient(M)).
  5. Create a signed, encrypted message D_you(E_somebody(M)) and post it at this message-posting page. For every such message that gets posted, your job by the end of the day today is to identify the sender, the intended recipient, and the message.

Example results

Here are results from my implementation. I generated these items and stored them in like this:

python rsa.py --keygen echo "Take my advice. Don't mess with the emu." > message.txt python rsa.py --encode < message.txt > encoded.txt python rsa.py --encrypt 000000000013 EF3D4B594AB5 < encoded.txt > encrypted.txt python rsa.py --decrypt 25C64EF5D19B EF3D4B594AB5 < encrypted.txt > decrypted.txt python rsa.py --decode < decrypted.txt > decoded.txt