Skip to content

Add explicit proof bundle bindings and ZK statement metadata#260

Merged
kojibai merged 3 commits intocodex/implement-opengraph-image-rendering-for-verified-glyphs-zhhgfyfrom
codex/add-explicit-binding-fields-and-zk-statement
Jan 25, 2026
Merged

Add explicit proof bundle bindings and ZK statement metadata#260
kojibai merged 3 commits intocodex/implement-opengraph-image-rendering-for-verified-glyphs-zhhgfyfrom
codex/add-explicit-binding-fields-and-zk-statement

Conversation

@kojibai
Copy link
Copy Markdown
Owner

@kojibai kojibai commented Jan 25, 2026

Motivation

  • Make proof bundle integrity and ZK verification rules explicit so auditors and verifiers can read deterministic binding rules without recomputing implementation details.
  • Surface a simple ZK statement binding (capsule + svg + domain) so public inputs are clearly documented and avoid drift across versions.

Description

  • Introduce PROOF_BINDINGS, ZK_STATEMENT_BINDING, and ZK_STATEMENT_DOMAIN constants and corresponding types ProofBundleBindings and ZkStatement in src/components/KaiVoh/verifierProof.ts.
  • Extend proof bundle shapes to include bindings and zkStatement (ProofBundleLike / ProofBundle), and populate these fields when building bundles in SigilModal, KaiVohApp, and pages/SigilPage/exportZip.ts so exported/embedded metadata carries the explicit rules.
  • Update SVG metadata parsing in src/utils/sigilMetadata.ts to extract bindings and zkStatement from embedded proof blocks, and include them in extractProofBundleMetaFromSvg results.
  • Include the new bindings / zkStatement entries in the verifier audit/receipt output in src/pages/VerifyPage.tsx so audit JSON shows the declared binding and ZK statement.

Testing

  • No automated tests were run as part of this change (no CI/test commands executed).

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
phi-network-5aii Ready Ready Preview, Comment Jan 25, 2026 11:07am

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58a38ea161

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

bundleHashOf: "JCS(bundleWithoutBundleHash)",
authorChallengeOf: "bundleHash (hex bytes, KAS-1)",
} as const;
export const ZK_STATEMENT_BINDING = "Poseidon(capsuleHash|svgHash|domainTag)" as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align ZK statement binding with actual hash inputs

The new ZK_STATEMENT_BINDING claims the public input is Poseidon(capsuleHash|svgHash|domainTag), but the code actually derives zkPoseidonHash from the payload hash (computeZkPoseidonHash(payloadHashHex) in src/utils/kai.ts:95-100, used when generating bundles e.g. SigilModal.tsx:1336-1338). Any verifier or auditor trusting this binding string will recompute the wrong public input and conclude valid bundles are invalid. Either update the binding string to reflect the payload-hash input, or change the hash derivation to match the declared statement.

Useful? React with 👍 / 👎.

@kojibai kojibai merged commit f785915 into codex/implement-opengraph-image-rendering-for-verified-glyphs-zhhgfy Jan 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant