Side Project: Encryption Program

Hi guys, CrazySqueak here. A while ago, I’d been working on a file encryption program as a side-project, and I’ve decided to share it.
DISCLAIMER: This encryption program is in no way secure. It was made for fun, not to be used to keep data secure.

About The Program

The program is written in python 3.6 (but is compatible with 3.4) and encrypts files by splitting them into blocks and storing them in a “vault”. Each vault has a critical “MANIFEST” file that MUST NOT be deleted or edited manually.
Note that this program runs incredibly slow if you are encrypting large files, due to the fact that for loops in python aren’t exactly the fastest thing in the world.

Features

  • No encryption key or hash of decrypted files is stored anywhere.
  • Files are split into blocks to lower memory usage.
  • Able to encrypt folders, their subfolders, and all the files in them in one click
  • Blocks are not overwritten if they don’t need to be.
  • The entire vault is “refreshed” every time a new block is required.
  • Runs incredibly slow, to allow you to grab a coffee if you’re encrypting large files.
  • Anti-tamper mechanism. All your data is gone if the vault is even slightly modified.
  • The previous three are definitely features, not bugs.

How to use this program

To open the program, open the “encryptor.py” program with python 3.4 or newer. Then, follow the instructions below depending on what you want to do.

Creating a new vault

First, open the program as described above. A window should open like the one below.
2019-07-07 (10)
In “Vault Directory”, enter a path to the folder you’d like to store your vault in. Use the browse button to select a folder. (Make sure to create a new folder, as the vault is stored in the root of the folder.) In “Plaintext Directory”, enter the path to the folder containing the files to encrypt. Just create an empty folder if you’re going to add the files later.
Then, enter an encryption key into the third box. Make sure to write down your encryption key.
Once all the information has been entered, click on the “New Vault” button. The screen will update to say that the vault is open.

Opening an existing vault

To open an existing vault, open the program as described above. Then, enter the path to the vault in the “Vault Directory” field, or use the “Browse” button.
Next, enter a path to a folder you’d like to temporarily extract your files in to into the “Plaintext Directory” field, or use the browse button.
After that, enter your encryption key into the third box.
Once all the information has been entered, click on the “Open” button. The program will then run an integrity check and extract your files if it passes. Once all this is done, the screen will display a screen saying that the vault is open.
2019-07-07 (12)

Accessing the files inside an open vault

To access the decrypted files, click on the “Open Folder” button. This will open the folder your files have been extracted to. From there, simply access and modify as you wish.

Saving your changes to a vault

TO CLOSE A VAULT, DO NOT CLOSE THE WINDOW. CLOSING THE WINDOW EXITS THE PROGRAM, LEAVING YOUR FILES DECRYPTED AND YOUR CHANGES UNSAVED! Instead, follow these steps.
In order to close a vault and save your changes, you must follow these steps.

  1. Copy any files you want to keep a decrypted copy of from the extraction to a different folder.
  2. Then, enter your encryption key into the “Encryption Key” box and click “Close Vault”. This requirement is to make sure that you remember your encryption key.
  3. Find something to do while the files are being encrypted.
  4. Once the files are encrypted and stored in the vault, the decrypted files are wiped.
  5. Once it returns to the “Open a vault or create new vault” window, you may safely close the window.

Changing your encryption key

2019-07-07 (13)

To change your encryption key, click on the “Change Key” button. Note that you do not need your old key to do this. Once the window opens, enter your new encryption key in both boxes, and click “Change”. THIS CHANGE WILL NOT TAKE EFFECT UNTIL YOU CLOSE YOUR VAULT USING THE METHOD DESCRIBED IN “Saving your changes to a vault”.

Can I recover my vault if it is corrupted?

Unfortunately, I haven’t gotten round to creating a recovery program yet sorry.

Where can I get it?

You can get it from my GitHub repo at https://github.com/CrazySqueak/CrazySqueakEncryptor.