2021-csci-ga3205-midterm/README.md

1.5 KiB

2021 CSCI-GA3205 Midterm

Author: Vicky Rampin

Prompt

Gets a text (would serve as plaintext) and a password (would serve as key) from the user and prints the ciphertext by using the Vigenère method. Then, complete it so it can decrypt as well.

Installation

This script is made with Python 3.8 and uses the argparse library. Ensure that you have Python 3.8+ installed in order to run this script correctly.

Usage

First, clone this repository to your machine. Open the command line on your machine and navigate to where you cloned this repository. To get help using cd, use this tutorial.

Before running the script, you should know it expects two arguments:

  1. --text : takes a string that will act as either the plaintext or ciphertext (depending on whether we're encrypting or decrypting)
  2. --key: takes a string that will act as the key used to encrypt and decrypt

From there, you can run it like so:

$ python index.py --text "New York University" --key "NYU"
Encrypted ciphertext: ACQLMLXSHVTYEQCGW
Decrypted plaintext: gmirwddczbdqkaumg

First the script will encrypt the user submitted text as if it was plaintext and show the user the resulting ciphertext. Then, the script will decrypt the user submitted text as if it was ciphertext, and then show the user the resulting plaintext. Make sure you have the key and the text enclosed in quotes!