Componentwise resources for concrete security #
Concrete reductions need to retain static descriptions and charge online execution without
identifying unrelated units. An explicit InstalledArtifact list records each stored occurrence.
Per-kind description sizes are sums over that inventory, so distinct stored copies contribute
separately, while components inlined into a final artifact are not charged again. Adversaries,
reducers and generic or main programs have independent coordinates; separately installed handlers
and static tables or advice use their own occurrences too. AttackResources adds the common
execution coordinates; Fits and IsPolynomial keep every comparison and asymptotic bound
componentwise.
Offline generation is not online time unless the attack executes it. A generated artifact is still an installed occurrence, whether its compiler ran online or offline. A canonical phase ledger records input reading, compilation and its output copy, marshalling, tags, dispatch, request/reply handling, handler/interpreter/controller work, and final-output production and copying. Its time sum and peak workspace are certified against the aggregate online coordinates. Compiler and final- output accounting refer to ledger phases rather than adding duplicate time or workspace fields.
This module sums only the times of the named online phases and takes their workspace maximum. It supplies no scalar total across unrelated units; any further aggregation must state its units and be proved separately. It also supplies no program, circuit or controller: callers provide exact retained artifacts and prove that their executions fit the declared budget.
Main definitions #
Cslib.Crypto.Game.InstalledArtifactKind: roles for independently retained static artifacts.Cslib.Crypto.Game.InstalledArtifact: one occurrence in the installed static inventory.Cslib.Crypto.Game.OnlinePhaseLedger: named online phases with exact aggregate operations.Cslib.Crypto.Game.ExecutedCompilerResources: executed compiler input and output lengths.Cslib.Crypto.Game.AttackExecutionResources: online, compiler, oracle and communication costs.Cslib.Crypto.Game.AttackResources: installed inventory plus execution resources.Cslib.Crypto.Game.CompilerInstallation: separate or inlined representation of compiler logic.Cslib.Crypto.Game.AttackResources.Fits: componentwise finite-budget comparison.Cslib.Crypto.Game.AttackResources.AccountsForExecutedCompiler: an online compiler and its emitted installed program are certified and charged without duplicating inlined code.Cslib.Crypto.Game.AttackResources.AccountsForOnlinePhases: a model certificate connects the ledger to execution and its exact time/workspace aggregates.Cslib.Crypto.Game.AttackResources.AccountsForOutput: initial input, emitted output and copying are connected to a model-specific execution certificate.Cslib.Crypto.Game.AttackResources.IsPolynomial: componentwise polynomial resource families.
Main results #
Cslib.Crypto.Game.IndistinguishableWithin.indistinguishable_attackResources: specialize the existing finite-to-asymptotic bridge to componentwise attack resources.
References #
This resource interface and bridge are original infrastructure.
The role of one separately installed static artifact occurrence. A final program containing
hardwired components is one program occurrence; those components are not additional occurrences.
- adversary : InstalledArtifactKind
A retained adversary program or circuit description.
- reducer : InstalledArtifactKind
A retained reduction program or circuit description.
- program : InstalledArtifactKind
A retained generic or main program or circuit description.
- generatedProgram : InstalledArtifactKind
A retained program or circuit emitted by a compiler.
- generator : InstalledArtifactKind
A retained uniform generator description.
- compiler : InstalledArtifactKind
A retained compiler description.
- interpreter : InstalledArtifactKind
A retained universal interpreter description.
- controller : InstalledArtifactKind
A separately retained wrapper or controller description.
- handler : InstalledArtifactKind
A separately retained oracle, query or operation-handler description.
- table : InstalledArtifactKind
A separately retained transition, dispatch or lookup table, including static advice.
One occurrence in the installed static inventory. Repeating the same value in the inventory models distinct stored copies and charges each copy once.
- kind : InstalledArtifactKind
The role under which this occurrence is installed.
- bits : ℕ
Exact encoded length of this occurrence.
Description bits of the occurrences of kind in an explicit installed inventory.
Concatenating inventories adds their per-kind occurrence sums. In particular, separately stored copies appearing in both inventories are charged separately.
Time and peak workspace charged to one named online phase.
Componentwise comparison of one online phase.
Instances For
A phase schedule has independently polynomial time and workspace.
Canonical ledger of online phases. Sequential phase times add; workspace is aggregated by maximum because phases need not retain each other's temporary storage. Compiler and output-copy costs occur here only, rather than in duplicate view fields.
- inputRead : OnlinePhaseResources
Reading and decoding the attack's initial input.
- compiler : OnlinePhaseResources
Executing an online compiler, including production of its emitted description.
- compilerOutputCopy : OnlinePhaseResources
Retaining or copying the compiler's emitted description.
- marshalling : OnlinePhaseResources
Marshalling values between representations.
- dispatch : OnlinePhaseResources
Dispatching operations or oracle calls.
- queryRequest : OnlinePhaseResources
Producing and transferring query requests.
- queryReply : OnlinePhaseResources
Receiving and decoding query replies.
- handler : OnlinePhaseResources
Executing separately identified handler logic.
- interpreter : OnlinePhaseResources
Executing interpreter logic.
- controller : OnlinePhaseResources
Executing wrapper or controller logic.
- outputProduction : OnlinePhaseResources
Producing the attack's final encoded output.
- outputCopy : OnlinePhaseResources
Retaining or copying the final encoded output.
The canonical phase order used for aggregation.
Exact total online time: every named phase occurrence contributes once.
Exact peak online workspace: the maximum of the named phase peaks.
Every phase coordinate of used fits the corresponding phase coordinate of budget.
Instances For
A phase ledger is polynomial when every named phase coordinate is polynomial independently.
- compilerOutputCopy : OnlinePhaseResources.IsPolynomial fun (n : ℕ) => (schedule n).compilerOutputCopy
Input/output lengths of a compiler executed inside the attack experiment. Its execution and output-copy costs are the corresponding online ledger phases, so they cannot be charged twice.
Execution resources of an explicitly realized attack. Compiler coordinates are zero when compilation is offline. Model-specific execution certificates separately justify that the declared input/output lengths and step/workspace bounds describe the actual programs.
- inputBits : ℕ
Encoded length of the attack's initial input, distinct from oracle requests.
- onlineTime : ℕ
Online steps, including marshalling, tags, dispatch, queries, interpreter/controller work, compiler work, and output production/copying, but excluding offline generation.
- onlineWorkspace : ℕ
Peak online workspace, rather than the sum of workspace across sequential phases.
- phases : OnlinePhaseLedger
Named online phase costs whose sum and maximum are certified against the aggregates above.
- compiler : ExecutedCompilerResources
Executed compiler input/output lengths; both are zero when compilation is offline.
- randomBits : ℕ
Fair random bits consumed online.
- classicalQueries : ℕ
Classical oracle calls.
- quantumQueries : ℕ
Coherent quantum-oracle calls.
- qubits : ℕ
Maximum simultaneously active qubits, including inputs and ancillas.
- gates : ℕ
Executed elementary quantum gates.
- requestBits : ℕ
Maximum encoded request length.
- replyBits : ℕ
Maximum encoded reply length read by the attack.
- outputBits : ℕ
Maximum encoded output length emitted by the attack.
Independent resources of an explicitly retained and executed attack. Static description sizes are derived from the occurrence inventory rather than supplied as unaudited numeric labels.
- installedArtifacts : List InstalledArtifact
Every separately retained static occurrence, charged once.
- execution : AttackExecutionResources
Online, compiler, oracle and communication coordinates.
How compiler logic used online is represented in the installed inventory. A separate compiler
is its own occurrence; an inlined compiler is part of one retained main-program occurrence and is
not also charged under compiler. The payload is that occurrence's exact encoded length.
- separatelyInstalled (bits : ℕ) : CompilerInstallation
- inlinedIntoProgram (bits : ℕ) : CompilerInstallation
The installed occurrence selected by a compiler-installation mode.
Instances For
Per-kind installed description bits of a resource profile.
Installed adversary-program or circuit bits, summed once per retained occurrence.
Installed reduction-program or circuit bits, summed once per retained occurrence.
Installed generic or main-program bits, summed once per retained occurrence.
Installed compiler-emitted program or circuit bits, summed once per retained occurrence.
Installed generator bits, summed once per retained occurrence.
Installed compiler bits, summed once per retained occurrence.
Installed interpreter bits, summed once per retained occurrence.
Installed separately retained wrapper/controller bits, summed once per occurrence.
Installed separately retained handler bits, summed once per occurrence. A handler hardwired
into the main program contributes only to programBits.
Installed separately retained transition, dispatch, lookup-table or static-advice bits,
summed once per occurrence. A table or advice string hardwired into the main program contributes
only to programBits.
A model-specific certificate ties every named phase to the represented execution, while the two equalities require exact aggregation rather than loose independent upper bounds. Compiler and output views are not added here because their costs already occur in the ledger.
An executed compiler is fully accounted for relative to a model-specific execution
certificate. The certificate connects compiler input/output and the ledger's compiler and
compiler-output-copy phases to an actual execution. The installation mode charges either a
separate compiler or the single main program containing inlined compiler logic. The emitted
description is a distinct generatedProgram occurrence. Phase costs are bounded by, but never
added again to, the overall online aggregates.
The attack's initial input, emitted output and copying are accounted for relative to a
model-specific execution certificate. This proposition is intended as an explicit part of a
concrete Within certificate; it does not manufacture an execution witness.
used fits budget when every named coordinate fits independently. This intentionally does
not turn the coordinates into a scalar total.
Instances For
Every exact resource profile fits itself.
A resource schedule is polynomial when each coordinate is polynomially bounded independently.
Exact finite advantage bounds yield asymptotic indistinguishability when every admissible adversary supplies an explicit componentwise-polynomial resource schedule and the finite error is negligible along every such schedule. The schedule premise does not extract any program or circuit from an existential efficiency hypothesis.