encrypt files with aes-256-gcm or chacha20-poly1305
Project description
crypto tool v2
encrypt files with aes-256-gcm or chacha20-poly1305. also does multi-layer.
wat it does
- AES-256-GCM — nist aproved, fast on most cpus
- ChaCha20-Poly1305 — good for mobiles and no aes-ni
- Multi-Layer — multiple layers, each layer uses a diffrent key
- PBKDF2 or Argon2id for key derivashun
- RSA key gen and stuff (asymmetric)
- HMAC integrety check on top
output
encrypted files are pure binary. no metadata, no json, no readable text. just bytes: 43 52 59 32 01 00 01 00 ...
instal
pip install cryptography argon2-cffi
usage
command line
# enc
python professional_crypto.py -e myfile.txt -o myfile.enc
# dec
python professional_crypto.py -d myfile.enc -o myfile_decrypted.txt
# use chacha20
python professional_crypto.py -e myfile.txt -a chacha20
# multi-layer (3 layers)
python professional_crypto.py -e myfile.txt -a multi-layer -l 3
# disable argon2 (use pbkdf2)
python professional_crypto.py -e myfile.txt --no-argon2
python api
from professional_crypto import Cryp
c = Cryp()
# enc
c.encrypt('myfile.txt', 'myfile.enc', 'password123',
algo='aes-gcm', layers=1, use_argon=True)
# dec
c.decrypt('myfile.enc', 'myfile_decrypted.txt', 'password123')
# rsa
priv, pub = c.gen_rsa(4096)
c.save_rsa(priv, pub, 'keypassword', 'priv.pem', 'pub.pem')
p = c.load_priv('priv.pem', 'keypassword')
notes
- password is asked twise for enc, once for dec (obviusly)
- encrypted files are not backwards compatable (new format)
- multi-layer uses more ram and time
- use a strong password (12+ chars)
license
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file encrypt_decrypt_pythons-2.0.0.tar.gz.
File metadata
- Download URL: encrypt_decrypt_pythons-2.0.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f03822acbebb0cce7b0db00aae4d41cc6bad57723a5ffe6c2eab9583162f925
|
|
| MD5 |
7a62f36c87e9ac10585f9741c9d3b1ea
|
|
| BLAKE2b-256 |
838c65316614efc5b36cdc3d9328c24a933b507cd34db68b6e0fc282e25a61aa
|
File details
Details for the file encrypt_decrypt_pythons-2.0.0-py3-none-any.whl.
File metadata
- Download URL: encrypt_decrypt_pythons-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bac314aab1c14aaa6f98a1114d897a3d1d10d79d4ddaa25d6462fc6c10ca3bdc
|
|
| MD5 |
767dde96146c763483e6c105db062a4d
|
|
| BLAKE2b-256 |
8fe3257346ba53296001eb9bf2bd8d82c7f5156e95311d49b97ac9433b0d7b8f
|