Skip to content

feat(attest-zk-groth16): contains_no_pii Groth16 attestation e2e (VOKF-7 / M1) - #5

Merged
aggre merged 1 commit into
mainfrom
m1/attest-groth16
Jun 15, 2026
Merged

feat(attest-zk-groth16): contains_no_pii Groth16 attestation e2e (VOKF-7 / M1)#5
aggre merged 1 commit into
mainfrom
m1/attest-groth16

Conversation

@yumemayu

Copy link
Copy Markdown
Member

M1 — @verifiable-okf/attest-zk-groth16 (VOKF-7)

Wires a real Groth16 proof into the §10 attestation path, exercising both the verified and attestation_failed branches (M0 only had unsupported_scheme).

Implements

  • Circuit circuits/contains_no_pii/ — minimal Circom 2 demo: a private field must equal 0 (PII absent). gen.sh regenerates artifacts; the verification key + a sample proof are committed, heavy ptau/zkey/wasm are gitignored.
  • @verifiable-okf/attest-zk-groth16 — an AttestationVerifier for zk-groth16: base64-decode the proof, run snarkjs.groth16.verify offline (verification key only — no proving key, no circom, no network). Bundles the contains_no_pii vkey.
  • Fixtures: signed/with-zk-attestation.md (valid proof → verified), signed/with-bad-zk-attestation.md (validly signed but wrong public signal → attestation_failed).

DoD(VOKF-7)

  • prove→proof→verify が verifier 経由で通過(verified
  • 両パス検証attestation_failed(正当署名・ZK失敗)+ verified(成功)+ carrier-only(非必須→通す)
  • スコープは1本に固定(contains_no_pii / Groth16/BN254)
  • 完全オフライン検証(vkey のみ)・CI は circom 不要(snarkjs verify のみ)
  • 信頼境界を README/SECURITY に明記(発行・課金は別レイヤ=Trust402側)
  • クリーンビルドで全5パッケージ整列・dist に vkey 同梱・全テスト green(67

境界(既出の確認)

これは OSS の検証エンジンのみ。proof の発行・メータリング・課金は Trust402 側(このrepoには持ち込まない)。

M1 残り

VOKF-9(実 OKF バンドルの worked example)。これでM1の主要2本(visualizer+attestation e2e)が揃います。

🤖 Generated with Claude Code

…F-7 / M1)

Wires a real Groth16 proof into the §10 attestation path, exercising the
verified and attestation_failed branches (not just unsupported_scheme).

- circuits/contains_no_pii/: a minimal Circom 2 demo circuit proving a
  private field is 0 (PII absent), plus gen.sh and the committed
  verification key + a sample proof (heavy ptau/zkey/wasm gitignored).
- @verifiable-okf/attest-zk-groth16: an AttestationVerifier for the
  zk-groth16 scheme — decodes the base64 proof and runs
  snarkjs.groth16.verify offline (verification key only; no proving key,
  no circom, no network). Bundles the contains_no_pii vkey.
- fixtures/signed/with-zk-attestation.md (valid proof → verified) and
  with-bad-zk-attestation.md (validly signed, wrong public signal →
  attestation_failed).

Tests (5): real proof → verified via the verifier policy; validly-signed
but failing proof → attestation_failed; carrier-only (not required) →
verified; verifier fn valid→true / unknown-circuit→false / wrong-signal
→false. Clean build orders all 5 packages; dist bundles the vkey. Full
suite green (canon 28 + signer 7 + verifier 22 + visualizer 5 +
attest 5 = 67).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aggre
aggre merged commit 2973f3b into main Jun 15, 2026
1 check passed
@aggre
aggre deleted the m1/attest-groth16 branch June 15, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants