This repository contains the programming assignments for Dan Boneh's Cryptography I course.
This programming assignment involved the cracking of 10 ciphertexts that had been encrypted using the same one time pad.
This assignment was designed to show that a one-time pad should only be used once.
The assignment involved implementing AES in CBC and CTR mode.
Week 3's assignment was to build a hashing scheme that verified data in chunks. A use case for this is streaming services that need to verify data as it is being downloaded. SHA256 was used as the hashing algorithm.
This assignment was one of the most interesting. We were provided with a 'toy' website that verified a ciphertext. If the decryption failed and the website releases information about what error has occurred (padding invalid in this case) it forms what is known as a 'padding oracle'. This small leak of information can be enough to fully encrypt the ciphertext!
This is known as a padding oracle attack.
This weeks assignment was a Meet in the middle attack to compute a Discrete Modular Log. It involved basic number theory knowledge and is a good example of constructing a Meet in the Middle attack.
The final week involved cracking faulty modular values of an RSA key. If the values of p and q that construct N are too close, it can make it very trivial to factorise N. By factoring N you can construct the private key.