AES-256-GCM file and directory encryption with chunked streaming and optional splitting.
Project description
vault-tar
AES-256-GCM file and directory encryption with chunked streaming, configurable compression, and optional output splitting.
Features
- AES-256-GCM authenticated encryption with PBKDF2-HMAC-SHA256 key derivation (1 200 000 iterations by default).
- Chunked streaming — encrypts/decrypts in 1 MiB chunks so memory usage stays constant regardless of input size.
- Compression — choose between
xz,gz,bz2,zst(Python ≥ 3.14), ornone. - Output splitting — split encrypted output into fixed-size parts (default 1 GiB) for easier storage and transfer.
- Single-file mode — encrypt/decrypt individual files without tar archiving.
- Directory comparison — recursively compare two directory trees after a round-trip to verify integrity.
- Progress bars — optional verbose mode (
-v) with real-time byte-level progress during compression, encryption, and decryption.
Requirements
- Python ≥ 3.12
cryptography≥ 43.0
Installation
From PyPI
pip install vault-tar
From source
git clone https://github.com/l1asis/vault-tar.git
cd vault-tar
pip install .
Usage
After installation the vtar command is available on your PATH.
Encrypt directories
vtar encrypt -i secret_docs/ photos/ -o encrypted -v
Encrypt with a specific algorithm
vtar encrypt -i data/ -o data --algorithm zst -v # zstandard (Python ≥ 3.14)
vtar encrypt -i data/ -o data --algorithm gz -v # gzip
vtar encrypt -i data/ -o data --algorithm none -v # tar only, no compression
Encrypt a single file (skip archiving)
vtar encrypt -i backup.sql -o backup.enc --file-only --no-split
Decrypt
vtar decrypt -i encrypted -o restored/ -v
vtar decrypt -i backup.enc -o backup.sql --file-only
Compare directories
Verify that decrypted output matches the original:
vtar compare original/ restored/ -v
Additional options
| Flag | Description |
|---|---|
-v, --verbose |
Show progress bars and status messages |
--password TEXT |
Supply password on command line (prompted if omitted) |
--algorithm {xz,gz,bz2,zst,none} |
Compression algorithm (default: xz) |
--compression-level N |
Algorithm-specific compression level |
--chunk-size SIZE |
Plaintext chunk size (default: 1MiB) |
--split-size SIZE |
Max part-file size (default: 1GiB) |
--no-split |
Write a single output file |
--file-only |
Encrypt/decrypt a single file directly |
--cleanup |
Remove original input after success |
-V, --version |
Show version and exit |
Sizes accept human-readable suffixes: KiB, MiB, GiB.
File format
All encrypted output follows a custom binary format (v1):
Header (first part only):
[2 B] magic 0xEF01
[1 B] format version 0x01
[2 B] salt length [N B] salt
[2 B] base-nonce length [12 B] base nonce
Chunks (sequential across parts):
[4 B] ciphertext length [N B] ciphertext (plaintext + 16 B GCM tag)
Each chunk uses a unique nonce derived as base_nonce XOR chunk_index
(big-endian, 12 bytes) with AAD b"chunk_<index>".
Security
See SECURITY.md for the threat model, cryptographic details, known limitations, and responsible disclosure policy.
Acknowledgments
Built with assistance from GitHub Copilot (Claude Opus 4.6).
License
MIT — Copyright 2026 Volodymyr Horshenin
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 vault_tar-0.1.0.tar.gz.
File metadata
- Download URL: vault_tar-0.1.0.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4907a5407e5be7c139ebb0ed9ffcb86ea91387e7ed2a1ad9619e6cf0897773d
|
|
| MD5 |
85504f205ea210ea4186401efd219a87
|
|
| BLAKE2b-256 |
2ed1a7074bfa3ce7c39a5216e729a8c04523104ae54d1c40f424e3044faab11c
|
Provenance
The following attestation bundles were made for vault_tar-0.1.0.tar.gz:
Publisher:
publish-to-pypi.yml on l1asis/vault-tar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vault_tar-0.1.0.tar.gz -
Subject digest:
f4907a5407e5be7c139ebb0ed9ffcb86ea91387e7ed2a1ad9619e6cf0897773d - Sigstore transparency entry: 927175038
- Sigstore integration time:
-
Permalink:
l1asis/vault-tar@ed9e36d7e0b6ec75c6a03d81a7521307f94ee2e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/l1asis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@ed9e36d7e0b6ec75c6a03d81a7521307f94ee2e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vault_tar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vault_tar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323cb1024944d7bd0e999e8f19f2672eb6a0c591a10535dc07a0696351876b6d
|
|
| MD5 |
255636a6c8dae835ec418e5a9e1a77ba
|
|
| BLAKE2b-256 |
f8704897e35b71bb1fd3f15c8585313785c5b9ed2767af6382f856dd8171b647
|
Provenance
The following attestation bundles were made for vault_tar-0.1.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on l1asis/vault-tar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vault_tar-0.1.0-py3-none-any.whl -
Subject digest:
323cb1024944d7bd0e999e8f19f2672eb6a0c591a10535dc07a0696351876b6d - Sigstore transparency entry: 927175040
- Sigstore integration time:
-
Permalink:
l1asis/vault-tar@ed9e36d7e0b6ec75c6a03d81a7521307f94ee2e8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/l1asis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@ed9e36d7e0b6ec75c6a03d81a7521307f94ee2e8 -
Trigger Event:
push
-
Statement type: