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.1.tar.gz (17.3 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.1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zxtx-0.1.1.tar.gz
  • Upload date:
  • Size: 17.3 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.1.tar.gz
Algorithm Hash digest
SHA256 43f98c5becf33f8dfc56ded76de4fd4cf22683feb8faaeed533032812e45c2e9
MD5 a9925302c162319f992289abdea8a39d
BLAKE2b-256 70044d0394f1af8ddf9b87e1b28f44727608d0e26004857492dcace471f77135

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zxtx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 818444631298357230e8ff203d61f7823547ffd40fe31c60eec6d44f9c748814
MD5 b1179888af03707b67e245f3854a7604
BLAKE2b-256 cecf6b2c07d7aa75123309080d57fff4431548012f25520817d331a78ed00abd

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