Skip to content

Latest commit

 

History

History
67 lines (37 loc) · 1.71 KB

File metadata and controls

67 lines (37 loc) · 1.71 KB

Cryptography - Collection of Encrypt/Decrypt Methods

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.

Getting Started

For testing purposes, download all files from repo

Prerequisites

Latest version of python installed

https://www.python.org/downloads/

Installing

  1. Pull all files to a folder

  2. 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.

Running the tests

Run A2_test.py for all testing

What are you 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 

Is the output accurate?

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.

Versioning

Version 1.0

Authors

Keven Iskander