You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Groth16/Assurance] Design key/R1CS consistency verification before private-witness use #67
PR #61 validates canonical encodings, curve/subgroup membership and pinned artifact integrity. These checks do not establish that a proving key is consistent with its claimed R1CS and Powers of Tau, or protect a witness from a malicious key made entirely of valid subgroup points.
For example, shifting one private wire's L query by a known multiple of G preserves point validity but adds a witness-dependent term to a proof's pairing residual. An observer can test low-entropy witness guesses, including individual bits. This is particularly relevant to the account-ownership prover's root-key witness. The importer must not be described as a key-consistency or transcript verifier.
Current required boundary: independently run snarkjs zkey verify against the exact R1CS and trusted curve-appropriate .ptau, or obtain the key's pinned hash from someone trusted who performed that verification. A self-computed hash of an arbitrary download or a caller-supplied circuit fingerprint is insufficient. Verification does not remove the ceremony's honest-contributor/secret-destruction assumptions.
Proposed bounded follow-up (R2 validation with R3 witness-confidentiality impact):
Write and accept a security design before implementation: threat model, required artifacts/trust roots, exact invariants, malformed-input/DoS bounds, ceremony assumptions and API failure behavior.
Pin and review the reference equations and transcript verification behavior, including snarkjs v0.7.6 zkey_verify_fromr1cs.js and zkey_verify_frominit.js. Resolve profile differences explicitly; do not invent a new probabilistic check.
Specify whether the first milestone verifies full transcript/key consistency or a narrower property, and name any weaker result accordingly.
Add independent positive vectors and negative keys whose points all remain canonical, on-curve and in the subgroup but whose L/H/query data or circuit association is wrong. Differential-check against snarkjs.
Fail before private-witness operations on every supported import/prover route; qualify provider parity and bounded-memory behavior at large-key scale.
Document remaining audit and production ceremony gates and migration of artifact provenance manifests.
This is distinct from #66's narrow rejection of known-unfinalized gamma/delta-equal keys: rejecting that one profile is not a general key-consistency check. Neither issue replaces independently verified ceremony provenance.
Activity