Homework 2: Applied Cryptography
Due: Thursday, March 31, 10:00 pm through CMS.
The learning objective of this homework is for you to gain hands-on experience with the Java cryptography library.
Partners
You must work on and submit this homework with a partner. You may not work with any students other than your partner.Part I
Write a Java program to decrypt Part II of this homework. Part II is encrypted with hybrid encryption. You'll need the following files, which are contained in hw2.II.zip:
- rsa_pub.bin: The RSA public key that was used to encrypt the session key. The file contains the raw bytes of an X509 encoding of the key.
- rsa_priv.bin: The 3072-bit RSA private key corresponding to rsa_pub.bin. The file contains the raw bytes of a PKCS8 encoding of the key.
- sess.bin: The 128-bit AES session key encrypted with RSA and OAEPWITHSHA-256ANDMGF1 padding. The file contains the raw bytes of the key.
- iv.bin: The initialization vector (IV) for the document's CBC encryption. The file contains the raw bytes of the IV.
- hw2.II.html.enc: Part II encrypted with the AES session key in CBC mode with PKCS5 padding.
Update: The zip archive above has been updated to correct an error in the due date. The correct due date is 03/31/11.
Hint: Part II is much longer than Part I, so you should start early.
Hint: You'll need to read the Java library documentation to learn how to handle encodings of keys.
1337 Hackers
For fun, and to encourage you to start working on the homework early, the first three teams that decrypt Part II will be recognized as "1337 hackers" and will receive a half-letter grade bonus on their homework. The status of this prize will be displayed here:
- Yunchi Luo and Anthony Chang.
- Bing Hua and Yifan Tong.
- Yang Liu and Yang Liu.
If you have successfully decrypted Part II, send the plaintext of hw2.II.html as soon as possible to clarkson@cs.cornell.edu (Subject: CS 5431 HW 2 1337 hacker submission). Your email must include the names and netids of both team members, and you must use that subject exactly.