Skip to content

About

This program encrypts the data in many forms , can also be decrypted using the key. To demonstrate my understanding about encryption/decryption.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

71 Commits

Folders and files

Repository files navigation

Encryptor

A little toolkit for encoding, hashing and encrypting text. Works from the terminal or from the web page.

SETUP

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

USAGE

CLI:

python cli.py encode 64 "hello"
python cli.py decode morse "... --- ..."
python cli.py hash sha "hello" --algo sha512
python cli.py hash salt "my password"
python cli.py encrypt aes "secret" --key mypassword --mode gcm
python cli.py encrypt fernet "secret" --password mypassword
python cli.py genkey rsa

actions - encode, decode, encrypt, decrypt, hash, genkey

methods - 32, 64, hexa, url, morse / aes, fernet, rsa / md5, sha, blake2, salt, pepper

Web:

python Web/web.py

then open http://127.0.0.1:5000

SOME NOTES

  • AES puts the salt and IV inside the output itself, so the password is the only thing you need to decrypt it. ECB is in there because the UI lists it, don't actually use it.
  • Fernet takes either a raw key or a password. Leave the key box empty on the web page and it makes one for you (and shows it, so don't lose it).
  • RSA can only encrypt short text, around 190 bytes with a 2048 bit key.
  • MD5 is only there for checksums, not for passwords.

FILE STRUCTURE

Py_encryptor/
│
├── encoding/                    # Base encoders / decoders
│   ├── __init__.py
│   ├── base64_tool.py
│   ├── base32_tool.py
│   ├── hex_format.py
│   ├── urlsafe.py
│   └── morse_code.py
│
├── hashing/                     # Hashing + salting
│   ├── __init__.py
│   ├── sha.py
│   ├── md5.py
│   ├── blake2.py
│   ├── salting.py
│   └── peppering.py
│
├── encryption/                  # Symmetric + asymmetric encryption
│   ├── __init__.py
│   ├── aes.py
│   ├── fernet.py
│   ├── rsa.py
│   └── utils.py                 # key derivation, key/iv generation
│
├── cli.py                       # Command line interface
│
├── Web/                         # Flask web app
│   ├── __init__.py
│   ├── web.py                   # main Flask runner
│   ├── static/
│   │   ├── style.css
│   │   └── script.js
│   └── templates/
│       └── index.html
│
├── tests/                       # Unit tests (not written yet)
│
├── requirements.txt
├── Readme.md
└── LICENSE

LICENSE

MIT

About

This program encrypts the data in many forms , can also be decrypted using the key. To demonstrate my understanding about encryption/decryption.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages