Image AES256 crypt-decrypt

Overview

img-cryptor

did you ever have to encrypt your data cause it is so sensitive that you cannot store it on hdd to read in normal batch processing? No? But I do, sadly.

key, initialize vector creation, AES256, store images with .enc extension.In progress.

Example usage:

Assuming that you'll store your image in example folder and save your keys in .bin format you can change your config param to provide an proper encryption.

CONFIG.YAML 


IN_PATH : PATH of your input image 
OUT_PATH : PATH of encrypted file 
INVERSE_PATH : PATH OF DECRYPTER FILE 
IV_PATH : PATH TO INITIALIZE VECTOR 
KEY_PATH : PATH TO KEY

Decryption

Decryption part is very simple, but I decided to omit image saving part because storing data in memory is the most important part. So, assuming that you have you data stored and proper defined in config file.

import numpy as np 
from src import Cryptor, Decryptor 
from src.utils import read_key, read_config 


def main():

	
	config = read_config('config/config.yaml')	
	path = config['OUT_PATH']
	outpath = config['INVERSE_PATH']
	_key = read_key(config['KEY_PATH'])
	_iv = read_key(config['IV_PATH'])
	size = (258, 258, 3)	
	decr = Decryptor(path = path, outname = outpath, create = False, _key = _key, _iv = _iv)

	dect._write_data()

	# You should store image size if you want to return data in np. like format 
	_obj = np.frombuffer(decr._decrypt(), dtype = np.uint8).rehspae(size)


To dos:

- FastAPI like inference
- Add module to pytorch dataloader
You might also like...
A short code in python, Enchpyter, is able to encrypt and decrypt words as you determine, of course

Enchpyter Enchpyter is a program do encrypt and decrypt any word you want (just letters). You enter how many letters jumps and write the word, so, the

Vhost password decrypt for python
Vhost password decrypt for python

vhost_password_decrypt Where is symkey.dat Windows:C:\ProgramData\VMware\vCenterServer\cfg\vmware-vpx\ssl\symkey.dat Linux:/etc/vmware-vpx/ssl/symkey.

This program can encrypt/ decrypt any string

Ceasar_cipher Hey this is J0ey, this program is a very basic Caesar cipher encoder/decoder. In order to use this program, you will need to have Python

A Python module to encrypt and decrypt data with AES-128 CFB mode.

cryptocfb A Python module to encrypt and decrypt data with AES-128 CFB mode. This module supports 8/64/128-bit CFB mode. It can encrypt and decrypt la

Hide secret texts inside an image, optionally encrypt them with a password using AES-256.
Hide secret texts inside an image, optionally encrypt them with a password using AES-256.

Hide secret texts/messages inside an image. You can optionally encrypt your texts with a password using AES-256 before encoding into the image.

Hide secret data within a digital image using good ol' terminal
Hide secret data within a digital image using good ol' terminal

pystego Hide secret data within a digital image using good ol' terminal Installation The recommended way for installing this package is using, python

A Docker image for plotting and farming the Chia™ cryptocurrency on one computer or across many.
A Docker image for plotting and farming the Chia™ cryptocurrency on one computer or across many.

An easy-to-use WebUI for crypto plotting and farming. Offers Plotman, MadMax, Chiadog, Bladebit, Farmr, and Forktools in a Docker container. Supports Chia, Cactus, Chives, Flax, Flora, HDDCoin, Maize, N-Chain, Staicoin, and Stor among others.

A discord bot to crop an NFT image living on the Solana blockchain.

NFT Discord Cropper This discord bot crops an NFT in your set measures by getting it through the .cache file which has been used to make a candy machi

Python Steganography data hiding in image

Python-Steganography Python Steganography data hiding in image data encryption and decryption im here you have to import stepic module 1.open CMD 2.ty

Owner
Damian Panek
I am trying to do something useful.
Damian Panek
⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡

⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡

null 11.2k Jan 9, 2023
Alpkunt 9 Sep 9, 2022
This program can encrypt and decrypt your files so that they can no longer be identified.

File_Cryptographer Table of Contents: About the Program Features Requirements Preview Credits Reach Me See Also About the Program: with this program,

Sina.f 6 Nov 20, 2022
Hyval will store your information encrypted and decrypt it when needed

Hyval will store your information encrypted and decrypt it when needed

soroush safari 3 Oct 31, 2021
Powerful Tool to encrypt and decrypt files using AES.

AEScryptor Tool Description Encrypt and Decrypt files with AES-128 (16bytes key). AES mode = CFB (cipher Feedback) security = super safe! Usage [1] Ch

null 5 Jan 12, 2022
Small utility to encrypt and decrypt messages

Safe Safe is a small utility to encrypt and decrypt messages using a pair of public and private keys. Installation You need to have GPG installed in y

Gustavo Eguez 2 Dec 21, 2021
Encrypt decrypt files - Programmed in Python | PySimpleGUI

Crypter Programmed in Python | PySimpleGUI If you like it give it a star How it works Crypter program use Fernet for encryption. Fernet guarantees tha

Adrijan 11 Jun 18, 2022
PyCrypter , A Tool To Encrypt/Decrypt Text/Code With Ease And Safe Using Password !

PyCrypter PyCrypter , A Tool To Encrypt/Decrypt Text/Code With Ease And Safe Using Password ! Requirements pyfiglet And colorama Usage First Clone The

null 1 Nov 12, 2021
Vaulty - Encrypt/Decrypt with ChaCha20-Poly1305

Vaulty Encrypt/Decrypt with ChaCha20-Poly1305 Vaulty is an extremely lightweight encryption/decryption tool which uses ChaCha20-Poly1305 to provide 25

Chris Mason 1 Jul 4, 2022
Enchpyter, is able to encrypt and decrypt words as you determine, of course, according to the alphabet.

Enchpyter is a program do encrypt and decrypt any word you want (just letters). You enter how many letters jumps and write the word, so, the program encrypt for you in seconds.

João Assalim 2 Oct 10, 2022