Skip to main content

Encrypt/Decrypt with ChaCha20-Poly1305

Project description

Vaulty

Encrypt/Decrypt with ChaCha20-Poly1305

Vaulty is an extremely lightweight encryption/decryption tool which uses ChaCha20-Poly1305 to provide 256-bit authenticated encryption (AEAD) using Scrypt as the password based key derivation function. It can be used to encrypt/decrypt files, or stdin if you don't specify any files - it is written in Python and requires Python 3.

If encrypting stdin then the output will be Base64 encoded whereas if encrypting a file then it won't and it will have a .vlt extension added to indicate it has been encrypted.

It relies on the cryptography Python module to provide the routines for ChaCha20-Poly1305 and Scrypt.

Installation

python3 -m pip install --upgrade --user pyvaulty

Vaulty Usage

vaulty encrypt|decrypt [file1[ file2[ ...]]]

Example Usage

echo "Hello World" | vaulty encrypt
$VAULTY;AY3eJ98NF6WFDMAP62lRdl58A2db5XJ2gNvKd0nmDs5ZrmNlJ8TSURpxc3bNF1iGw77dHA==

echo "$VAULTY;..." | vaulty decrypt
Hello World
from getpass import getpass
from vaulty import Vaulty

password = getpass('Vaulty Password: ').encode('utf-8')
ciphertext = Vaulty().encrypt('Hello World'.encode('utf-8'), password)

plaintext = Vaulty().decrypt(ciphertext, password).decode('utf-8')
if plaintext is None:
  print('error: invalid password or data not encrypted', file=sys.stderr)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvaulty-1.0.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

pyvaulty-1.0.0-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page