Gridlock - Encryption and decryption python project

Related tags

Cryptographygridlock
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'[email protected]}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'[email protected]}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
Alpkunt 9 Sep 09, 2022
A simple web application with tools of cryptography, made with Flask and Cryptography.

Crypto Tools A web application made with Flask that allows the use of some cryptography tools like message digest, RSA key pair generation and a decip

Felipe Valentin 0 Jan 20, 2022
Audits Python environments and dependency trees for known vulnerabilities

pip-audit pip-audit is a prototype tool for scanning Python environments for packages with known vulnerabilities. It uses the Python Packaging Advisor

Trail of Bits 701 Dec 28, 2022
Python Cryptocurrency with stealth addresses

Python Cryptocurrency with stealth addresses. Goal is to have create a cryptocurency that hides transactions totally. I.E. Cant see ammount sent, to who, or from who.

3 Aug 04, 2022
Mina is a new cryptocurrency with a constant size blockchain, improving scaling while maintaining decentralization and security.

Mina Mina is the first cryptocurrency with a lightweight, constant-sized blockchain. This is the main source code repository for the Mina project. It

1.6k Jan 07, 2023
Crypto-curriences analysis

Crypto_analysis Discription: simple streamlit(screener) app to make MMA and OSC analysis for cyrpto-currenices, and gives resaults for which coins are

13 Nov 01, 2021
Token drop template on Tezos blockchain, based on Merkle Tree Distribution mechanism.

🛬 Token Drop Template This is a template to perform token drops efficiently on Tezos blockchain. The drop is handled using Merkle Tree Distribution m

Anshu Jalan 5 Oct 11, 2022
A simple program written in python to convert: USD, EUR & BTC to BRL

CoinsPrice This is a simple program written in python to convert: USD EUR BTC to BRL, and I used an API to get coins price. Take a look at the window

Luiz Henrique 1 Feb 09, 2022
blockchain address database

Blockchain Address Ownership Database The database is in data/addresses.db This is a SQLite database of addresses from several blockchains. It's obtai

37 Nov 26, 2022
Zach Brewer 1 Feb 18, 2022
This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3.

This is a simple Bitcoin non-deterministic wallet address generator coded in Python 3. It generates a Private Key in different formats (hex, wif and compressed wif) and corresponding Public Addresses

7 Dec 22, 2022
I coded the sha256 algorithm into python without using any modules.

sha256.py I coded the sha256 algorithm in python without using any modules. The purpose of the code was to better understand the algorithm and learn h

4 Dec 12, 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 03, 2022
Python App To Encrypt Data (image, text, all data)

Python App To Encrypt Data (image, text, all data)

1 Oct 29, 2021
This is a webpage that contains login and signup page by which the password is stored using elliptic curve cryptography

LoginPage_using_Elliptic_curve_cryptography- This is a webpage that contains login and signup page by which the password is stored using elliptic curv

1 Oct 15, 2021
The leading native Python SSHv2 protocol library.

Paramiko Paramiko: Python SSH module Copyright: Copyright (c) 2009 Robey Pointer 8.1k Jan 08, 2023

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
Gearbox-vyper-contracts - Auxillary contracts for the Gearbox Protocol written in Vyper

Gearbox Vyper Contracts Auxillary contracts for the Gearbox Protocol written in

Edward Amor 4 Jan 07, 2022
Encrypt Your Script Python

EncryptScritpPY Encrypt Your Script Python This Script For Encrypt Your File Python Tutorial Install [+] Open Termnal [+] Type: git clone https://gith

1 Oct 07, 2021
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

Verse Group LLC 2 Oct 30, 2022