Skip to content

VectorCommitment security layer: interface, ROM binding, and honest hiding #30

Description

@ajhavlin

Context

Branch ajhavlin/interface-refactor-and-binding-hiding-closures addresses three interconnected needs: a navigable human-readable entry point into the security layer, full closure of the ROM position binding chain, and a correction to make the hiding argument match the book's actual construction rather than a structurally incorrect collision proxy.

Motivation

Human-readable interface

The VectorCommitment security layer had grown across many commits into a collection of files with no single entry point for developers. VectorCommitment.Interface and VectorCommitment/INTERFACE.md provide that entry point: a single import facade listing all four security notions (HasPositionBinding, HasStraightlineExtractor, HasROMHiding, HasEquivocation), their current status, and where the machine-checked cores live.

ROM binding closure

The position binding chain is now fully proved without sorry:

  • A successful binding adversary must produce two different messages that open to the same commitment under the same verifier key.
  • Running the adversary and verifier against the same lazy-sampled random oracle means the adversary's winning output forces a collision in the oracle query trace.
  • The proved adaptive birthday bound (coupling_trace_le_collisionBound) bounds that collision probability.
  • The parameter layer (MerkleHasherParams.ofField, babyBear_binding_secure) converts this into concrete guarantees: BabyBear/KoalaBear/M31 are binding at the specified security level.

Honest hiding argument

The former HasHiding instance and its ROM discharge were structurally incorrect. The instance defined hidingAdvantage as the probability of a trace collision — the chance that two oracle queries collide in the same output bucket — which is a binding/collision notion, not a hiding notion. A hiding advantage measures an adversary's ability to distinguish a commitment to one message from a commitment to another. These are different security properties.

The replacement is HasROMHiding: a goal-shaped class whose real game is the oracle-native commitment distribution (sampling fresh per-leaf salts and sampling the lazy oracle jointly), whose ideal game is a uniform digest, and whose fixed error expression is n·q/|Salt| + (n−1)·q/|Digest|². An instance provides the real and ideal distributions, the error bound, and a proof that they are within that distance of each other. No instance is installed yet because constructing the oracle-native game requires lazy oracle infrastructure over the commitment distribution; that is the remaining mechanisation work.

Why the open Lean hiding proofs are acceptable

The root-hiding bound and the multi-opening privacy bound are both proved in the textbook via the standard ROM/salt hybrid argument:

  1. Each leaf salt is drawn uniformly and independently. The probability that any of the adversary's q oracle queries hits a specific leaf's (value, salt) input is at most q/|Salt| per leaf, giving total error n·q/|Salt| across n leaves.
  2. The internal-node labels are standard RO outputs over child digests. The probability of a pre-image collision across the n−1 internal nodes is bounded by (n−1)·q/|Digest|² via the birthday argument.
  3. The selective-opening privacy statement layers a simulator over this that can reproduce the correct (commitment, opening) view using only the opened leaf values and simulated salts for the remaining copath nodes.

These are standard results; the mathematical content is settled. The open Lean work is mechanising a known proof, not filling a mathematical gap. What is missing is the oracle-native commitment game — a PMF over (oracle, salt-vector) pairs that runs the lazy-sampling monad over the full commitment — and the bottom-up hybrid connecting the real game to the stated error. That is an engineering task, not a mathematical unknown. The five-step remaining plan is recorded in ROADMAP.md.

Current proof status

Area Status
Position binding ✅ Fully proved. HasPositionBinding instance with no sorry. Binding break → trace collision → birthday bound → BabyBear capstone.
Hiding (API + floor) HidingVectorCommitment takes typed Randomness ck. PMF.etvDist, PerfectHiding, not_perfectHiding_singleton floor, and 2^s ≤ |Salt| salt-entropy capstones all proved.
Developer interface VectorCommitment.Interface, INTERFACE.md, DESIGN.md, ROADMAP.md, USAGE.md reflect current state.
Extractability ◐ Reduced to one bridge lemma. HasStraightlineExtractor structure proved; extraction_win_le_trace_collision has one sorry pending cacheExtract_sound.
Hiding (reduction) ◯ OPEN. HasROMHiding declared; no instance installed. Oracle-native game and root-hiding/privacy bounds are the remaining work. Proved in the book.
Equivocation ✗ Out of scope of this PR, but needing work (requires programmable random oracle).

Active sorry inventory

Five sorry terms remain across four declarations (down from seven — see removal note below):

Declaration File Status
hidden_query_hit_le HiddenQuery.lean Book lemma:rom-ow-high-entropy; mechanisation gap
extraction_win_le_trace_collision ExtractabilityROM.lean Reduced to cacheExtract_sound bridge
equivocationAdvantage, equivocation_bound EquivocationROM.lean Out of scope of this PR, needing work (programmable RO)
mt_equivocation Theorems/Equivocation.lean Out of scope of this PR, needing work (True := sorry placeholder)

Two previously listed sorry terms were removed because the underlying statements were false or vacuous: mt_root_hiding_rom_bound stated the bound against a fixed oracle rather than the oracle-sampling distribution, which is false; mt_privacy_rom_loose was labelled as a multi-opening privacy theorem but actually only bounded the root distribution. Their structural backbone (mt_root_hiding, labelAt_eq_of_leaf_hash_eq) remains fully proved and is the propagation step the future reduction will reuse.

Follow-up checklist

  • Add human-readable interface (VectorCommitment.Interface, INTERFACE.md).
  • Close ROM position binding chain without sorry.
  • Replace incorrect HasHiding with goal-shaped HasROMHiding obligation.
  • Prove honest hiding floor: PerfectHiding, not_perfectHiding_singleton, PMF.etvDist.
  • Prove salt-entropy capstones (babyBear_byte_salt_hiding, babyBear_field_salt_hiding).
  • Remove false hiding claims (mt_root_hiding_rom_bound, mt_privacy_rom_loose).
  • Update DESIGN.md, INTERFACE.md, ROADMAP.md, USAGE.md, CHANGELOG.md.
  • Prove hidden_query_hit_le (book lemma:rom-ow-high-entropy).
  • Prove cacheExtract_sound and close extraction_win_le_trace_collision.
  • Construct the oracle-native commitment game (PMF over lazy oracle and per-leaf salt draws).
  • Prove root-hiding hybrid (bottom-up total-variation distance between real and ideal distributions argument; book §12.5).
  • Prove selective-opening privacy bound and install HasROMHiding instance.
  • Validate full build: lake build VectorCommitment VectorCommitment.Interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions