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
Salted Crypto Python library

Salted Crypto Python library. Allows to encrypt and decrypt files and directories using popular cryptographic algorithms with salty key(s).

7 Jul 18, 2022
Discord webhooks for alerting crypto currency price changes & historical data.

Crypto-Discord Discord Webhooks for alerting crypto currency price changes & historical data. Create virtual environment and install requirements. $ s

Филип Арсовски 1 Sep 02, 2022
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
Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server.

Certbot is EFF's tool to obtain certs from Let's Encrypt and (optionally) auto-enable HTTPS on your server. It can also act as a client for any other CA that uses the ACME protocol.

29.5k Dec 31, 2022
G-Research-Crypto-Competition - Project for passing the ML exam. Dataset took from the competition on the kaggle

G-Research-Crypto-Competition Project for passing the ML exam. Dataset took from

5 Jan 09, 2022
Deribit_Algo_Project_Python - Deribit algo project written in python trading crypto futures

This is a Algo/script trading for Deribit. You need an account with deribit, to

24 Jan 09, 2023
Buckley 2 Jul 24, 2022
Bridge between L1 (Ethereum) and L2 (cheapETH)

The ETH chain and the cheapETH chain. We can assume the ETH chain has ~1000x more value than the cheapETH chain.

107 Oct 12, 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
Basic Ethereum Miner Lib

EthMine ⛏ Basic Ethereum Miner Library. Developers can integrate this algorithm to mine blocks from their ethereum supported chain efficiently. Instal

Jaival Patel 1 Oct 30, 2021
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

Dann Luciano 1 Dec 23, 2021
A Trading strategy for the Freqtrade crypto bot.

Important Thing to notice 1) Do not use this strategy on live. It is still undergoing dry-run. 2) The Hyperopt is highly optimized towards "shitcoin"

160 Dec 26, 2022
Python implementation of EIP 1577 content hash

ContentHash for Python Python implementation of EIP 1577 content hash. Description This is a simple package made for encoding and decoding content has

Filip Š 11 Jul 19, 2022
A workshop to build an NFT smart contract on the polygon blockchain

Polygon NFT Workshop This is an interactive workshop that guides you through the steps to deploy an NFT smart contract on the Polygon blockchain. By t

Banjo Obayomi 56 Oct 14, 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
E2EE disabling plugin for Synapse

E2EE disabling plugin for Synapse This Pluggable Module disables end-to-end encryption in a self-hosted Synapse servers. It works by stripping out req

Konstantin Sharlaimov 9 Nov 30, 2022
The Intelligent Bitcoin Miner, Part II

The Intelligent Bitcoin Miner, Part II At a Glance This app simulates the behavior and profitability of Bitcoin miners for The Intelligent Bitcoin Min

Karim Helmy 20 Dec 16, 2022
Tracking (of choice) cryptocurrencies' daily prices and moving average.

Crypto-price-moving_average Tracking (of choice) cryptocurrencies' daily prices and moving average. About Alpha Vantage The Alpha Vantage library (htt

Thong Huynh 2 Jan 22, 2022
J. Brandon Walker 1 May 13, 2022