Skip to main content

TBZ (TIBET-zip) — Block-level authenticated compression for the Zero-Trust era

Project description

tbz — TIBET-zip for Python

Block-level authenticated compression for the Zero-Trust era.

Python client for TBZ archives and the Transparency Mirror network. Every block carries its own TIBET provenance envelope and Ed25519 signature. Tampered blocks are rejected before decompression touches memory.

Install

pip install tbz

Quick Start

from tbz import TBZArchive, Mirror

# Read and inspect a TBZ archive (pure Python, no binary needed)
archive = TBZArchive("release.tbz")
info = archive.inspect()
print(f"Blocks: {info['block_count']}, Hash: {info['content_hash']}")

# Verify integrity (uses Rust CLI if available, falls back to Python)
result = archive.verify()
print(result)  # TBZ VERIFIED: 3 blocks (hash + Ed25519), 0 errors

# Look up in the Transparency Mirror (public, no auth needed)
mirror = Mirror()
entry = mirror.lookup("sha256:abc123...")
if entry:
    print(f"Source: {entry['source_repo']}, Attestations: {len(entry['attestations'])}")

# Search by publisher
results = mirror.search(jis_id="jis:ed25519:77214ce9c262843e")

# Mirror stats
stats = mirror.stats()
print(f"Mirror node: {stats['node']}, entries: {stats['total_entries']}")

With Rust CLI (full features)

For full Ed25519 signature verification and pack/unpack support, install the Rust binary:

# From source
git clone https://github.com/jaspertvdm/tbz
cd tbz && cargo build --release
export PATH=$PATH:$(pwd)/target/release

# Then in Python
archive = TBZArchive("release.tbz")
result = archive.verify()  # Full Ed25519 + SHA-256 verification
archive.unpack("./extracted")  # Extract through TIBET Airlock

Transparency Mirror

The Mirror is a distributed trust database for verifying TBZ package provenance. The bootstrap node runs at brein.jaspervandemeent.nl.

from tbz import Mirror

# Default: connects to bootstrap node
mirror = Mirror()

# Custom node
mirror = Mirror(node_url="https://your-mirror.example.com")

# Public endpoints (no auth)
mirror.lookup("sha256:...")   # Look up by hash
mirror.search(verdict="safe") # Search attestations
mirror.stats()                # Node statistics

Links

License

MIT / Apache-2.0

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

tbz-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

tbz-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tbz-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tbz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d713e6fdf8758e73d2b9f1cb792f65e001fb732c37a2d5d898ec43207784017a
MD5 85069bea1dce94eed48e1d44e897f1aa
BLAKE2b-256 c1c9364254a5ba8be445cfd031efc84a3a9d9d4c561654d38ad5d757bc8b886b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tbz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for tbz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b82962f3ed9e91c7ecb9e191f48a2329a3c81f74e13b44d18f59e665c8db9cc
MD5 bfe796309372fa54ce3e272510fcdabb
BLAKE2b-256 adf308131c716cfd4d0361064c5e7be60764b52e60e6428108a4f9a234100342

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