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
import getpass, vaulty

v = vaulty.Vaulty()

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

plaintext = v.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.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

pyvaulty-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pyvaulty-1.0.1.tar.gz.

File metadata

  • Download URL: pyvaulty-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pyvaulty-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cb7ffffa70aa1b574ba07d1027e1487ba971afe9e23aeb738d6289313ebea79e
MD5 f3d5c4d28d948e06d64b570156fa1035
BLAKE2b-256 9d35eac04234593b51671ed2cad63a8382dce03fff85e334a217e54e1fd5eb94

See more details on using hashes here.

File details

Details for the file pyvaulty-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyvaulty-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pyvaulty-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18dc356bc7ef3a64fed2fe688769f53b36eb8553b8e09813adc5628ef8b19bc9
MD5 7b29153515c8645486f3f58067dd2186
BLAKE2b-256 d0b796c1722873dcb409e6adebae3a797d047261617edc4ecd654d6607511efe

See more details on using hashes here.

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