Skip to main content

Encrypts and decrypts files using a pass phrase.

Project description

This Python package provides tools for encrypting and decrypting files with Daniel Bernstein’s ChaCha20 stream cipher, using a key derived from a pass phrase. Encrypted files include a Poly1305 authentication tag to detect tampering with an encrypted file.

Warning

This is still a work in progress, published here for testing only. Do not use it for anything important. The file formats and encryption algorithms are subject to change, which could leave you with encrypted files that you cannot decrypt.

Installation

Install this package with pip:

python3 -m pip install --pre chafe

The pypi package name is “chafe”. The python module installed with this command is named “chacha”. The –pre option is needed because the current version of this package is a pre-release.

Usage

The package provides two entry points named encrypt and decrypt. That means that if this module is in your Python path then the module can be used as follows:

To encrypt a file named myfile:

% python3 -m chacha.encrypt myfile

You will be prompted for a password, and an encrypted file named myfile.cha will be created. The password will be visible until the encryption is finished, then erased. (So write it down first!)

To decrypt myfile.cha:

% python3 -m chacha.decrypt myfile.cha

You will be prompted for the password, and a decrypted file named myfile will be created. The password will be visible until the decryption is finished, then erased.

If you install this module with pip and have configured you path to make pip-installed scripts available, then the commands will simply be:

% chacha-encrypt myfile

and

% chacha-decrypt myfile.cha

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

chafe-1.0.0a6.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chafe-1.0.0a6-cp312-cp312-macosx_10_9_universal2.whl (120.6 kB view details)

Uploaded CPython 3.12macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file chafe-1.0.0a6.tar.gz.

File metadata

  • Download URL: chafe-1.0.0a6.tar.gz
  • Upload date:
  • Size: 65.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.5

File hashes

Hashes for chafe-1.0.0a6.tar.gz
Algorithm Hash digest
SHA256 433b8aab9e05a18ee3cee525dabed86361a4fa52c451b2ca877180f900228142
MD5 f72e82052573b590f61f446dfd88c0d6
BLAKE2b-256 1e6d96a99405d3841def1e8a05139ad9c48714c8b02354255a90193cd796ce36

See more details on using hashes here.

File details

Details for the file chafe-1.0.0a6-cp312-cp312-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for chafe-1.0.0a6-cp312-cp312-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f1d55794ebcb58d43018a2de3f2d332e35c838c50dc35f1a77a1df88c5a18dad
MD5 9fcc31b7ad0c8f3fb6bfec8b1110688b
BLAKE2b-256 5a1220e43530b885e59aec1e65bd0f2a654d11b8f852591ff6d722a3e34e1949

See more details on using hashes here.

Supported by

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