The {8,3} hyperbolic tessellation is not decorative. Every component of HypΓ — key generation, encryption, error structure, and signing — is load-bearing on the same geometric object. Removing the geometry does not weaken the scheme. It destroys it.
The {8,3} Fuchsian group Γ = ⟨a,b | a⁸=b³=(ab)²=1⟩ acting on the Poincaré disk D ⊂ ℂ by Möbius transformations. Its Cayley graph is quasi-isometric to H² by Švarc-Milnor.
In ℝⁿ: ball of radius r has volume ∝ rⁿ — polynomial. BKZ and enumeration exploit this.
In H²: ball of radius r has volume ∝ sinh²(r) ~ e^(2r)/4 — exponential. Enumeration attacks face exponential cost. The parallelogram law |u+v|² + |u-v|² = 2|u|² + 2|v|² fails in hyperbolic space — BKZ cannot be ported. No known reduction from or to flat CVP exists.
# Private key: walk of length L=512 secret = [choice([a,a_inv,b,b_inv]) for _ in range(512)] # Public key: matrix product in PSL(2,R) # Single 2×2 matrix at mp.dps=150 public = matrix_product(secret) # Noise applied: k=8 step random walk noise = short_walk(k=8) public_noisy = public @ noise
Shor's QFT works on abelian groups via 1D irreps. Γ is non-abelian with infinitely many higher-dimensional irreps. The coset state doesn't leak subgroup info via measurement — distinguishing exponentially many matrix-valued Fourier coefficients has no efficient quantum strategy. Non-abelian HSP is open.
mp.dps=150. Each matrix entry is ~500 bits. Public key = 4 entries = ~2000 bits. Walk is stored as index sequence (2 bits/step × 512 = 1024 bits private key). Matrix exponentiation y^c via repeated squaring.
# s = secret point in D # {aᵢ} = tessellation vertices from DB samples = [] for a_i in pseudoqubit_vertices: d = hyp_metric(a_i, s) e_i = hyp_gaussian_sample(sigma) # e_i constrained to C_hyp (§3) samples.append(d + e_i) ciphertext = samples # + metadata
# Recover s via iterative geodesic search # Use pseudoqubit basis as anchors s_candidate = hyp_cvp_solve( basis=pseudoqubit_vertices, targets=ciphertext, decoder=hyp_belief_prop, # §3 ) # Private key unlocks the LDPC structure # needed for belief propagation plaintext = extract(s_candidate)
The Supabase pseudoqubits table coordinates are the basis {aᵢ} for HCVP. Without the tessellation vertices, there is no basis. Without the basis, there is no encryption. The geometry is not a seed diversifier — it IS the encryption lattice. This is the key structural change from the current hlwe_engine.py.
Current code applies tanh as an afterthought shrinking flat errors. The correct distribution is the heat kernel on H²:
Errors that look large in ℂ (Euclidean) are small in dₕ. An attacker in Euclidean coordinates sees large noise. An attacker who knows the hyperbolic structure sees small noise — but recovering the structure IS the hard problem.
The {8,3} tessellation defines a natural Tanner graph. This is not a coincidence — the tessellation geometry gives the code its hardness properties.
| Property | Flat LDPC | Hyperbolic LDPC |
|---|---|---|
| Min distance | d ~ √n | d ≥ αn (linear) |
| Girth | ~6-8 | ≥ 2·log₃(n) |
| Expansion | weak | λ₂ < 1-ε explicit |
| ISD attack | feasible | exp. harder |
Information-set decoding (Stern/May-Meurer-Thomae) complexity for [n,k,d]: O(n²·2^(0.054n)). With linear distance d=αn, ISD success probability per iteration is binom(d,t)/binom(n,k) — exponentially smaller than polynomial-distance codes. Quantum ISD gives √ speedup but base complexity is already exponentially larger.
Error vectors eᵢ in GeodesicLWE (§2) are constrained to be low-weight codewords of the hyperbolic LDPC code. This couples the two problems:
e from b = {dₕ(aᵢ,s) + eᵢ}e ∈ C_hyp — this is a syndrome decoding instance of HLSDs (needed to isolate e)e (noise must be removed)Neither subproblem is solvable without solving the other. An attacker must break both simultaneously.
The {8,3} tessellation supports quantum LDPC codes (Breuckmann-Terhal hyperbolic surface codes) encoding k=Ω(n) logical qubits with distance d=Ω(n) — impossible in flat toric codes where k·d²≤n. If decryption is implemented as a quantum error-correction circuit on these codes, the decryption is topologically protected by the same geometry that provides cryptographic hardness. Unique property — no flat-space analog.
signing_key from private key but verifier derives it from public key — universally forgeable by anyone with the public key. Schnorr-Γ replaces this entirely. Security reduces to HWP (§1), not HMAC security.
| Component | Size |
|---|---|
| Public key y | ~2000 bits (4 × mp.dps=150 floats) |
| Commitment R | ~2000 bits |
| Response Z | ~2000 bits |
| Challenge c | 256 bits |
| Total signature | ~4256 bits (~532 bytes) |
Acceptable for QTCL block headers. Can compress with canonical serialization.
matrix_pow(M, c) via repeated squaring in PSL(2,R) at mp.dps=150. For c up to 256 bits this is at most 256 matrix multiplications — fast. Each multiplication: 8 mpmath multiplications + 4 additions at 150 dps. At ~1ms/multiply: ~256ms/signature. Acceptable for QTCL block submission rates.
# Fuchsian group presentation Γ = ⟨a,b | a⁸=b³=(ab)²=1⟩ generators = [a, a_inv, b, b_inv] # 4 choices # PSL(2,R) matrix representation # a, b as explicit 2×2 matrices # computed from tessellation geometry mp.dps = 150 # FIXED — do not reduce # Tessellation TESSELLATION = "{8,3}" RINGS_DEPTH = 8 # ~2000 tiles N_EDGES = ~4000 # LDPC code length n
# Key generation WALK_LENGTH = 512 # L — security param NOISE_STEPS = 8 # k — noise walk length # GeodesicLWE N_SAMPLES = 512 # m — number of basis samples SIGMA = 0.05 # hyperbolic noise std dev # LDPC code CODE_RATE = 0.5 # R = k/n ERROR_WEIGHT = 200 # t = αn/2 # Security estimate # Classical: ~256 bits # Quantum: ~180 bits (estimated)
Computed once at startup from the hyperbolic rotation angle θ = 2π/8 = π/4 and the triangle vertex angle φ = 2π/3. The fundamental domain has angles summing to π/8 + π/8 + π/3 < π/2 confirming negative curvature. Explicit matrices:
These are computed using mpmath at 150 dps. The exact values are the geometric foundation of every component. Stored in hyp_group.py:GENERATORS.
Every module imports from hyp_group.py and/or hyp_tessellation.py. The geometry is the root of the entire tree.
from hyp_engine import HypGammaEngine engine = HypGammaEngine() # loads tessellation, generators, LDPC code at startup # ── Key generation ───────────────────────────────────────────── keypair = engine.generate_keypair() # → HypKeyPair( # private_key: str # hex-encoded walk index sequence (1024 bits) # public_key: str # hex-encoded PSL(2,R) matrix (2000 bits) # address: str # SHA3-256(SHA3-256(pub_bytes)).hex() — unchanged # ) # ── Signing ──────────────────────────────────────────────────── sig = engine.sign_hash(message_hash: bytes, private_key: str) # → {'signature': hex(R‖Z), 'challenge': hex(c), 'timestamp': iso} # NOTE: 'auth_tag' field kept for backward compat, contains hex(c) # ── Verification ─────────────────────────────────────────────── valid = engine.verify_signature(message_hash: bytes, sig: dict, public_key: str) # → bool — recomputes c' from R, checks c'==c # PUBLIC KEY IS USED FOR VERIFICATION CORRECTLY (Schnorr verify) # ── Block sign/verify (unchanged interface) ──────────────────── sig = engine.sign_block(block_dict: dict, private_key: str) ok, msg = engine.verify_block(block_dict: dict, sig: dict, public_key: str) # ── Address derivation (unchanged) ──────────────────────────── addr = engine.derive_address(public_key: str) # SHA3-256² as before
server.py, oracle.py, mempool.py, blockchain_entropy_mining.py use the same function signatures. Replace from hlwe_engine import ... with from hyp_engine import .... The dict keys in signature outputs are preserved. Existing wallets need key regeneration (new scheme) but address format is unchanged.
| Attack | Target | Classical | Quantum | Status |
|---|---|---|---|---|
| BKZ lattice reduction | HCVP | Inapplicable — parallelogram law fails | No hyperbolic analog known | ✓ Blocked |
| Information-set decoding | HLSD | Exp. harder (linear distance) | Quantum ISD still exponential | ✓ Blocked |
| Quantum Fourier / Shor | HWP / signing | N/A | Non-abelian HSP — open problem | ✓ Blocked |
| HMAC forgery (public key) | Old signing | Trivial — public key derivable | Trivial | ⚠ Fixed by Schnorr-Γ |
| Entropy collapse attack | Error vector | Requires observable block entropy | Same | ⚠ Mitigated by LDPC constraint |
| Meet-in-the-middle (walk) | HWP | ~2^(L·H_Γ/2) — ~2^384 | ~2^192 (Grover) | ✓ Acceptable |
| Geodesic enumeration | HCVP | Exp. in hyperbolic radius | No speedup known | ✓ Blocked |
Build in this exact sequence. Each module must pass its own test suite before the next begins. Do not collapse modules.
hyp_group.py — PSL(2,R) arithmetic + generator matrices for {8,3}hyp_tessellation.py — tiling to depth 8, dₕ metric, Supabase integrationhyp_ldpc.py — Tanner graph, (3,8)-regular, belief propagation decoderhyp_schnorr.py — Schnorr-Γ sign/verify, Fiat-Shamir, HVZK testhyp_lwe.py — GeodesicLWE keygen, encrypt, decrypt with LDPC error couplinghyp_engine.py — unified API, backward-compat wrapper, full integration testmp.dps=150 throughout — never reducedet=1 after every multiplysigning_key from public key at verify timemp.dps for performance — use caching instead# hyp_group: assert det(a) == 1; assert a**8 == I; assert b**3 == I; assert (a@b)**2 == I # hyp_tessellation: assert dh(z, z) == 0; assert dh(z,w) == dh(w,z); assert triangle_inequality # hyp_ldpc: assert H @ G.T == 0 (mod 2); assert min_distance >= alpha*n; assert BP_decodes(codeword + t_errors) # hyp_schnorr: assert verify(sign(m, sk), m, pk) == True # correctness assert verify(sign(m, sk), m2, pk) == False # binding assert verify(forge(m, pk), m, pk) == False # unforgeability # HVZK: simulate 1000 transcripts, check indistinguishable from real # hyp_lwe: assert decrypt(encrypt(s, basis, sigma), sk) == s # correctness assert error_vector in C_hyp # LDPC constraint # hyp_engine: # Full round-trip: keygen → sign block → verify block # Backward compat: same dict keys as hlwe_engine.py