Skip to content

Tracking: connecting VCVio to cslib-frontier (strict PPT, VCVioFrontier, adequacy) #906

Open

Description

@dtumad

Objective

Connect VCVio to cslib-frontier, so that it has one definition of probabilistic polynomial time and one route to proving it:

  • Definition. PPT means cslib-frontier's (formerly complexitylib) strict uniform IsPPT and IsOraclePPT: one finite fair-coin machine and one polynomial clock, fixed across the security parameter.
  • Proof method. It is proved through PolyFun's quantitative witnesses and VCVio's backend-relative IsOraclePPTBy. An adequacy theorem connects the two.

The generic theory (the backend, typed-oracle encodings and adequacy) lives in PolyFun, tracked in Verified-zkEVM/PolyFun#425, which superseded Verified-zkEVM/PolyFun#337. This issue tracks VCVio's side, including the VCVioFrontier package in review in #1206. The design record is docs/design/computational-complexity.md; this issue is its checklist.

Current state

The status of the design doc's delivery phases at main f1e63c78:

  1. Foundation and usability audit: landed.
  2. Quantitative PolyFun core and first bounded closure: landed.
  3. Backend-neutral bridge, with IsOraclePPTBy, contracts and certificates: landed.
  4. Optional backend package: VCVioComplexity was removed in chore: remove VCVioComplexity and VCVioCslib, and fold VCVioWidgets into Examples #1073. Machine-level backends now go in PolyFun's nested PolyFunFrontier package (PolyFunFrontier: the cslib-frontier side of PolyFun PolyFun#425) and VCVio’s companion package (in review in feat(frontier): sync PolyFun and realize one-time pad and ElGamal security #1206).
  5. Adequacy: not landed. The general implication from IsOraclePPTBy to a strict open-oracle machine remains open.
  6. End-to-end canaries and tooling: partly landed. feat(frontier): sync PolyFun and realize one-time pad and ElGamal security #1206 adds machine-level one-time pad secrecy and a DDH bound for the implemented one-time ElGamal experiment.
  7. Expected time: not landed.
  8. Reactive/UC complexity: not landed. The findings are in the comments below, and the UC side is UC follow-ups from the PolyFun UC audit (HasPlugFactorization, quotient semantics, graded observations, non-vacuous OTP) #633.

