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
Owner
Damian Panek
I am trying to do something useful.
Damian Panek
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
Image AES256 crypt-decrypt

Image AES256 crypt-decrypt

Damian Panek 37 Nov 09, 2021
Cyber Security Starter Kit Platform

Cyber Security Starter Kit Platform (CSSKP) allows to instantiate new self-assessment products such as Fit4Cybersecurity, Fit4Privacy, Fit4Contract and the like.

CASES Luxembourg 3 Oct 21, 2021
That Hash will name that hash type! Identify MD5, SHA256 and 300+ other hashes Comes with

Call for translators! We're looking for translators to help translate this spec for everyone! Read this documentation in the following languages 한국어 中

All Contributors 6.8k Jan 05, 2023
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
Stenography encryption script

ImageCrypt Project description Installation Usage Project description Project AlexGyver on Python by TheK4n Design by Пашушка Byte packing in decimal

Kan 5 Dec 14, 2022
Atomkraft - Lightweight e2e testing for cosmos blockchains

Atomkraft End-to-end testing of Cosmos blockchains should be easy and reproducib

Informal Systems 57 Dec 16, 2022
Amazing CryptoWAF was a CTF challenge for ALLES! CTF 2021

ctf-cryptowaf The AmazingCryptoWAF ™️ is used by the "noter" web app, to offer automagically military encryption for any user data. Even if an attacke

32 Jan 02, 2023
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

Ayush Gupta 1 Jan 06, 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
Bombcrypto-robot - Python bot to automate BombCrypto game. Updated 01.02.2022

About: This is an open-source bot, the code is open for anyone to see, fork and

LarkoPa 120 Apr 15, 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
Simple bitcoin ticker for the Pimorono Inky pHAT Red.

bitcoin-ticker Simple bitcoin ticker for the Pimorono Inky pHAT Red. Equipment Raspberry Pi Zero W v1.1 or Pi 2 model b v1.1 Pimorono Inky pHAT Red (S

2 Mar 15, 2022
Implementation of Smart Batch Auction for NFT launches on Tezos.

NFT Smart Batch Auction Smart Batch Auctions are an improvement over the traditional first come first serve (FCFS) NFT drops. FCFS design has been in

Anshu Jalan 5 May 06, 2022
Python Dash app that tracks whale activity in cryptocurrency markets.

Introduction Welcome! This is a Python-based Dash app meant to track whale activity in buy / sell walls on crypto-currency exchanges (presently just o

Paul Jeffries 549 Dec 25, 2022
bitcoin-ticker is a E-ink ticker that shows usefull information about bitcoin

bitcoin-ticker bitcoin-ticker is a E-ink ticker that shows usefull information about bitcoin. Due to the limited refresh lifetime, new information is

32 Nov 09, 2022
a BTC mining program based on python3

BTC-Miner a BTC mining program based on python3 Our project refers to the nightminer project by ricmoo, which is written in Python2 (https://github.co

6 Jul 31, 2022
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
Accounting Cycle Program with Blockchain Component

In the first iteration of my accounting cycle program, I talked about adding in a blockchain component that allows the user to verify the inegrity of

J. Brandon Walker 1 Nov 29, 2021
A bot that escrows crypto transactions on Reddit

EscrowBot I NEED BCH TESTNET FOR TESTING. Please send me some BCH testnet if you have some: bchtest:qz5eur3prqyvd8u77m6fzf9z6cruz9q7vq4qvgdnuk Depende

Nathan Lim 10 Nov 10, 2022