H33 Post-Quantum Encryption SDK — Kyber + AES-256-GCM hybrid encryption, FHE biometrics, and more
Project description
h33 — Post-Quantum Encryption SDK for Python
The official Python SDK for H33, the post-quantum encryption platform delivering 1.6M authentications/sec with lattice-based cryptography.
Install
pip install h33
Quick Start
from h33 import H33Client
client = H33Client(api_key="h33_live_...", base_url="https://api.h33.ai")
# Post-quantum storage encryption (Kyber + AES-256-GCM)
result = client.encrypt_blob(b"sensitive data")
ciphertext = result["ciphertext_b64"]
key_id = result["key_id"]
# Decrypt
plaintext = client.decrypt_blob(ciphertext, key_id)
assert plaintext == b"sensitive data"
Storage Encryption
Encrypt data at rest with hybrid post-quantum encryption (ML-KEM/Kyber + AES-256-GCM):
from h33 import StorageClient
storage = StorageClient(api_key="h33_live_...")
# Encrypt with optional authenticated data
result = storage.encrypt(b"patient record", aad=b"user:12345")
print(result["key_id"]) # Kyber key ID for decryption
# Decrypt
plaintext = storage.decrypt(result["ciphertext_b64"], result["key_id"], aad=b"user:12345")
# Field-level encryption with automatic sensitivity classification
fields = storage.encrypt_fields([
{"name": "ssn", "value": "123-45-6789"},
{"name": "name", "value": "Jane Doe"},
{"name": "email", "value": "jane@example.com"},
])
# Each field gets a sensitivity level (Confidential, Internal, etc.)
# Key rotation — re-encrypt under the current active key
rotated = storage.rotate(result["ciphertext_b64"], result["key_id"])
Client-Side FHE (Homomorphic Encryption)
Encrypt biometric embeddings on the client so the server never sees plaintext:
from h33 import FheEncryptor
# Load public key from H33 API
enc = FheEncryptor.from_public_key("public_key.json", embedding_dim=128)
# Encrypt a 128-dimensional face embedding
embedding = [0.1, 0.2, 0.03, ...] # from your ML model
ciphertext_json = enc.encrypt_embedding(embedding)
# Send ciphertext to H33 for matching — server operates on encrypted data
Requires the h33-fhe-client native library. Build from source:
cd h33-fhe-client && cargo build --release
API Reference
H33Client
| Method | Description |
|---|---|
health() |
Check API status |
send_code(phone) |
Send SMS OTP for authentication |
verify_code(phone, code) |
Verify OTP and get session |
create_key(label) |
Create a new API key |
list_keys() |
List all API keys |
revoke_key(key_id) |
Revoke an API key |
encrypt_blob(plaintext, aad) |
PQ-encrypt arbitrary data |
decrypt_blob(ciphertext_b64, key_id, aad) |
Decrypt PQ-encrypted data |
encrypt_fields(fields) |
Field-level PQ encryption |
rotate_encryption(ciphertext_b64, old_key_id, aad) |
Re-encrypt under current key |
fhe_schemes() |
List available FHE schemes |
noise_estimate(n, t, q_bits, operations) |
Estimate FHE noise budget |
StorageClient
Convenience wrapper for encryption-only workflows:
| Method | Description |
|---|---|
encrypt(plaintext, aad) |
Encrypt bytes |
decrypt(ciphertext_b64, key_id, aad) |
Decrypt bytes |
encrypt_fields(fields) |
Field-level encryption |
rotate(ciphertext_b64, old_key_id, aad) |
Key rotation |
Platform
H33 is the world's fastest post-quantum authentication platform:
- 1.6M auth/sec on AWS Graviton4 (96 vCPUs)
- ~42 microseconds per authentication
- Kyber + AES-256-GCM hybrid encryption for data at rest
- BFV Fully Homomorphic Encryption for biometric matching on encrypted data
- Dilithium digital signatures for attestation
- Zero-knowledge proofs for privacy-preserving verification
Learn more at h33.ai
Documentation
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
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 h33-0.1.0.tar.gz.
File metadata
- Download URL: h33-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4581a081a4ba6612dba7f6e2588211e8ffbd8d1749c92ba12a0d76ca101c376
|
|
| MD5 |
68a0882ef12f1412595be4520a419839
|
|
| BLAKE2b-256 |
f3ca9abbbe2c20f7e94251572b982c1ef9a76c8f9b6eff429645e8ab2e3143bd
|
File details
Details for the file h33-0.1.0-py3-none-any.whl.
File metadata
- Download URL: h33-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5ce32cf4f06525a548bd887480e4848e1e3d426329953c44f9818e66d55c8a8
|
|
| MD5 |
aafc3cba9addfbed232939fbc4ea8f1b
|
|
| BLAKE2b-256 |
4fe344bd025f380fab5a45439732b07e17f0b185780eed7d9f1a9b78b15be4a4
|