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.2.tar.gz (28.1 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.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zxtx-0.1.2.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for zxtx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 236038c85d6de329005685ffdf4f4342adaeab3e8c103acff484893a4388b889
MD5 968092ff30f86b78043bf25945c68396
BLAKE2b-256 7af625de63d97e79477af0b135bb829ac5839301520576fc90bc222200045cb0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zxtx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for zxtx-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 321fe3ce339d320d75e5f0e79785c1f054a6072b6b50c31d997bb8dfcad0f60b
MD5 45af413d53a6099cd9340f4bc8492f8a
BLAKE2b-256 487c5dd40f6a2ddbce0efa09543f2d68cd154e31e00c25ad2ea2183a055bd9c9

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