Skip to content

security(zk): commit circuit and verifier versions into every proof #96

Description

@enliven17

Summary

Prevent valid proofs from being replayed across incompatible circuit, verifier, network, or deployment versions.

Motivation

Harpocrates handles privacy-sensitive media, proof material, Stellar transactions, and on-chain verification. This change must be production grade: secure by default, bounded under hostile inputs, observable without leaking evidence or witnesses, and recoverable across partial failures.

Scope

  • Design and implement: domain format, version constants, public inputs, backend/frontend/contract propagation, migration policy, and cross-version rejection vectors
  • Integrate with existing area/zk modules and preserve API, artifact, proof, and contract compatibility unless a versioned migration is provided.
  • Define typed boundaries, configuration, persistence/artifact changes, rollout, and rollback constraints.
  • Add privacy-safe signals for state transitions, failures, saturation, and recovery.
  • Document threat assumptions, local verification, deployment impact, and troubleshooting.

Acceptance criteria

  • End-to-end behavior is implemented with explicit compatibility and rollout semantics.
  • Invalid, oversized, duplicated, concurrent, timed-out, cancelled, and partial operations fail deterministically and within resource bounds.
  • Unit tests cover logic and negative paths; integration/conformance tests exercise the real boundary.
  • Witnesses, media, credentials, signatures, and sensitive proof metadata never leak to logs or unintended storage.
  • Authorization, version/network binding, and abuse limits are tested.
  • Existing formatting, lint, type checks, tests, circuit checks, contract tests, and builds remain green.
  • Documentation covers configuration, migration/rollback, signals, and limitations.

Engineering expectations

Use explicit state machines, bounded work, idempotent transitions, canonical encodings, and versioned cryptographic domains. Avoid single-process correctness assumptions. Cryptographic changes require deterministic vectors shared across circuit, backend, frontend, and contract layers.

Out of scope

Real user evidence, production secrets, live mainnet deployment, unrelated visual redesign, or unrelated dependency upgrades.

Definition of done

Maintainers can reproduce positive and adversarial behavior, confirm privacy properties, operate the feature safely, and roll it back without undocumented repair.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar Wave programarea/zkNoir circuits and proof toolingcomplexity/high200 points - complex engineering or architecturehelp wantedExtra attention is neededtype/securitySecurity hardening

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions