Add explicit proof bundle bindings and ZK statement metadata#260
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 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; |
There was a problem hiding this comment.
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 👍 / 👎.
f785915
into
codex/implement-opengraph-image-rendering-for-verified-glyphs-zhhgfy
Motivation
Description
PROOF_BINDINGS,ZK_STATEMENT_BINDING, andZK_STATEMENT_DOMAINconstants and corresponding typesProofBundleBindingsandZkStatementinsrc/components/KaiVoh/verifierProof.ts.bindingsandzkStatement(ProofBundleLike/ProofBundle), and populate these fields when building bundles inSigilModal,KaiVohApp, andpages/SigilPage/exportZip.tsso exported/embedded metadata carries the explicit rules.src/utils/sigilMetadata.tsto extractbindingsandzkStatementfrom embedded proof blocks, and include them inextractProofBundleMetaFromSvgresults.bindings/zkStatemententries in the verifier audit/receipt output insrc/pages/VerifyPage.tsxso audit JSON shows the declared binding and ZK statement.Testing
Codex Task