Skip to content
AbdelStarkPublic

About

Oboro (朧): Single-pass 2^-128 PQ-QROM zero-knowledge inference prover for dense & frontier MoE LLMs

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Oboro (朧)

Oboro (朧, /o.bo.ɾo/, 月 + 龍) is a reference implementation for a zero-knowledge inference protocol targeting dense and Mixture-of-Experts language models. Its design targets a 1.000x single-pass weight commitment architecture, 2^-128 post-quantum QROM soundness (0 spot-checking), and exact TV = 0 witness privacy. The kanji 朧 pairs 月 (moon/circle, for the Mersenne-31 stereographic Circle group and Circle-Ligerito polynomial commitment scheme) with 龍 (dragon, for 400B-parameter frontier MoE scale): in classical Japanese usage, oborozuki (朧月) is the moon shining through night mist while interior details stay veiled, and oboro-giri (朧斬り) is a single-stroke cut. Oboro targets meta-llama/Llama-3.1-8B-Instruct (8,030,261,248 parameters) and meta-llama/Llama-4-Maverick-17B-128E-Instruct (400,711,352,320 matrix parameters, 17,184,194,560 active per token) for model providers and verifiers that need cryptographic proof of every token without weight exposure or heuristic sampling.

Repository status: v0.1.0 reference Rust workspace (zero external network dependencies). Field arithmetic (M31, CM31, QM31, 12-M31, 16-M31), non-Clone SHA-512 Fiat-Shamir transcripts, Policy 3 D/3 Circle-Ligerito openings, MaskLedger Stele-U(X) + PSC(Y) single-pass Digit-RLC linear contraction proofs (oboro-prover and oboro-verifier), active-expert MoE/iRoPE planners, .obm/.obp wire codecs, CPU reference Tensor Core/lazy-M31 emulators, and constructive negative controls execute today via cargo test --workspace (multi-layer BDT-GKR lookup subproofs and full sm_90/sm_100 CUDA cubins are specified in docs/spec/03-pq-qrom-security-accounting.md, docs/spec/06-nonlinear-cqis-and-native-fp.md, and docs/spec/07-gpu-prover-and-roofline-benchmarks.md). Full multi-GPU sm_90/sm_100 throughput figures below are analytical rooflines (measured_hardware_claims_permitted = false) and are separated from external hardware timings.

On a Linux Hopper host, the optional cuda feature executes signed weight contractions for 12-M31 and 16-M31, canonical M31 dot products, batched standard Circle transforms, and salted SHA-512 leaf and parent hashing. The public single-matrix prover can select this backend for its weight contraction. For that single-matrix backend the host executes sumcheck, PCS and verification. The full-model public BF16 issuer also uses Hopper for Circle transforms and salted Merkle hashing. A separate CPU process verifies its recursive projection receipts. Build and device tests

CI

For the offline developer workflow and gadget review requirements, see Contributing. Use the security policy to contact the maintainers about a vulnerability.

Quickstart

For Llama 3.1 8B, the CUDA issuer proves all 32 blocks and the vocabulary head. The public greedy-continuation path starts with BOS + Hello and supports 7 or 31 generated tokens. The CPU verifier checks the embedding at each position, shares one recursive opening per registered tile across the request, checks each causal predecessor and requires each nonfinal reply token to be the next graph input. After accepting a continuation, the verifier can export an authenticated KV checkpoint at 8 or 16 positions and then verify one further greedy position at a time, up to 32. On one H100 a single proved append took 1,157 to 1,194 s, about the cost of the whole 32-position request. The public package reveals intermediate activations. Prove and replay the continuation · Append from an authenticated prefix · Singleton · Two-token prefill

For Llama 4 Maverick 17B-128E, the public one-token proof covers all 48 text blocks and the 202,048-logit head. The verifier checks the 24 selected experts against the router outputs and requires independently supplied SHA-512 digests for the checkpoint inventory and the active-route registry. Build, prove and replay Maverick

# Run the workspace tests and constructive negative controls offline
CARGO_TARGET_DIR=/tmp/oboro-target cargo test --workspace
CARGO_TARGET_DIR=/tmp/oboro-target cargo clippy --workspace --all-targets -- -D warnings

# Inspect exact Llama 3.1 8B and Llama 4 Maverick 400B parameter and PCS schedules
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro -- models

# Run an end-to-end OBRM (.obm) model commit + OBRO (.obp) single-pass prove and verify
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro -- demo

# Print the modeled-vs-measured comparison matrix against FlashProve v0.16.0 and FlashProve-Next
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro -- compare-flashprove

# Standalone Unix pipeline binaries
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro-prove -- --weights /tmp/demo.obm --out /tmp/demo.obp --out-statement /tmp/demo-statement.json
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro -- inspect /tmp/demo.obp --json
CARGO_TARGET_DIR=/tmp/oboro-target cargo run -p oboro-cli --bin oboro-verify -- --public-fixture --weights /tmp/demo.obm --proof /tmp/demo.obp --statement /tmp/demo-statement.json --format json

The public single-matrix verifier accepts dense, single-request 12-M31 proofs under both storage regimes. With commit_model_cached, the online prover reads the queried model columns from the host codeword. With commit_model_stream, it retains the Merkle authentication data and recomputes queried columns from registered coefficients in a second systematic weight scan. The Rust entry point prove_public_fixture handles both modes. It rejects a supplied MoeStepWitness because the dense relation has no expert-routing claim. The CLI demo uses M-Cached. Its numerical gate includes the Policy 3 near and far branches for both the model and witness commitments. The 64-coefficient demo over 256 Circle points requires 872 draws. Earlier 360-draw proofs for this geometry fail the updated gate. Regenerate certificates and proofs created with the earlier leaf hash. Regenerate single-matrix proofs created before the corrected sumcheck mask and nonzero OOD combiner. The earlier first round exposed a partial contraction, and reissuing a proof cannot retract information already disclosed. Current Merkle roots bind the 128-byte OBORO-VZP1 prefix.

The reported security bits apply to the numerical model. The verifier checks the sampled coupled projections. Applying the tensor-folding proximity theorem to the shared mask challenges in those projections still needs a proof. The transcript binds the certificate, epoch, IO digest and declared World B numerator. Use public weights and public inputs for the single-matrix prototype. Its randomizer tails are shorter than the opening budget, and its OS-seeded generator supplies computational pseudorandomness. The corrected round-mask relation alone cannot establish privacy of the opened columns or prevent reuse of a model epoch. The public recursive verifier checks the reductions between successive Circle domains. Confidential PCS composition, full-model World B round accounting and transcript privacy remain open. Recursive PCS implementation status

The RFC-0001 structural wire API is oboro_pcs::wire::{ObpProof, ObmCertificate}. It checks six ordered proof sections and the two public model sections. Prover manifests can attach a shard map. The model digest always covers the verifier-only encoding. Decoding a proof or a model manifest does not establish its claims. The public matrix reference certificate uses the single-source, 250-byte manifest. Regenerate earlier 102-byte flat certificates and fixed-path proofs. The public matrix fixture now writes two compact Q44 segments. Its 144-byte public anchor binds the manifest, epoch, declared numerator and application digest.

oboro inspect <path> [--json] identifies proof and manifest files by magic. It checks canonical encoding and reports section sizes and the verifier-visible manifest digest. Proof inspection reports the statement kind and Q44 segment count. Use verify to authenticate the public fixture against the expected statement.

For a BF16 Llama 3.1 8B checkpoint, pass every SafeTensors shard explicitly to oboro inspect-checkpoint --shard FILE [--shard FILE ...]. It checks all 226 matrix and 65 norm tensors, reads the payloads through their original file handles, and reports aggregate counts. Checkpoint provenance and cryptographic registration are separate checks. Use --format json for the machine-readable inventory.

In the public fixture generator, oboro prove --weights OUT.obm --out OUT.obp treats both paths as outputs. The generator stages the verified artifacts before replacing each destination file. It publishes the optional statement last. Each rename is atomic within its destination directory. The production grammar names the model input with --obm and also requires shards, a trace and a statement. This build rejects that invocation before opening any artifacts. Checkpoint certification and the measured GPU benchmark remain tracked in #47 and #56.

