Assignment written for CP460 Cryptography. A2_solution.py includes functions to read and analyze text files to determine whether or not they are plaintexts. Additional functions include encryption, decryption and cryptanalysis of the Block Rotation Cipher, Wheatstone Playfair Cipher and Columnar Transposition Cipher. A2_test provides functions to print tests for each cryptographic method.
For testing purposes, download all files from repo
Latest version of python installed
https://www.python.org/downloads/
-
Pull all files to a folder
-
Run A2_test.py in cmd or using an interpreter (example: VS Code)
To run in cmd we first need to cd the project directory
cd C:\Users\...directory
Then we run the script:
python A2_test.py
Assuming the latest version of python is installed to your system.
Run A2_test.py for all testing
Each test displays the output of any given function from A2_solution.py
For example, the Scytale cipher will take the following text:
The internet, our greatest tool of emancipation, has been transformed into the most dangerous facilitator of totalitarianism we have ever seen
encrypt it and return it as:
ternThe inr gret, ou tooeatestmancl of en, hipation tras beemed ansforhe minto tngerost dacilious faof ttator ariaotalite hanism wr seve eveqqqqenqqqq
A2_output.txt is a sample output that can be cross refferenced. If the output matches, the encryption, decryption and cryptanalysis functions are working correctly.
Version 1.0
Keven Iskander