- Python scripts that illustrate basic cryptography concepts based on Coursera Standford Cryptography I course and more.
- My plan is to add more scripts as I come across other fun cryptographic challenges.
- This script will be able to decrypt a target ciphertext, given a bunch on intercepted ciphertexts encrypted with the same key (which may or may not have random errors). A stream cipher key should never be used more than once.
- You'll be able to encrypt or decrypt a message given a key using two modes of block cipher operations; CBC mode and CTR mode.
- A simple file authentication system that simulate how you'd be able to authenticate and play video chunks as they are downloaded without having to wait for the entire file.
- This script illustrates how you'd be able to decrypt an intercepted ciphertext if the receiver reveals whether a sent ciphertext is of valid format or not.
- The meet-in-the-middle attack (MITM) is a generic space–time tradeoff cryptographic attack. We demonstrate the MITM attack by using it to solve a discrete log problem.
- RSA can be broken when the public modulus
N
is generated incorrectly. These scripts illustrate how you'd be able to factorN
whenp
andq
are close to each other.
7. Basic RSA
- An example pipeline that demonstrates basic RSA encryption and decryption.