Lito-Frito / XOR-Encryption

A demonstration on how XOR encryption works using Python where the user can encrypt and decrypt a 32 character message in real-time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XOR Encryption Demo

XOR

Run on Repl.it

This is a simple CLI app I made that showcases how XOR is implemented in encryption. I made this because we learned about how encryption works in my grad class and I wanted a tool to help clients at one of my past jobs visualize how one of the basic techniques in encryption works.

If you've ever wondered how encryption works, XOR is used in many different types of encryption algorithms at some point.

What This Includes

  • main.py: The example script to showcase XOR encryption; run this to see the XOR encryption demo.
  • encrypt.py & decrypt.py: Supplementary files that feed into main.py (no need to touch these).

Getting Started

Requirements

  • Python3
  • a CLI (if you're on Windows, this is the Command Prompt; for Linux and Mac, this is your terminal)
  • Docker (only if you choose to run the container version of this app)

Quick Start

You can go to repl.it where I'm hosting the app in a personal repl. When you click the link, just hit the button up top that says Run with the forward arrow and the app will start up.

Starting from Scratch

Download the file main.py and then open the CLI from the folder that has the main.py file. Run the file by typing python3 main.py.

If this doesn't work, feel free to reach out!

Running Via Docker

This script is available as a container (if you needed it as one for whatever reason) over at Docker Hub. You can download the image via docker pull crc8109/xor_program:1.0.

Run the container via docker run -i xor_program. Don't forget the -i flag. You need to be able to pass along STDIN to the container, otherwise the application won't run properly.

About

A demonstration on how XOR encryption works using Python where the user can encrypt and decrypt a 32 character message in real-time


Languages

Language:Python 99.0%Language:Dockerfile 1.0%