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
# Short aliases (because life is too short for tar -xvf)
tbz p ./src -o release.tbz # pack
tbz x release.tbz # extract
tbz v release.tbz # verify
tbz i release.tbz # inspect
# Smart mode — just give it a path
tbz release.tbz # .tbz file → verify + unpack
tbz ./src # directory → pack
# 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
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 tbz-0.1.1.tar.gz.
File metadata
- Download URL: tbz-0.1.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
175e05beef19310cb571e47ba748f5ddab62f8472fd8b61f21d42c540b90aa11
|
|
| MD5 |
30d8a5f58f8ce6bebcf8ea2400c07013
|
|
| BLAKE2b-256 |
8f7fef2805900145272dc989275578cfcd00db8af0a405dca58e1836b73f6078
|
File details
Details for the file tbz-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tbz-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e11cf2bd9b5b0adfe786b490c66b479aeb90652589658b304e9cd91c49ffd045
|
|
| MD5 |
60838928042530ea0e7e1b30bf452235
|
|
| BLAKE2b-256 |
fce4a13ce0849085856eb67b9f7e8b5f6466347ed23fa6628f92cca827f7da76
|