Both verifier binaries require the caller's expected statement for public fixture verification. The UTF-8 JSON file is limited to 16 KiB and has six required fields. schema_version is 1, statement_kind is "public_matrix", and epoch_index and world_b_numerator are unsigned integers. The two SHA-512 digests, model_manifest_digest and public_io_digest, each use 128 hex digits. The demo can write this file with --out-statement. For an independent check, obtain the expected statement from the application that selected the model and IO.

Use --format text|json on reports, the demo, inspection and public verification. JSON reports use schema version 1. The CLI returns 0 for success, 1 for cryptographic rejection, 2 for usage, 3 for malformed artifact bytes, 4 for host IO or invalid statement JSON, 5 for resource limits and 6 for execution backend errors. On failure it writes the machine error code to stderr. --strict-qrom-128 remains a compatibility flag for the default numerical threshold.

In the Rust SDK, prove_single_pass and verify_obp_bytes request confidential assurance. They fail closed with OBR-VRFY-013 until a privacy profile is admitted. For public weights and inputs, use prove_public_fixture_single_pass and verify_public_fixture_obp_bytes. To tighten the artifact size or modeled security threshold, pass VerifyPolicy::public_fixture_v1() with the desired limits to verify_obp_bytes_with_policy. The two verifier binaries require --public-fixture to check a reference proof. ObmCertificate::total_model_rows() returns an exact u64 count on every supported host. Callers can classify a failure with OboroErrorCode::code() and inspect the underlying typed error through std::error::Error::source().

Why existing LLM provers fall short

FlashProve v0.16.0 (anthropics/FlashProve@9e2bdd8f) demonstrated that hash-based sumcheck and Reed-Solomon commitments can prove a 400.7B integer surrogate on one H100 80GB, but its blocks/iop/lin.h batching splits weight claims into ceil(B/6) + 2 full-model weight scans (3, 4, 6, 13 scans for B = 1, 8, 24, 64, reading 1,202.13B weights at B = 1) and B + 1 (2..65) extra vector commitments while peaking at 72.9-81.6 GiB GPU HBM (B = 64 fails with OOM) and 257-298 GB host RSS. Its 192-bit Goldilocks GF(p^3) extension falls to 96.23 bits on its worst un-ground round, relies on 71 per-round Proofs of Work (20/28/32 bits), clears 128.00 bits by < 0.05 bits on 324/341 closeness rounds, assumes the unverified Johnson MCA bound of ePrint 2025/2055 Theorem 4.6 across 49 commitment rounds, and offers no post-quantum QROM proof. On model fidelity and privacy, 0/96 stock FP16/FP8 vLLM replies match its integer surrogate (6.81%-9.41% greedy token mismatch), 28/32 tampered second-choice replies and 7/96 wrong-model replies pass looser clipped-gap thresholds, its router clamp 8 * clamp(floor(lw/8), 2047) + (lw mod 8) is non-monotone at saturation, batch ZK is unproved (688,127-run leaf depletion), and omitting iRoPE/NoPE hard-caps context at T <= 1,024.

FlashProve-Next (arXiv:2611.33741) targets native BF16/FP8/MXFP4 serving stacks by replacing full cryptographic verification with cost-weighted spot-checking: NI-315 bounds soundness only to eps <= 2^-40 (Q <= 2^64, an 88-bit deficit below 2^-128 that commodity GPU clusters can grind in non-interactive Fiat-Shamir mode), while ExtSeed-153 drops to eps <= 2^-20 (Q_samp <= 2^30, requiring delayed external seed C_pre and 450.2 s GPU time on Qwen3-0.6B). Its folded ZK simulator remains open, and Relation 6 (1.49 s prove on Qwen3-30B-A3B-FP8) verifies sampled blocks against public weight tiles.

Dense whole-model provers also pay a 23.32x MoE penalty on Llama 4 Maverick: 386.55B of its 400.71B matrix parameters sit in 24 x 128 = 3,072 routed experts, and 127/128 of those experts (383.53B parameters, 95.71% of the model) are unused on each token.

