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
Connects to an active BitCoin Peer and communicates in order to locate a specific block number (height)

BitCoin-Peer-Client Connects to an active BitCoin Peer, and locates a predetermined block number (height) by downloading block headers. Once required

Henry Song 1 Jan 16, 2022
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
Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.

Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.

Mihir Shrestha 834 Dec 30, 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
Alpkunt 9 Sep 09, 2022
Simple one-time pad (OTP) encryption

Introduction What you will make In this resource you will learn how to create and use an encryption technique known as the one-time pad. This method o

Rabih ND 6 Nov 06, 2022
Cryptocurrency with implementet Blockchain

Cryptocurrency with implementet Blockchain

Mario 1 Mar 24, 2022
Solutions to all 6 programming assignments in Dan Boneh's course Cryptography I, in statically typed Python.

Solutions to Cryptography I programming exercises Dan Boneh from Stanford University has an excellent online course on cryptography, hosted on Courser

Axel Lindeberg 8 Dec 16, 2022
Coins farmer for dank memer

Created by TheRider#5308 [feel free to drop by to talk]. Note to some Dank Memer staff reading this: Nah I don't self bot, already got banned for that

Siddhant Kumar 3 Nov 10, 2021
The Qis|krypt⟩ is a software suite of protocols of quantum cryptography and quantum communications

The Qis|krypt⟩ is a software suite of protocols of quantum cryptography and quantum communications, as well, other protocols and algorithms, built using IBM’s open-source Software Development Kit for

Qiskrypt 14 Oct 31, 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
Hasher Hash, Compare and Verify your files Translations

Hasher Hash, Compare and Verify your files Translations In order to translate Hasher to a language you must add a folder with the language abbreviatio

Jeyson Flores 14 Apr 01, 2022
A python-jvm wrapper for interacting with the Ergo blockchain.

ergpy A python-jvm wrapper for interacting with the Ergo blockchain. Usage Requires Java 8 or higher to be installed on system pip install JPype1 pip

mgpai 16 Oct 05, 2022
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
Python based project to pull useful account statistics from the Algorand block chain.

PlanetWatchStats Python based project to pull useful account statistics from the Algorand block chain. Setup pip install -r requirements.txt Run pytho

M0x40 1 Jan 27, 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
Image Encryption/Decryption based on Rubik Cube 's principle and AES

Image Encryption/Decryption based on Rubik Cube 's principle and AES Our final project for Theory of Crytography class. Our Image Encryption/Decryptio

Danny 5 Apr 11, 2022
Lottery by Ethereum Blockchain

Lottery by Ethereum Blockchain Set your web3 provider url in .env PROVIDER=https://mainnet.infura.io/v3/YOUR-INFURA-TOKEN Create your source file .

John Torres 3 Dec 23, 2021
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 encryp

c0mpt0 4 Aug 22, 2022
Block Chain for RiceSupply Chain and Agriculture Traceability

Block Chain for RiceSupply Chain and Agriculture Traceability Project Under Development Folder: Building a BlockChain Basic blockchain structure using

Chandru S Raghavan 3 Jan 19, 2022