The objectives for this lab assignment are as follows:
- To crack classical ciphers (Caesar, Vigenre, and mono-alphabetic substitution cipher);
Programming Tools: Python
Requirements
Please read the requirements carefully, and finish the lab assignment accordingly:
- Implement these classical ciphers using Phyton. Along with the built-in Python functions you may only use the math and string libraries.
- Do not use any other libraries, online tools, cracking programs, or code you did not write.
- In the tarred file tar.gz you will find 9 files. Each of these files has been encrypted with a historic cipher. You need to decrypt them.
Questions
- What are the advantage and disadvantage of these classical cipher?
- Will you consider using these classical ciphers for your content protection?
Why or why not?
- Discuss your experience during the crack implementations.
In Your Report
Please address the following in your report:
- Describe Caesar, Vigenre, and mono-alphabetic substitution cipher;
- Describe how to implement the encryption and save the output files;
- Describe the crack implementation: o File name; o Key and which cipher;
- For Caesar the encryption key should be a number between 0 and 25 (assume A=0, B=1, C=2 and so on);
- For Vigerene the encryption key should be a word
- For the mono alphabetic the key should be a 26-character string o Decrypted text spaces must be inserted; o Process used to decrypt the file this should be a simple description of the process you used to crack the cipher, referencing any code you wrote;
o Code you wrote to decrypt the file (you must use at least some code for each task)
- Show the demo: screen shot of the result and code
- Answer the questions and attach your source code
Useful algorithms: You may want to consider implementing the following algorithms to help with decrypting the files
- A Caesar Cipher decryption algorithm;
- A Vigerene decryption algorithm;
- A mono-alphabetic substitution decryption algorithm;
- Letter frequency counter;
- Chi-squared test;
- Index of coincidence;
- Digraph frequency count;
- Repeat analysis to determine Vigerene key length.
Helpful hints:
- Some files have space removed;
- The input texts for files include English texts;
- At least one input text includes scientific names;
- Vigerene ciphers have key lengths of 5, 9, and 13;
- At least one is a proper noun;
- At least one is a sentence without spaces;
- Some English text does not follow normal frequency distribution
Reviews
There are no reviews yet.