How Oboro proves frontier models in one weight pass

  1. 1.000x single-pass weights (Regime M-Cached) and 0.015625x/req batching (Regime B-Sync): JointClaimBatch + Digit-RLC pins Width::signed(9) digits with narrow quotients (blocking R1 +p modular aliasing), absorbs all digit claims (y_0, ..., y_{G-1}) before squeezing beta (blocking R2 K-basis kernels), and folds G digit contractions into one weight scan with 0 extra witness columns. On Llama 3.1 8B, 226 uniform m_0 = 18 CertifiedModelSources (8,858,370,048 padded cells, or 8,053,063,680 exact dyadic 14,336 FFN cells) keep the 70.87 GB (b = 1) L0 codeword in host DRAM/NVMe (0 B GPU HBM), streaming only Q_col = 20,815,872 (0.235%) codeword cells over PCIe/NVLink-C2C (Regime M-Stream without cached codewords pays the 2.000x causal bound). Across B = 64 lockstep requests, B-Sync absorbs all B * G claims before (r_b, beta) (MF-3) and shares one scan (0.015625x passes/req, 0 extra vector commitments); B-Async folds arbitrary pre-fixed challenges in 2 HBM scans over 196.6 KB SMEM tiles.
  2. 17.18B / 400.71B active-expert MoE and iRoPE linear attention: On Llama 4 Maverick (24 even dense + 24 odd MoE layers, 36 iRoPE + 12 NoPE layers), Oboro commits 2 router witness scalars (e*, m_r) per token (64x smaller than 128-way one-hot selectors) and proves lowest-index tie-breaking via 0 <= 128 * (m_r - lr[e]) + (e - e*) <= 2^22 - 1. Ordering sumcheck variables (k, j) first (26 rounds) and expert e last (7 rounds) skips all inactive experts during forward witness generation and matmul sumcheck (17,184,194,560 active parameters at T = 1, 23.32x sparser than 400.71B). Private TV = 0 routing uses Shout D = 2 (16 x 8) for T <= 69 and pre-committed LogUp* fraction-tree pushforwards (1,536 M31 cells/layer, residue error < 2^-365) for T >= 70; vocabulary lookups switch from Shout D = 3 to LogUp* at T = 10,147 (8B) and T = 16,822 (Maverick). Per NC-MoE-1, MoE-Active-Touch opens only touched expert trees (17.18B total reads at B = 1, T = 1, 69.96x below FlashProve v0.16.0), while MoE-Private-ZK (TV = 0) streams the host M-Cached codeword once per batch (16.70B reads/req at B = 24, 6.26B reads/req at B = 64). Combining 8,192-chunked iRoPE (36 causal 1,024 x 1,024 tiles/chunk) with 0-lookup chunk-constant NoPE temperature scaling cuts iRoPE attention score cells 28.44x at 128K (6.56x whole-model) and 227.56x at 1M (7.79x whole-model), paired with rectangular DLSM-KV prefix-trie decode (12.345 GiB/GPU <= 40% HBM3).
  3. 12-M31 Circle-Ligerito (Policy 3 D/3 UDR) and Q49-1r Zero-PoW 2^-128 PQ-QROM: Base witness columns stay in M31 (p = 2^31 - 1 == 3 mod 4, pole-free stereographic Circle group of order 2^31), while challenges lift into 12-M31 = QM31[w]/(w^3 - u) (|K| = p^12 ~ 2^372, K2xT3 45 M31 muls + 4 INV3 scales, w^6 = 2 + i Gaussian register layout). The target is the unconditional Policy 3 radius e < D/3 and total eps_PCS <= 2^-360. At m_0 = 18, 616 and 360 are near-code sampling counts for blowups 2 and 4. The 12-M31 proximity term alone exceeds the production budget for these geometries. This design is paired with Q44 d_cap* = 11 (520 B/segment) subtree-capped Merkle deduplication and 64 B explicit leaf salts (1,381.76x smaller than zo0k (t + 1) saltless seeds at wide L0). Under GR-4 World B (Q_RO = 2^100 quantum SHA-512 queries, Q_sess = 2^20 sessions, C_lift = 8), pre-committing mu_stack before squeezing one epoch-shared (beta, alpha, gamma) (Q49-1r) holds the total numerator at 264,742..436,258 <= 520,191, as the algebraic part of the 128-bit World B target. The target also requires the independent PCS budget.
  4. Zero-materialization TV = 0 ZK (Stele-U + PSC + MaskLedger): Multi-epoch M_0^{reg} commitments append (1 + P) * 12 mask rows and an always-odd r_rand Circle randomizer tail (preventing the rank r - 1 collapse that hits every even r_rand on conjugate Circle pairs, with 0 power-of-two column-step waste). Online sumchecks combine separable Stele-U(X) univariate masks (1 + sum(d_j - 1) unrestricted scalars for coefficient widths d_j) with PSC(Y) endpoint blinding and coupled Ligerito u_1 row folding under a fail-closed single-read MaskLedger, targeting TV = 0 with 0 re-materialized virtual columns.
  5. Profile Exact-CQIS and Profile Native-FP (0 spot-checking): Profile Exact-CQIS proves deterministic integer-quantized INT8 split-accumulator execution (K <= 65,793 wrap-free s32 Tensor Core MMA, 0.00% serving-prover mismatch, algebraic b(b - 1) = 0 zerocheck, RmsNorm OUT_RADIX = 13). Profile Native-FP proves IEEE-754 single-rounding dot products (Ziv test adapted over M31/12-M31 without spot-checking): MXFP4 (E2M1 + E8M0) fits a 32-element inner product in 1 M31 scalar (|p_b| <= 4,608 << 2^30 - 1), FP8 (E4M3 scaled by 2^9) fits a 128-element tile dot product in 2 narrow limbs (< 2^43, 1.000x Digit-RLC pass), and BF16 (E8M7) uses a 32-bit (2-limb) certified Ziv truncation window (> 99.95% fast path) with uniform tie-zone carry fallback and <= 1 ULP local nonlinearity enclosures.

Modeled and measured comparison

External hardware timings carry m31_muls_tok = "UNKNOWN_CONVERSION" until paired on identical hardware and workloads. Oboro weight-read, commitment, and HBM figures are exact derived / finite-check quantities; GPU pass times are derived analytical rooflines (measured_hardware_claims_permitted = false).

Metric FlashProve v0.16.0 (9e2bdd8f, measured/reproduced) FlashProve-Next (arXiv:2611.33741, author-reported) Oboro v1.0 (derived / finite-check)
Target models Maverick 400.7B int surrogate (T <= 1,024; 8B absent) Qwen3-0.6B, Qwen3-30B-A3B-FP8 (Relation 6) Llama 3.1 8B (8.03B) and Llama 4 Maverick (400.71B total / 17.18B active)
Soundness regime 192b GF(p^3): 96.23b worst un-PoW, 71 PoWs, 2025/2055 Thm 4.6 assumed, classical ROM Spot-checked: NI-315 eps <= 2^-40 (Q <= 2^64); ExtSeed-153 eps <= 2^-20 Target of >= 128b PQ-QROM (GR-4 World B, Q_RO = 2^100, k = 0 Zero-PoW, 12-M31, Policy 3 D/3 UDR eps_PCS <= 2^-360, 0 spot-checking)
Zero-knowledge & weight privacy B = 1 exact-match only; batch/clipped-gap ZK unproved; 688,127-batch depletion Folded ZK simulator open; Relation 6 (1.49 s) opens public weight tiles Target of exact TV = 0 (Stele-U + PSC + MaskLedger, odd-tail M_0^{reg}, 64 B leaf salts, 0 virtual re-materialization)
Arithmetic semantics Custom 13b/12b surrogate (6.81%-9.41% float mismatch; 28/32 2nd-choice tampers pass looser clipped-gap) Spot-checked BF16 / FP8 / MXFP4 Exact-CQIS (0.00% engine drift) and Native-FP (MXFP4 1-limb, FP8 2-limb, BF16 Ziv + <= 1 ULP)
Llama 3.1 8B weight reads (B = 1 / B = 64) Not supported in v0.16.0 UNKNOWN_CONVERSION M-Cached: 8.86B (1.000x) padded / 8.05B dyadic at B = 1 (2.64 ms H100 / 1.11 ms B200 s8 roofline); 138.41M/req (0.015625x) in B-Sync B = 64
Maverick 400B weight reads (B = 1) 3 scans = 1,202.13B reads (+2 extra vector commits; 21.88 s H100 reproduced) Spot-checked / public tiles (450.2 s on 0.6B in ExtSeed-153) 17.18B reads (69.96x cut) in MoE-Active-Touch; 400.71B (1.000x, 3.00x cut) + 17.18B matmul sumcheck in MoE-Private-ZK (0 extra commits)
Maverick 400B weight reads (B = 24 / B = 64) 6 / 13 scans = 100.18B / 81.39B reads/req (+25 / +65 commits; 144.54 tok/s H100 B = 24; B = 64 OOM) UNKNOWN_CONVERSION B-Sync: 16.70B / 6.26B reads/req (6.0x / 13.0x cut, 0 extra commits); B-Async: 2 scans (3.0x / 6.5x cut)
Context & decode scaling Hardcoded T <= 1,024 window recompute (0 KV reuse) Production KV (spot-checked) 128K..1M context: O(T * 8192) iRoPE (28.44x-227.56x score cut) + rectangular DLSM-KV prefix-trie decode
GPU HBM / proof / verify 72.9-81.6 GiB HBM, 18.78 MB proof + 6.23 MB ivk, 17.0-21.1 s C++ (7.11 s Bend M4 Max) 1.49 s prove / 23.4 ms verify (Relation 6, public tiles, 2^-40/2^-20) 12.345 GiB/GPU (<= 40% HBM3 cap, 0 B weight codeword HBM), <= 4.0 MB modeled full-model proof target, <= 2.0 s CPU verify gate

