DARK-PoUW

Proof of useful work on encrypted tensors · Full-width PTQ1_0

Mine the matmul.
Never see the prompt.

Miners multiply full-width Ternary Bonsai 2.5 27B PTQ1_0 weights against d = 2560 Matrix-LWE ciphertexts inside fused GPU K-loops. Lottery tickets verify directly against the plane-independent PTQ1_0 Merkle root with structural rank admissibility, and exact dual-prime integer settlement pays out with zero float drift. Below, a real 5120 × 34816 proof is verified live in this tab.

—full 5120×34816 tile + PTQ1_0 opening
CBOR v2 + 4.1 KB PTQ1_0 block
—browser full 5120×34816 PTQ1_0 proof
measured live, Rust WASM
164.8 bquantum Core-SVP (186.0 b classical)
d = 2560 Q5, 1 corrupt custodian
—custodian decryption mismatches
full 5120×34816, exact Up = SpW

The problem

Proof-of-work burns gigawatts on throwaway hashes.

Conventional PoW spends energy on SHA-256d or kHeavyHash preimages that serve no external buyer. Early GPU PoUW networks collapsed to 0% real AI inference whenever serving I/O let rational miners self-seed dummy tensors.

“Decentralized AI” hands anonymous miners your prompt.

Broadcast-plaintext inference exposes every enterprise prompt to untrusted workers, while floating-point spot checks cannot separate rounding drift from cached or low-rank cheating. Confidentiality requires encrypted activations, binding to real model weights, and exact integer settlement.

What Dark-PoUW does

PTQ1_0-native blind mining

Activations are split across three custodians, rotated by H1024 locally on shares, and encrypted under per-weight 2-bit packed Matrix-LWE keys: default Standard128 (d = 2560, 186.0b / 164.8b for Q5; 148.3b / 132.2b for Q6) or explicit opt-in Everyday80 (4pl D=1216, 5pl D=1536, 6pl D=1792, ≥ 90.2b cl / ≥ 80.5b qu) with deterministic Cauchy–Schwarz activation bounds (no bern_m heuristic) and GPU-native hints (20.65 ms M2 Max 512×256 test). Branchless aligned Keccak in dpw_mine.comp reaches 11.80 TOPS (61.87 ms vs. stock ggml Vulkan 66.26 ms at T=2048) with 0 B dense randomizer bloat.

Registered tickets & rank checks

Every 16×16 sub-tile of every 128-wide K-slab hashes via midstate TurboSHAKE256 (or labelled Toeplitz-NH fast mode). Registered verification opens the winning 128×128 PTQ1_0 block (3,584 B trits + 128 B scales + Merkle path ≈ 4.1 KB) against the plane-independent weight root and checks full rank ≥ 127, all 12 off-diagonal 32×32 ranks ≥ 24, and 16×16 Kronecker rank ≥ 12. A miner-chosen signed Hadamard transform can pass these rank screens, so governance must attest the registered model root. 1-pass (job_id, miner_pk) + HRW sharding + burned fbase enforce wash-mining dominance (GPU max ceff = 1.0031).

Verify-before-decrypt v2 settlement

Before custodians touch their exact mod-Q hints Up = SpW, GPU dpw_lift + zero-spill dpw_settle_probe check Bc·W = Yc + Q·Zwrap over ℤ via range bounds plus dual-prime Freivalds modulo p61 (B61Ext5) and M61 (2−183 under Standard128, 14.14 ms/call; 2-probe p61 2−121.9 under Everyday80 with automatic M61 fallback when 2·bound ≥ p61). Blocks IND-CPAD & active CCA reaction oracles with zero secret-key queries.

Verify a real full-width proof

Exported by crates/dark-pouw/examples/export_web_proof_vector.rs from the real full-width 5120 × 34816 layer-0 gate|up projection of Ternary Bonsai 2.5 27B in native PTQ1_0 format, padded with batch-aware TM = 16 short row tiles for a T = 4 MTP speculative batch. Every cryptographic check below executes in compiled Rust hfhss_wire.wasm (crates/hfhss-wire → wasm32-unknown-unknown) via verifier.js and cross-checks bit-for-bit against the Rust dark-pouw crate.

loading vector…
Pick an action. Every cryptographic check runs live in this tab.

    Wire witness breakdown (full 5120 × 34816 job)

    What the miner saw

    First 4 encrypted MTP batch rows × 1024 columns (first H1024 rotation block of the 4 × 5120 ciphertext), plane p, one pixel per residue. The d = 2560 3-custodian key came from OS entropy and was discarded after verifying 0 mismatches across all 139,264 decrypted gate|up outputs.

    Recorded three-custodian runs

    Each record comes from a client and three separate custodian processes using Ext2 MACs in both residue planes. The model runs compare against an independent floating-point reference. The daemon run checks each injected fault against a control with the corresponding safeguard disabled.

    
      Open the measured JSON
    

    Two tiers & accelerator datapaths

    Tier 1 · open weights · GPU Dark-PoUW + M31 LPN-PoUW + Ext2 3PC

    PTQ1_0 blind mining, exact M31 LPN & 64L malicious 3PC

    Full 64-layer Bonsai-27B GPU MTP (Standard128, DPW_SETTLE=1): Overlapped batched mining + GPU dpw_lift / zero-spill dpw_settle_probe cut end-to-end RX 6750 XT dark MTP 2.08× from 27.44 → 13.19 s/tok (3,627/3,627 matmuls settled pre-decrypt, 68.4% MTP accept, 0.80% mean rel_err), while branchless single-plane mining reaches 11.80 TOPS (61.87 ms vs. stock ggml Vulkan 66.26 ms at T=2048). Opt-in Everyday80 (L=16, measured at the former D=1472) caches 100% 401/401 weights in 11.65 GiB/cust (verified across all 64 layers on M2 Max Metal: 2,416/2,416 pass, 1.85% mean rel_err).

    Single-plane exact M31 LPN-PoUW (dark_pouw_gpu_chain_and_lpn.json): eliminates 5-plane CRT, quotient lifts, and lattice rounding for 9.92× online speedup on RX 6750 XT (gate|up T=4: 99.8 vs. 989.8 ms; 5.97–9.92× decode) with max ceff = 1.0031 GPU parity, 1-pass (job_id, miner_pk) + HRW sharding + EIP-1559 burned fbase wash-dominance, and a 20-block GPU ASERT chain in 8.74 s (4/4 attacks slashed pre-decrypt).

    Across 64 layers and the language-model head, the Ext2 run matched the reference token and passed the output MAC. The record above includes the input ID, output ID, timings and per-custodian checks.

    Tier 2 · hybrid open-base + encrypted private LoRA · 30-bit Matrix-FHE

    Hybrid Private LoRA & GPU/TPU Matrix-FHE datapaths

    Hybrid Open-Base Dark-PoUW + Encrypted Private LoRA (dark_bonsai_80b_and_finetune.json, r = 32, 0 combined mismatches across 5120×17408 & 17408×5120): public PTQ1_0 base weights handle 99.2% of FLOPs while creator LoRA adapters (A, B) stay 100% encrypted. Zero-trust 30-bit Everyday80 Matrix-FHE LoRA (n = 256, ≥ 95.0b cl / 83.2b qu, single key at K = 17,408) runs 3.02× / 5.21× faster than 30-bit Standard128 (n = 512, ≥ 247.0b / 215.6b). Cached LoRA uses three in-process roles over Unix sockets, authenticated adapter shares and Ext2 Beaver products.

    Measured RX 6750 XT Vulkan (rx6750xt_fhe30_bench.json): the synthetic 30-bit modular-GEMM microbenchmark gemm_pt32 (5120×5120×9216 tok, 1 limb, 2D Infinity Cache swizzle swz=8) runs in 160.66 ms (15.04 TOP/s sustained int8, 2.64× swizzle gain, 3.21× faster than 54-bit gemm_pt) on AMDVLK (266.03 ms RADV); ntt32 0.293 ms, slot32 0.149 ms, 0 B scratch spills, 1,477,158 / 1,477,158 words exact. 54-bit lora_forward runs in 53.57 ms AMDVLK (27.3× over 24T CPU).

    Deviceless Google libtpu AOT audit (tpu_matrix_fhe_30bit.json, jax 0.12.1, v5e:1x1 & v6e:1x1 — compiler AOT, not physical TPU wall-clock): 0 B HBM temp spills across all 8 Pallas/Mosaic compilations (−720 MiB HBM spill on gemm_pt30, < 4.5 MiB VMEM, 100% MXU tile fill, 0 64-bit ops, 7/7 exact); paired unfused XLA baselines model 89.1% (v5e, 6.88 ms) and 80.8% (v6e, 1.63 ms) peak int8 MXU.

    Batch-aware TM padding & subsidy calculator model · editable

    —miner plane-MACs per useful MAC
    —of miner work is the useful product
    —miner cost per useful PetaMAC
    —block subsidy per useful PetaMAC vs. clear
    Miner work per useful MAC vs. batch rows T Selected TM Legacy TM=128 3PC on shares (8×)

    factor = P · (M/T) · (1 + 2r(1/K + 1/N) + 2Meff/M + ρ/r), M = ⌈T/TM⌉·TM, r = 128. With TM = 16, a T = 4 MTP verify batch pays 4× padding instead of 32× (an 8× reduction in wasted rows). Measured 3-process Bonsai 27B layer-0 (Gated-DeltaNet + SwiGLU, 48 tokens, two-plane rns_trunc): 68.4 s and 5.74 GB total across three custodians (cos = 0.9999992 vs. f64).

    Table view
    TM (TM)factorvs. TM=128useful

    Confidential agentic infrastructure

    Dark-PoUW is the encrypted compute substrate of a three-layer sovereign AI stack: blind inference underneath, post-quantum capability guardrails at the credential boundary, and cryptographically erasable episodic memory on top. Every number below is pinned to landed commits across hfhss, dsig-v2, and keygate.

    Credential Boundary · keygate @ 71e03b1 + dsig-v2 @ 7b9748b

    < 30 ms PQ AKIA Guardrails + XMSS

    Before an AI agent can invoke an external API or touch a held credential, keygate-broker enforces Caveat::GuardrailPolicy via a fail-closed KGR1 post-quantum receipt. The receipt binds an NfaAbsenceCircuit::akia() proof (proving zero AWS AKIA key exfiltration under a 244-bit hiding Poseidon2 commitment over Fp61, with Lean-proved soundness and Buchi progress-measure liveness) under a stateful XMSS signature.

    15.55–16.51 ms e2e broker verify ~9.4 ms AKIA NFA verify 0 upstream hits on fail-closed reject

    Audit Bridge & Smudging-Free Decrypt · pouw_receipt.rs + threshold_decrypt.rs

    Byte-Exact Solana SBF Dispute Receipts & Smudging-Free 3PC Decrypt

    BonsaiAuditReceipt bundles directly-verified, byte-exact dreggference Solana SBF artifacts (zero synthetic wrapper theater): DPWT tile proof, PTJ1 (198 B job, 136 B ix-0, 32 B ix-1) + 1,205 B PTC1 cache holding the 1,160 B (1.13 KiB) K = 5120 single-column PTQ1_0 dispute opening, and 1,072 B 3-custodian Ed25519-attested ErasureReceipt — paired with smudging-free MPC rounding (ePrint 2025/1781) run by three custodian processes over authenticated sockets, atop rns_trunc + Ext2(p61)×Ext2(m61).

    198 B PTJ1 / 1,160 B K=5120 col 0 LWE noise residual (3PC round) < 2−121.97 Ext2 pre-open MAC

    Revocable Memory · hfhss verifiable_unlearn.rs · dark-pcg-custody

    Attested Plastic Memory & Erasure Receipts

    Three custodian OS processes hold rank-1 authenticated episode adapters ([Ue], [Ve]) backed by O(len) stream PCG, salted commit_reveal, and B61Ext5 SPDZ MACs. Hardened ErasureReceipt chains prev_commits → commits under 3-of-3 strict Ed25519 custodian signatures. Episode factors and masks are 3-of-3 additively shared with an independent MAC key share per custodian and no replicated pair seed. The receipt authenticates the live-state change.

    1,072 B attested / 688 B core receipt 3-of-3 strict Ed25519 + prev chain 100% twin-world exact erasure

    For cryptographers

    PTQ1_0-native weight binding & structural admissibility (0 B dense randomizer)
    leaf_PTQ1(l, j) = TurboSHAKE256(0x10; 'P' ‖ u32(l) ‖ u32(j) ‖ blocks[128 × 28 B] ‖ q[128 B])
    admissible(W_{l,j} mod p_t) ⇔
        rank_{GF(p_t)}(W_{l,j}) ≥ 127                          (kills zero & stacked-H blocks)
      ∧ ∀ a ≠ b ∈ {0..3}: rank_{GF(p_t)}(W^{(a,b)}_{32×32}) ≥ 24   (kills all 128! perms, diag, banded, D + u vᵀ)
      ∧ min(rank(K_even), rank(K_odd), rank(K_even + K_odd)) ≥ 12
        K_even and K_odd project disjoint columns of the full unfolding into 16×16 matrices.
        TurboSHAKE derives projection weights from the block, its dimension and its field.

    Multiplying PTQ1_0 ternary weights by dense per-plane GL128 randomizers W·S would inflate a 5.9 GB model into ~189 GB and break direct GPU ternary decoding. Instead, Ptq1WeightTree commits 128 × 128 PTQ1_0 blocks directly (plane-independent: 3,584 B trits + 128 B integer scales + Merkle path = 4,160 B at 5120 × 34816). All 10,880 real layer-0 gate and up blocks meet the full-rank and off-diagonal thresholds and the new full-width projection threshold over all five settlement primes and M31 (65,280 checks, 100% pass), while Lean 4.36 mechanizes the permutation pigeonhole bound (pigeonhole_12_offdiag_perm, perm_total_offdiag_nnz_le_128) along with low-rank shift and Kronecker unfolding counterexamples in lean/Hfhss/WeightRandomizer.lean. The rank screens eliminate simple shortcuts only: a signed Hadamard transform can pass them and still support fast multiplication, so governance must authenticate the registered model root independently of the miner.

    Ticket & batch-aware TM = 16 short row tiles
    ticket = LE64( TurboSHAKE256(D = 0x13;
               σ ‖ η ‖ root ‖ 0⁶⁴                          ← 136 B midstate (1 rate block, reused)
             ‖ t ‖ i ‖ l ‖ j (u16 LE) ‖ su ‖ sv ‖ M_sub[16×16]   ← 266 B tail, 2 perms ) [0..8] )
    M = ⌈T / 16⌉ · 16,   rows_in_tile(i) = min(M − i·r, r),   strips_in_tile(i) = rows_in_tile(i) / 16

    ER,l, FL,l are rejection-sampled into GL128(GF(pt)) from (σ, η, root) so the tile map is a bijection. For short row tiles (TM = 16, 32, 64), only the active prefix of EL is committed, mined, and hashed, keeping full M % 128 == 0 transcripts bit-for-bit identical while eliminating up to 8× padding waste on decode batches.

    v2 dual-prime ciphertext settlement & verify-before-decrypt
    accept ⇔ |B_c|, |Y5| ≤ (Q5−1)/2,  |Z| ≤ z_max = ⌊H5(‖W‖₁+1)/Q5⌋ + 1,  2·bound < p61·M61
           ∧ B_c (W v) ≡ (Y5 + Q5 Z) v   (mod p61, v ∈ F_{p61^5}^N)
           ∧ B_c (W u) ≡ (Y5 + Q5 Z) u   (mod M61, u ∈ (F_{M61}^N)³)
    v, u = TurboSHAKE256(0x14; "dark-pouw/q5-lift-settlement/v2" ‖ root ‖ H(B_c) ‖ H(W)
                         ‖ T,K,N,Q5,z_max ‖ every (Y5, Z))

    Both crates/dark-pouw and llama-dark-pouw @ c4a6de745 enforce verify-before-decrypt: custodians refuse to run distributed_decrypt5 or combine hints Up = SpW unless presented with a verified Settled token binding the exact ciphertext digest, weight digest, and shape. Per-probe error is 1/p615 on the p61 leg and 1/M613 ≈ 2−183 on the M61 leg (mechanized in lean/Hfhss/SettlementSoundness.lean).

    Security parameters, Everyday80, LPN-PoUW & Lean 4.36 verification
    • Matrix-LWE (Standard128 default & Everyday80 opt-in): Against one corrupt custodian with m ≤ 216 rows per independent per-weight 2-bit packed key (Lean-certified lower bounds, min over primal uSVP, dual, primal hybrid, and ePrint 2026/2117 probability-ordered hybrid; quantum at sieving exponent 0.265): Standard128 gives 186.0b cl / 164.8b qu (5pl D=2560) and 148.3b / 132.2b (6pl D=2560); Everyday80 gives 90.2b / 80.5b (4pl D=1216), 93.1b / 83.2b (5pl D=1536), and 90.5b / 81.0b (6pl D=1792). At quantum sieving exponent 0.257 the Everyday80 bounds are 78.3b, 80.9b and 78.8b: only 5pl stays above 80 bits. Deterministic Cauchy–Schwarz/Hölder row bounds (no bern_m activation heuristic) + Bernstein tails strictly on i.i.d. LWE noise E·W.
    • Single-plane exact M31 LPN-PoUW (7117f8d, 4e64eb5): Zero-noise sparse-LPN cancellation over FM31 (n1 = 1024, dual floor ≤ 2−130) fused with GL128(GF(M31)) Vulkan mining (9.92× online speedup, max ceff = 1.0031), pair-coheld secret probes (≤ 2−123), pair-{1,2} output masking, 1-pass (job_id, miner_pk), HRW sharding, and burned fbase wash-mining dominance.
    • Lean 4.36.0 proof base: kernel-checked modules (lean/Hfhss/ + Mathlib lean-real/HfhssReal/, zero custom axioms, zero sorry, zero native_decide, #guard_msgs-pinned #print axioms), covering IndCpaDAndVerifyBeforeDecrypt, ErasureHonestModel, DarkPouw, WeightRandomizer, BernsteinAndEveryday80 + HfhssReal/Bernstein, SettlementSoundness, LpnMask, LpnPouw, RnsTruncation, TwoPlane3pcSound, ActiveFhe, C127LeveledChain30, ReceiverRerandomisation, and SilentPcgAndRevocation.

    Honest scope boundaries & security model

    # regenerate this page's full-width 5120x34816 PTQ1_0 vector (fresh OS-entropy key every run)
    cargo run --release --manifest-path crates/dark-pouw/Cargo.toml \
      --example export_web_proof_vector -- docs/vectors/real_bonsai27b_proof.json

    Constellation: dreggference (Solana SBF) · hfhss (Dark-PoUW & 3PC) · llama-dark-pouw (Metal/Vulkan 27B) · dsig-v2 (ZK Coprocessors & Dark FBA) · panzk (Pancake zkVM & Passkeys) · qsag (PQ Threshold & Beam) · keygate (Isolated Credential & Solana Broker)