{
  "type": "failure-mode",
  "name": "Public input encoding mismatch",
  "slug": "public-input-encoding-mismatch",
  "section": {
    "id": "audit",
    "number": "03",
    "title": "Auditing a ZK protocol",
    "url": "https://zkpick.com/audit/"
  },
  "url": "https://zkpick.com/audit/failure-modes/public-input-encoding-mismatch/",
  "markdown": "https://zkpick.com/md/audit/failure-modes/public-input-encoding-mismatch.md",
  "detail": "The circuit and the verifier disagree about how public inputs are ordered, packed, hashed or field-reduced. A proof about one statement is accepted as a proof about another, without any component behaving incorrectly in isolation.",
  "mitigation": "Define the encoding once, in the specification, and test round-trip equivalence across every implementation of it — circuit, prover, on-chain verifier and client.",
  "relatedOptions": [
    {
      "name": "Verifier and integration review",
      "url": "https://zkpick.com/audit/verifier-review/"
    }
  ],
  "updated": "2026-09-12",
  "version": "1.3",
  "canonical": "https://zkpick.com/audit/failure-modes/public-input-encoding-mismatch/",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "authors": [
    "MarketComp"
  ]
}