Gridlock - Encryption and decryption python project

Overview

Gridlock Encryption

Encryption and decryption of plain text messages inspired by the Gaussian curve method of blurring images and the Caesar Cipher.

Twitter | Blog Post

Gridlock text interface output

How it works

The shuffle

To better encrypt our message, we have a tuple (non-editable list) of characters available. This is then assigned to a new List which is then shuffled using the shuffle() function. Each encryption gets a new shuffle, making the combinations equal to the Factorial of the list length.

The line-length

The code then generates a random number that will be used for the line length of your message, which will be stored in a list of lists.

For example, if we want to encrypt the message Hello World! and the application randomly selects 5 for the line length, it will store it in a list in this format:

[['H'], ['e'], ['l'], ['l'], ['o']
 [' '], ['W'], ['o'], ['r'], ['l']
 ['d'], ['!']]

This method add an extra variable to the security of the message by the way the grid traverses our message to be encrypted.

The grid

The grid is where I was inspired by the way Gaussian blur work. Taking information from around the character to be encrypted and performing some algorithm and assigning that new key to our shuffled list.

Grid represented

For each character that is preceding (purple) the current target (orange), the shuffled list will be referenced. For all characters ahead of the current target, the original tuple will be referenced for their key index.

Modifying the grid

The grid by default is a 3x3, represented by variables grid_height and grid_width in range format. This is just another variable you may use to strengthen the complexity of the encryption. Change the shape to a rectangle, offset the center, and much more.

Void spaces

Any space that is empty on the grid is another mode of enforcement, where void spaces are assigned a random digit - any void spaces will be valued with this digit.

Index offset

After all the calculations are completed, there is one more offset - another random number, to offset the index. Just one more mode of security.

Example output

This output will give you everything you need to decrypt the message. Of course, if you lose it - you will never be able to recover the message.

Type or paste the message to be encrypted:
Hello World!

SECRET KEYS
Save the following information in a safe place.
------------
ALPHA KEY:
iX1£xIYw?cdea#*t/Wr¥(L|bG!q3~AJn^D-=,"9g7&+`p_8)BH'Ohf0V@m}FSs:zKlo%>$MR.k5Q\jvEZ{ U4P6N[C;<uy]2T
------------
INDEX OFFSET:  57
LINE LENGTH:   12
VOID SPACES:   9
GRID HEIGHT:   range(-1, 2)
GRID WIDTH:    range(-1, 2)

Your encrypted message:
Sp=A (TTy\P5

Decryption

When decrypting, it will ask for all the information given in the output - after inputing you will get a response in the similar fashion:

What is the index offset? 57
What is the line length? 12
What is the value of void spaces? 9
What is the height of your grid? for example: -1, 2: -1, 2
What is the width of your grid? for example: -1, 2: -1, 2
Type or paste the message to be decrypted:
Sp=A (TTy\P5

What is your alpha key?
iX1£xIYw?cdea#*t/Wr¥(L|bG!q3~AJn^D-=,"9g7&+`p_8)BH'Ohf0V@m}FSs:zKlo%>$MR.k5Q\jvEZ{ U4P6N[C;<uy]2T

Your decrypted message is:
Hello World!

If we try to do the same decryption, but one digit is off, for example the value of void spaces, you will see a garbage output like the following:

Your decrypted message is:
HlksnGVvqsc*

Foot notes

I do plan to update with allowing file selection in the future, and maybe easier customisation of the grid dimensions. Feedback is always welcome!

version 1.0

You might also like...
Linear encryption software programmed with python
Linear encryption software programmed with python

Echoder linear encryption software programmed with python How does it work? The text in the text section runs a function with two keys entered keys mu

Simple encryption-at-rest with key rotation support for Python.
Simple encryption-at-rest with key rotation support for Python.

keyring Simple encryption-at-rest with key rotation support for Python. N.B.: keyring is not for encrypting passwords--for that, you should use someth

Simple python program to encrypt files with AES-256 encryption

simple-enc Simple python program to encrypt files with AES-256 encryption Setup First install "pyAesCrypt" using pip. Thats it! Optionally you can add

A python implementation of our standard object-oriented encryption package, shipped with most apps.

Encryption Manager (python edition) VerseGroup's native encryption manager adapted for python applications. Function Generate new set of private and p

 C0mptCrypt - An object-oriented, minamalistic, simple encryption library in Python
C0mptCrypt - An object-oriented, minamalistic, simple encryption library in Python

C0mptCrypt allows you to encrypt strings of text. It can only be decrypted using C0mptCrypt and not by random online tools. You can use this for a variety of things from creating passwords, to encrypting HWIDs.

SSEPy: Implementation of searchable symmetric encryption in pure Python
SSEPy: Implementation of searchable symmetric encryption in pure Python

SSEPy: Implementation of searchable symmetric encryption in pure Python Searchable symmetric encryption, one of the research hotspots in applied crypt

gcrypter: an encryption algorithm based on bytes and their correspondent numbers to encode strings
gcrypter: an encryption algorithm based on bytes and their correspondent numbers to encode strings

gcrypter: an encryption algorithm based on bytes and their correspondent numbers to encode strings

Scrambler - Useful File/Directory Encryption Program

This is a program that is used to scramble/encrypt files on your computer. Do not use this program to do malicious things with. I am not responsible for any damage that you do with this software.

Given a string or a text file with plain text , returns his encryption using SHA256 method

Encryption using SHA256 Given a string or a .txt file with plain text. Returns his encryption using SHA256 method Requirements : pip install pyperclip

Comments
  • Secrets

    Secrets

    Changes:

    • Removed "random" module.
    • Added "secrets" module for better cryptographically strong random numbers/randomness.
    • Fixed the clear() function. No longer needs the if checks.
    • Fixed some wording and other things in the print strings and made things feel smoother/better.
    opened by therealOri 1
Releases(v1.0.0)
  • v1.0.0(Mar 5, 2022)

Owner
Matthew
My favourite flavour is vanilla. 🍦
Matthew
This is a basic encryption and decryption program made in python.

A basic encryption and decryption program to visualize how the process of protecting data works.

Junaid Chaudhry 5 Nov 15, 2021
A Python script to implement Hill's Cipher Encryption and Decryption.

Hill_Cipher-Encryption_and_Decryption A Python script to implement Hill's Cipher Encryption and Decryption. Initially in the Encryption part, the Plai

Vishvendra Singh 1 Jan 19, 2022
A simple and secure password-based encryption & decryption algorithm based on hash functions, implemented solely based on python.

pyhcrypt A simple and secure password-based encryption & decryption algorithm based on hash functions, implemented solely based on python. Usage Pytho

Hongfei Xu 3 Feb 8, 2022
Simple encryption/decryption utility using Pycryptodome module. Working with AES and RSA algorithms.

EncypherUtil Simple encryption/decryption utility using PyCryptodome module. Working with AES and RSA algorithms. THIS UTILITY IS NOT LICENSED AS CRYP

Egor Yakubovich 0 Jun 14, 2022
Advanced Digital Envelope System Using Cryptography Techniques (Encryption & Decryption)

Advanced-Digital-Envelope-System Advanced Digital Envelope System Using Cryptography Encryption Techniques The digital envelope system is the techniqu

NelakurthiSudheer 2 Jan 3, 2022
wdepy: Decryption and Inspection for PGP WDE Disks

This is a small python tool to inspect and decrypt disk images encrypted with PGP Whole Disk Encryption (including the Symantec-branded versions like Symantec Drive Encryption). It takes advantage of mutliple cores and should be significantly faster (in my case, ~20X, from 30 hours down to 87 minutes) than the official recovery tool.

Brendan Dolan-Gavitt 17 Oct 7, 2022
Python program that handles the creation, encryption and storage of log/journal files. Kinda works like a diary of sorts.

LucaSoft J.O.U.R.N.A.L The J.O.U.R.N.A.L (Just anOther User Redaction & Navigation Assistant by Lucaspec72) is a Python program that handles the creat

Lucaspec72 8 Oct 27, 2021
Message Encrypt and decrypt software // allows you to encrypt the secrete message and decrypt Another Encryption Message. |

Message-Encrypy-Decrypt-App Message Encrypt and decrypt software // allows you to encrypt the secrete message and decrypt Another Encryption Message.

Abdulrahman-Haji 2 Dec 16, 2021
A lightweight encryption library in python.

XCrypt About This was initially a project to prove that I could make a strong encryption but I decided to publish it so that the internet peoples coul

Anonymous 8 Sep 10, 2022
Python Encryption Name Game

Python 3.9.7 Encryption Name Game Encrypt a name with numbers using a Caesar cipher! You can choose different numbers to encrypt your name from 1 to o

Armand Brunelle 3 Dec 24, 2021