BenchmarksStack RankingAPIsPricingDocsWhite PaperTokenBlogAboutSecurity Demo
Apache 2.0 · Open Source

Write Python.
Run It Encrypted.

@h33.compile turns any Python function into a post-quantum FHE circuit. 4 engines. Automatic routing. No cryptography PhD required.

biometric_match.py
import h33

@h33.compile
def match_biometric(template: h33.EncVec[128], sample: h33.EncVec[128]) -> h33.EncBool:
    similarity = h33.dot(template, sample)
    return similarity > 0.85

circuit = match_biometric.compile()
print(circuit.engine)   # "BFV-128" (auto-selected)
print(circuit.latency)  # "939us per batch"

Why This Exists

Zama's Concrete compiler lets you write Python and get FHE. That's powerful. But Concrete compiles to one backend (TFHE). If your workload needs integer arithmetic, you get TFHE. If it needs floating point, you still get TFHE. If it needs government-grade security, you still get TFHE.

H33-Compile compiles to four backends and auto-selects the fastest one for your workload. Float operations route to CKKS. Integer comparisons route to BFV-128. Government-grade security routes to BFV-256. Mixed workloads get automatically split across engines — a hybrid circuit that Concrete cannot produce.

The result: you write a Python function with a single decorator. The compiler handles parameter selection, noise budget management, SIMD vectorization, and engine routing. You never touch a polynomial ring.

Built and Tested

Not a whitepaper. Not a roadmap. A working Rust workspace with tests passing.

6
Crates
10
Tests Passing
30+
FHE Operations
4
Backend Targets
<500ns
Routing Decisions
Apache 2.0
License
Cargo.toml — Workspace
h33-compiler/
├── h33-compiler-frontend     4 tests passing
├── h33-compiler-ir            30+ FHE operations
├── h33-compiler-optimizer     6 optimization passes
├── h33-compiler-backend       FHE-IQ 4-engine routing
├── h33-compiler-runtime       API + local execution
└── h33-compiler-python        PyO3 bindings

Why This Beats Concrete

Zama built a good compiler for one engine. We built a compiler for four.

4 vs 1
Engines, Auto-Routed
BFV-128, BFV-256, CKKS, BFV-32. FHE-IQ picks the best one in <500ns. Concrete has TFHE only.
Hybrid Split
Cross-Engine Circuits
Mixed float+integer workloads auto-split across CKKS and BFV. Concrete cannot produce hybrid circuits.
Type Annotations
Not String Hints
h33.EncFloat, h33.EncVec[128] — real types the compiler enforces. Concrete uses runtime tracing.
Apache 2.0
No Patent License
Concrete requires a separate patent license for commercial use. H33-Compile is Apache 2.0, full stop.
3,200x
Faster Execution
BFV at 38.5us/auth vs TFHE at 124ms/add. Different scheme, different universe of performance.

4-Engine Auto-Routing via FHE-IQ

Your Python function enters the compiler. FHE-IQ routes it to the optimal engine in under 500 nanoseconds.

Your Python Function
Decorated with @h33.compile
H33-Compile (Rust + PyO3)
Parse → Type Infer → Optimize → Route
FHE-IQ (<500ns routing decision)
Automatic engine selection based on operation types, security tier, and workload shape
BFV-128
Exact Integer
38.5us/auth
BFV-256
Level 5 Security
5.98ms
CKKS
Float / ML Inference
~1ms
BFV-32
Batch / Ultra
32 users/CT

The engine selection is automatic. If your function uses float operations (dot products, sigmoid, similarity), CKKS is selected. If it uses integer comparison, BFV-128. If it needs government-grade security, BFV-256. If it mixes float and integer, the circuit is automatically split across engines (Hybrid mode).

Supported Operations

Every operation compiles to optimized FHE circuits with automatic noise budget management.

Category Operations
Arithmetic add, sub, mul, div, mod
Comparison >, <, >=, <=, ==, !=
Vector dot product, rotate, sum, pack
ML relu, sigmoid, tanh, softmax (polynomial approximation)
Matrix matmul, transpose
Logic and, or, not, select (encrypted if-then-else)
I/O encrypt, decrypt, constant

H33-Compile vs Zama Concrete

A direct comparison of the two Python-to-FHE compilers.

Zama Concrete H33-Compile
Backends 1 (TFHE) 4 (BFV-128, BFV-256, CKKS, BFV-32)
Auto-routing No Yes (FHE-IQ, <500ns)
Hybrid circuits No Yes (auto-splits across engines)
SIMD batching Limited 4,096 slots, 32 users/ciphertext
GPU required Yes No (Graviton4 CPU)
Speed 124ms per 64-bit add 38.5us per auth
Execution Self-hosted only API (managed) or local
Post-quantum proofs No Yes (STARK + Dilithium integrated)
License BSD-3 + separate patent license required Apache 2.0 (no patent encumbrance)
Type system Runtime tracing (string hints) Compile-time type annotations (EncFloat, EncVec[N])

How It Works

Five steps from Python function to encrypted computation.

1

Install

pip install h33-compiler
Rust-only while PyO3 3.14 support lands

2

Decorate

Add @h33.compile to your function

3

Compile

Call .compile() — H33 parses the AST, infers types, optimizes the circuit, and selects the best engine

4

Execute

Call circuit.run(encrypted_input) — runs on encrypted data

5

Decrypt

Decrypt the result on your side. The server never sees plaintext.

Built in Rust

The compiler is written in Rust with PyO3 bindings. The frontend parses Python AST. The optimizer minimizes multiplicative depth, vectorizes SIMD slots, eliminates common subexpressions, and places relinearizations optimally. The backend emits API calls to H33's production FHE engines.

No external FHE dependencies. No SEAL. No HElib. No OpenFHE. Every cryptographic operation runs on H33's proprietary engines — the same ones benchmarked at 2,172,518 auth/sec on Graviton4.

Open source: Apache 2.0 (same as HICI)
GitHub: github.com/h33ai-postquantum/h33-compiler

Rust + PyO3 Apache 2.0 x86_64 + ARM64 Python 3.9-3.13
// Compiler pipeline (simplified)
pub fn compile(ast: &PyAST) -> FheCircuit {
    let typed   = infer_types(ast);
    let opt     = minimize_depth(typed);
    let vectorized = simd_pack(opt);
    let engine  = fhe_iq_route(&vectorized);
    let circuit = emit(vectorized, engine);

    // Relinearization placement
    place_relin(&mut circuit);
    // CSE pass
    eliminate_common_subexpr(&mut circuit);

    circuit
}

See It in Action

Three real workloads. Three different engines. All auto-selected.

Credit Scoring CKKS — auto-routed for float
import h33

@h33.compile
def credit_score(income: h33.EncFloat, debt: h33.EncFloat,
                  history: h33.EncFloat) -> h33.EncFloat:
    ratio = debt / income
    weighted = (0.35 * history) + (0.30 * (1.0 - ratio)) + (0.35 * income / 100000)
    return h33.sigmoid(weighted)  # polynomial approx, degree 7

circuit = credit_score.compile()
print(circuit.engine)  # "CKKS" (float ops detected)
Encrypted Search BFV-128 — auto-routed for exact match
import h33

@h33.compile
def encrypted_lookup(query: h33.EncInt, table: h33.EncVec[1024]) -> h33.EncInt:
    matches = h33.pack([entry == query for entry in table])
    index = h33.first_nonzero(matches)
    return h33.select(index >= 0, table[index], -1)

circuit = encrypted_lookup.compile()
print(circuit.engine)  # "BFV-128" (integer comparison detected)
Fraud Detection (Hybrid) CKKS + BFV — auto-split
import h33

@h33.compile
def detect_fraud(amount: h33.EncFloat, location: h33.EncInt,
                  history: h33.EncVec[64]) -> h33.EncBool:
    # Float path (CKKS): compute anomaly score
    avg = h33.sum(history) / 64.0
    deviation = h33.relu(amount - avg * 3.0)
    score = h33.sigmoid(deviation / 1000.0)

    # Integer path (BFV-128): check blocklist
    blocked = location == 9999

    # Hybrid merge: compiler auto-splits across engines
    return (score > 0.7) | blocked

circuit = detect_fraud.compile()
print(circuit.engine)  # "Hybrid(CKKS, BFV-128)" (mixed types detected)

H33 Credit-Based Pricing

Same credits, same rates as all H33 products.

Compilation

Free
Runs locally

The compiler runs on your machine. Parse, optimize, and route your circuits with zero cost. No API key required for compilation.

API Execution

Credits
Standard H33 rates

Execute compiled circuits on H33's managed infrastructure. Pay per auth with H33 credits. No GPU, no infrastructure management.

Local Mode

Free
Offline, your hardware

Run compiled circuits on your own hardware. The compiler generates optimized Rust code. No internet access required.

Frequently Asked Questions

Do I need to understand FHE to use H33-Compile?
No. Write Python. The compiler handles parameter selection, noise budget management, and engine routing automatically. You never need to choose polynomial degrees, modulus chains, or plaintext moduli.
How is this different from Zama Concrete?
Concrete compiles to one FHE backend (TFHE). H33-Compile compiles to four backends (BFV-128, BFV-256, CKKS, BFV-32) with automatic engine selection. If your circuit mixes float and integer operations, H33-Compile splits it across engines automatically. Concrete cannot do that.
Is it open source?
Yes. Apache 2.0. The compiler, optimizer, and all backends are open source. Execution can run locally (your hardware) or via H33's managed API.
Can I run compiled circuits offline?
Yes. H33-Compile supports local execution mode. The compiler generates optimized Rust code that runs on your hardware without internet access. API mode is optional for managed execution.
What Python versions are supported?
Python 3.9–3.13. The compiler uses PyO3 for Rust-Python interop. pip install h33-compiler works on x86_64 and ARM64 (Apple Silicon, Graviton).

Write Python. Run It Encrypted.
Ship It Today.

No cryptography PhD. No GPU. No parameter tuning. Just a decorator.

pip install h33-compiler Rust-only while PyO3 3.14 support lands
🐍 Python 3.9–3.13
🦀 Built in Rust
4 FHE Backends
🔒 Post-Quantum Proofs
Apache 2.0
FHE-IQ Deep Dive →