Workspace layout

Path Role
crates/oboro-core M31 (2^31 - 1), CM31, QM31, 12-M31 (K2xT3), 16-M31 (Toom-4), FIPS 180-4 SHA-512, non-Clone Transcript512, GR-4 World B budget, OBRO/.obp and OBRM/.obm 16-byte wire headers
crates/oboro-pcs Stereographic Circle generator of order 2^31, Policy 3 D/3 UDR query schedules (m_0 = 18 -> q_open = 616 / 360), odd-r_rand Circle tail guard, Q44 d_cap* = 11 (520 B) Merkle dedup, SaltedMerkleTree512, MaskLedger
crates/oboro-ir Exact llama3_1_8b() (226 sources) and llama4_maverick_17b_128e() (48 layers) blueprints, RmsNorm OUT_RADIX = 13 static bound verifier, b(b - 1) = 0 zerocheck, causal j* guard, JointClaimBatch + DigitRlc
crates/oboro-moe Bijective top-1 router tie-break 128*(m_r - lr[e]) + (e - e*), MoE (T <= 69) and Vocab (10,147 / 16,822) Shout vs LogUp* crossovers, NC-MoE-1/2, iRoPE 8,192-chunk planner, NC-0124 KV block alignment
crates/oboro-cuda GpuKernelBackend trait, exact s8 x u8 -> i32 split-accumulator GEMV (K <= 65,793), 4-product u64 + acc96 lazy-M31 emulator, H100/B200 roofline calculators, RFC-0014 <= 40% HBM guard
crates/oboro-prover Public single-matrix M-Cached and M-Stream Digit-RLC + Stele-U(X) + PSC(Y) MaskLedger linear contraction prover emitting .obm and .obp binary artifacts (with BDT-GKR lookup subproofs specified in docs/spec/03 and docs/spec/06)
crates/oboro-verifier Zero-weight-access .obm / .obp linear contraction and Policy 3 D/3 UDR PCS cryptographic verifier (0 prover or GPU dependencies)
crates/oboro Public SDK facade and constructive negative-control integration suite (crates/oboro/tests/negative_controls.rs)
crates/oboro-cli oboro, oboro-prove, and oboro-verify command-line binaries

Specification and documentation

Dual-licensed under LICENSE-MIT and LICENSE-APACHE.

About

Oboro (朧): Single-pass 2^-128 PQ-QROM zero-knowledge inference prover for dense & frontier MoE LLMs

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages