Skip to main content

ZXTX file format support.

Project description

ZXTX

Test status

ZXTX is a secure, compressed, and verifiable file format for structured text and binary data. It supports optional encryption, compression, and cryptographic signing, making it ideal for transmitting sensitive files safely.

Built in Python. Powered by cryptography.

Features

  • AES-256-CTR + HMAC authenticated encryption
  • LZMA and Zlib compression support
  • Ed25519 and RSA signing and verification
  • Structured file format with typed headers and bodies
  • Command-line interface (CLI) for reading, writing, and inspecting .zxtx files

Installation

pip install zxtx

Or with PDM:

pdm add zxtx

Usage

Writing a ZXTX file

zxtx write input.txt output.zxtx --cipher aes256_ctr_hmac --compression zstd --private-key mykey.pem --certificate mycert.pem --password "supersecret"

Reading a ZXTX file

zxtx read example.zxtx output.txt --private-key mykey.pem --public-key pubkey.pem --password "supersecret"

Dumping metadata

zxtx dump example.zxtx --public-key pubkey.pem

Supported Methods

Cipher Methods

  • none
  • aes256_gcm
  • chacha20_poly1305

Compression Methods

  • none
  • zlib
  • lzma
  • brotli

Format Specification

The ZXTX file format is formally documented in SPECIFICATION.md. It defines:

  • Magic header
  • Versioning
  • Field layout
  • Signature embedding, etc

Security Notes

  • ZXTX uses AEAD (authenticated encryption) to prevent tampering.
  • Private keys can be password-encrypted.
  • Signature verification ensures authenticity.
  • Don't share your private key. Use a certificate for signing and a public key for verification.

Python API

from zxtx.highlevel import open

with open("file.zxtx", password=b"secret", public_key=b"...") as f:
    data = f.read_bytes()

See the zxtx.highlevel module for full API details.

License

MIT License – Copyright (c) 2025 voyager-2021 (ZXTX)

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

zxtx-0.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

zxtx-0.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file zxtx-0.1.0.tar.gz.

File metadata

  • Download URL: zxtx-0.1.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.3 Linux/6.11.0-1014-azure

File hashes

Hashes for zxtx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d28a213621b5c5cc0c57a3c313866251607f941c1a81e3273e856c7f9577f8b8
MD5 8a683a7360ea4615e871a32f9d579a10
BLAKE2b-256 352c8e0f44ec10e8745cb9456caa9bc78e22c173425e10045850cad9cb2ab855

See more details on using hashes here.

File details

Details for the file zxtx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zxtx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.24.2 CPython/3.13.3 Linux/6.11.0-1014-azure

File hashes

Hashes for zxtx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e89c65d04de4df2f9f7583aa8b873c8970d86e5cf9ef4d6ce86f4d0a97cde8e
MD5 dc77f41fbc0a305079a01665679b5de4
BLAKE2b-256 b983bea24c75498415bc2991759008e88c488aa7f7c584051ad73f68b95ebae5

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