Exercise #5- this exercise involves exposure to simple ciphers such as a Caesar cipher and a XOR-based stream cipher (such as RC4).
There is NO submission for this exercise.
Exercise steps
- Read about pseudo random number generators
- Read this paper on RC4
- Become familiar with the code in our CryptoCode CryptoCode.
- This code would need modifications to be used as a Unix Filter (i.e., cat cleartext.txt | mycipher > ciphertext.txt). However, there is code that you can use for your security project.
- Focus on the Caesar and RC4 ciphers in encode.c and decode.c
- Issue a 'sudo apt-get install ccrypt'
- Issue a man ccrypt.
- Using the cleartext file from our CryptoCode package, smallFile.txt, issue:
- cat smallFile.txt | ccrypto -e > encrypted.txt
- cat encrypted.txt | ccrypto -d > decrypted.txt
- Comparing smallFile.txt with decrypted.txt should show they are the same!!
Last update: 4/15/2017