What cslib-frontier (formerly complexitylib) changes

  • Phases 4 and 5. complexitylib now has oracle machines (MultiTapePTM.runOracle) and the oracle predicate IsOraclePPTOn, with closure rules and open stateful substitution (IsOraclePPT.run_interpret_preprocess_open). This replaces the planned VCVio-owned OracleTM. Adequacy becomes a generic PolyFun theorem, and VCVio states nothing machine-level of its own.
  • Closure. Its tidy multi-tape calculus inhabits every structural mixin and gives exact composition cost, so the general closure gate of phase 4 can be met.
  • Programs. ProbComp is the same FreeM in both libraries, by reducible unfolding.
  • Query bounds. VCVio's IsQueryBound is already PolyFun's IsRollBound (see refactor(QueryTracking): prove the total query bound laws by PolyFun's roll-bound laws #889), and PolyFun proves complexitylib's HasQueryBounds equivalent to it when every response type is inhabited. Its special cases (IsQueryBoundP, IsTotalQueryBound, IsPerIndexQueryBound, AllQueriesSatisfy) are now PolyFun charge bounds (refactor(query-bound): derive query-bound special cases from PolyFun charge bounds #1060).

VCVioFrontier

PR #1206 adds VCVioFrontier/ as a nested Lake package for the parts of VCVio that need cslib-frontier, with core VCVio staying backend-neutral. It mirrors PolyFun's PolyFunFrontier (Verified-zkEVM/PolyFun#424, #425). This section moved here from #1149.

Shape

  • Lakefile: requires VCVio by path = ".."; cslib-frontier pinned by commit (87063d8a in feat(frontier): sync PolyFun and realize one-time pad and ElGamal security #1206); PolyFun at VCVio's pin; and cslib and Mathlib at cslib-frontier's pins, declared last.
  • Toolchain: cslib-frontier's (v4.36.0-rc2 when planned), with its own committed manifest.
  • Scripts: scripts/check-pins.py checks the pins and --sync-from updates them from a PolyFun commit.
  • Layout: modules at their VCVio-relative path with -- frontier: … markers, and a VCVioFrontierTest library.
  • CI: a separate frontier.yml workflow filtered by path, running the build plus the axiom sweep.
  • Guard: core and Interop never import CslibFrontier.*, VCVioFrontier.* or PolyFunFrontier.*, and the root lakefile and manifest never name cslib-frontier. An umbrella check covers the nested package.
  • Conventions: never open Cslib, because ProbComp, OracleComp, OracleSpec and unifSpec collide and both libraries define a ppt tactic.

Roadmap

The items marked in review are in #1206, which uses Verified-zkEVM/PolyFun#511 on Verified-zkEVM/PolyFun#510.

  • Spike: VCVio's import closure on v4.36. VCVio moved to v4.36.0 in chore(deps): port VCVio to v4.36 and adopt upstream program logic and measure APIs #1169.
  • Package skeleton: lakefile, README, pin checks and sync, CI and import isolation. In review.
  • M1 (program bridge): canaries that both libraries' ProbComp are the same CSLib FreeM, and 𝒟[p] = (Cslib.ProbComp.eval p).toMeasure. In review.
  • M2 (asymptotic bridges): negligible ↔ Cslib.Crypto.Negligible; boolDist = Game.advantage; SecurityGame.secureAgainst ↔ Game.Indistinguishable. In review.
  • M3 (strict PPT): a typed-adversary strict-PPT predicate, stated through PolyFun's encoding lenses into the word interface rather than VCVio-specific encodings (word programs IsPPT and equal in distribution through pinned encodings); the strict-PPT instantiation of the family-level sealScheme hiding theorem (feat(PointerChainPuzzle): asymptotic hiding for parameter families of the sealed scheme #1152), with efficiency preservation of the reduction as a hypothesis. Partly in review. feat(frontier): sync PolyFun and realize one-time pad and ElGamal security #1206 gives ElGamal.AdversaryRealization for the two ElGamal procedures. The general encoding-lens predicate and the sealScheme instantiation remain open.
  • M5 (first discharged reduction): In review. ElGamal.ddhReduction_isPPT proves the one-time DDH reduction is strict PPT for each strict-PPT word adversary. For a word adversary realizing a typed adversary, AdversaryRealization.machine_output_openOracle identifies the machine’s output law with the encoded result of VCVio’s original handled reduction. ElGamal proof walkthrough
  • Later: discharge the sealScheme reduction's efficiency. That needs typed-to-word oracle encodings, the memoized random oracle and byte certificates.

Scope notes

  • Strict uniform PPT applies to parameter families. Fixed-size instantiations such as leanSeal get concrete statements only: an asymptotic class bounds nothing at a fixed parameter.
  • cslib-frontier has no ByteArray/UInt8 polynomial-time certificates yet.

Checklist

  • Unqualified IsPPT. Export it as complexitylib's predicate, after PolyFun's adequacy theorem lands. This settles the reservation in the design doc's "Decision summary".
  • Second-order bounds. Decide whether response-size models remain a separately named notion. complexitylib's oracle clock is first-order: polynomial in the input, with replies read through bounded prefixes.
  • Crypto overlap. Decide how VCVio relates to complexitylib's Cslib.Crypto layer (games, negligibility, PRG/PRF/GGM). Adopt only its complexity predicates.
  • Docs. Bring the delivery-phase status in docs/design/computational-complexity.md up to date. Partly done: the doc records the removal of VCVioComplexity and the move to cslib-frontier, and VCVioComplexity/PROVENANCE.md went with chore: remove VCVioComplexity and VCVioCslib, and fold VCVioWidgets into Examples #1073.

Moved from PolyFun #279

These VCVio items were listed under "Downstream" in Verified-zkEVM/PolyFun#279. They are checked against main 8cd101a9; the cost items were rechecked against main c2192f88 on 9 November.

The UC item (replace Context.fuel with a conservation bound) moves to #633.

Related

No issue or PR is opened in complexitylib, CSLib or Mathlib as part of this work.

Activity

  1. dtumad commented on Nov 12, 2026

    @dtumad
    CollaboratorAuthor

    Findings on phase 8 (reactive/UC complexity), from an audit of the UC layer at main 87bc1892f. The UC side is tracked in #633.

    No UC notion restricts the efficiency of the adversary, simulator or environment today.

    • ObservedCompEmulates, ObservedCompUCSecure and Standard.UCSecure take no bound at all.
    • AsympObservedCompEmulates (VCVio/Interaction/UC/Computational.lean:380) takes a free isPPT : Adv → Prop, but leaves the simulator and the systems unrestricted.
    • ReactiveSecurity bounds only fuel.
    • TokenBudgetCertificate and Conserving exist in PolyFun, but no security notion requires them.

    Two existing designs.

    • CatCrypt-core (spitters/CatCrypt-core) states efficiency as a predicate with closure fields, UCAdmClass (Crypto/UCAdmClass.lean:79). Its dummy-adversary equivalence uses exactly closure under pure, coproduct and bind (Crypto/CompUCEquivalence.lean:128-179).
      • Its notes record two pitfalls. Closure under precomposition by arbitrary functions admits every pure test (Crypto/UCAdmClass.lean:90-94). Real time classes are graded and are not instances (Complexity/D/TimeAdm.lean).
    • cslib-frontier f1b10c2 has a Canetti-style UC layer under polynomial call budgets (CslibFrontier/Crypto/Protocols/UC/). It models interaction, not running time (Emulation.lean:41-44).

    The closure theorem a polynomial-time UC class needs is proved in cslib-frontier and not yet here. Absorbing an adversary into an environment, composing a simulator with an adversary, and absorbing a hybrid protocol all reduce to oracle substitution:

    • cslib-frontier proves it as IsOraclePPTOn.run_interpret_preprocess_open (Computability/Probabilistic/Oracle/Substitution.lean:148), with per-call reply and state-growth allowances;
    • the VCVio/PolyFun resource-substitution theorem is still future work (VCVio/CryptoFoundations/Asymptotics/OracleClosure.lean:22-24).

    Direction for the UC design section (step 3 of docs/design/uc-campaign.md, drafted locally first).

    • Efficiency enters as a class whose fields are the closure laws the dummy-adversary and composition proofs use, and nothing more; in particular no closure under arbitrary maps.
    • The class of all machines recovers today's statistical notions.
    • The polynomial-time instance lives in PolyFunFrontier, built from IsOraclePPTOn per activation.

    Canetti's Claim 14, the equivalence of environment-dependent and standard simulators, additionally needs a universal environment in the class. I found only a deterministic clocked universal multi-tape machine in cslib-frontier (Computability/Machines/Turing/MultiTape/Universal/Clocked.lean), and no probabilistic oracle one; that absence is unconfirmed.

  2. changed the title [-]Tracking: computational complexity (PPT definition, complexitylib backend, adequacy)[/-] [+]Tracking: connecting VCVio to cslib-frontier (strict PPT, VCVioFrontier, adequacy)[/+] on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions