Strict-PPT certificates for typed UC machine families #
This module defines strict polynomial-time certificates and predicates for typed UC machine
families (Machine, Protocol, Adversary, Environment, and IdealFunctionality) in this
library's word model, following the typed-object-plus-encoding convention of AdversaryOf.IsPPT
and building on WordInterface (CslibFrontier.Crypto.Protocols.UC.WordInterface).
Every definition in this file is a library construction for this word model rather than Definition 6 of [Can20a]. In particular:
PPTParam.replyBoundandEnvParam.replyBoundare explicit reply-length caps passed toProbOracleComp.lowerWith(bounding how many bits are read from each lowered imported reply), not the import field of [Can20a], Section 3.2.PPTCertificate.initcertifies(M p.secParam p.corrupted).initunderencPPTParam nso it shares a parameter encoding withPPTCertificate.handle; the initialization program itself does not inspectp.replyBound.PPTCertificatebounds only additive encoded-state growth per activation (growth,growth_poly,preserve) and omits any state-independent reply-length bound: replies may grow with the encoded state, bounded automatically byPPTCertificate.handle'sIsOraclePPTOnoutput-length bound and consumed byIsOraclePPTOn.run_interpret_preprocess_open_of_bounded_growthviaPPTCertificate.preserve_wordHandle.Environment.IsPPTis uniform (no nonuniform advice) and runs in time polynomial insecParam + replyBound + aux.length, admitting environments whose work grows withreplyBoundandaux.length(unlikeEnvironment.PolyBounded'sκ-only call budget).- No implication is claimed between
Protocol.IsPPT/Adversary.IsPPT/Environment.IsPPTand the call-budget predicatesProtocol.PolyBounded/Adversary.PolyBounded/Environment.PolyBounded.
Main definitions #
Cslib.Crypto.Protocols.UC.PPTParam,Cslib.Crypto.Protocols.UC.encPPTParam: activation parameters(secParam, replyBound, corrupted)for a UC machine family and their encoding.Cslib.Crypto.Protocols.UC.EnvParam,Cslib.Crypto.Protocols.UC.encEnvParam: activation parameters(secParam, replyBound, aux)for a UC environment and their encoding.Cslib.Crypto.Protocols.UC.WordCodec,Cslib.Crypto.Protocols.UC.StateCodec: injective binary state presentation with total left-inverse decoder for a UC machine or ideal functionality.Cslib.Crypto.Protocols.UC.wordHandle,Cslib.Crypto.Protocols.UC.wordRunFrom,Cslib.Crypto.Protocols.UC.wordRun: one word-level activation of a typed UC machine family, its parameterized state-passing execution from an encoded state, and the full word-level execution of a lowered environment againstwordHandlefrom sampled initial state.Cslib.Crypto.Protocols.UC.punitWordCodec: canonicalWordCodec PUnitencodingPUnit.unitas[].Cslib.Crypto.Protocols.UC.PPTCertificate: strict-PPT certificate for a UC machine family (init,handle, and polynomially bounded additive state growthpreserve).Cslib.Crypto.Protocols.UC.Machine.IsPPTFamily,Cslib.Crypto.Protocols.UC.Protocol.IsPPT,Cslib.Crypto.Protocols.UC.Adversary.IsPPT,Cslib.Crypto.Protocols.UC.Environment.IsPPT,Cslib.Crypto.Protocols.UC.IdealFunctionality.wordStep,Cslib.Crypto.Protocols.UC.IdealFunctionality.PPTCertificate,Cslib.Crypto.Protocols.UC.IdealFunctionality.IsPPT: strict-PPT predicates and shared word-step for UC machines, protocols, adversaries, environments, and ideal functionalities.
Main results #
Cslib.Crypto.Protocols.UC.PPTCertificate.preserve_wordHandle: invariant-and-growth bridge fromPPTCertificatetoIsOraclePPTOn.run_interpret_preprocess_open_of_bounded_growth.Cslib.Crypto.Protocols.UC.Environment.IsPPT.isOraclePPTOn_run_wordHandle: running a strict-PPT environment against any machine family equipped with aPPTCertificateunder polynomial-time parameter maps yields a uniform strict oracle-PPT program.Cslib.Crypto.Protocols.UC.Machine.isPPTFamily_id: the forwarding machineMachine.idis strict PPT over anyWordInterface.Cslib.Crypto.Protocols.UC.Adversary.isPPT_dummyAdversary: the dummy adversary is strict PPT over any networkWordPort.Cslib.Crypto.Protocols.UC.IdealFunctionality.IsPPT.toProtocol: a strict-PPT ideal functionality yields a strict-PPT protocol.
References #
- R. Canetti, Universally Composable Security, Section 3.2 (Polynomial Time ITMs and Parameterized Systems; Definition 6) and Section 4.3.1 (Emulation with Respect to the Dummy Adversary): context for UC polynomial time and the dummy adversary. The strict-PPT certificates here are library constructions for this word model, not Definition 6 of [Can20a].
Activation parameters #
Library construction (no cited definition): activation parameters for a UC machine family in
this library's word model. Here replyBound is the prefix length read from each lowered imported
oracle reply (not the import field of [Can20a], Section 3.2).
Library construction (no cited definition): activation parameters for a UC environment in this
library's word model. Here replyBound is the prefix length read from each lowered execution
query (not the import field of [Can20a], Section 3.2).
Library construction (no cited definition): binary encoding of EnvParam as framed unary
secParam, framed unary replyBound, and unframed aux (encBits).
State codecs, word activations, and strict-PPT certificates #
Library construction (no cited definition): injective binary presentation of a type α with a
total left-inverse decoder. Unlike Turing.MultiTapeTM.Decoder, this omits a standalone
ComputableInDegree obligation on decode; instead PPTCertificate.normalize and
IdealFunctionality.PPTCertificate.normalize certify the combined word map enc ∘ decode in
polynomial time, matching PPTCertificate.handle (and onInput / onBackdoor).
Injectively encode a value as a bit word.
Total decoder recovering a value from a bit word.
Decoding an encoded value recovers it.
Library construction (no cited definition): one word-level activation of M p.secParam p.corrupted. It decodes the exported request via iE and the state word via codec, runs the
lowered activation with imported replies truncated to p.replyBound bits, and re-encodes the
typed reply and updated state.
Library construction (no cited definition; not Definition 6 of [Can20a]): a strict-PPT
certificate for a UC machine family M in this library's word model.
initcertifies(M p.secParam p.corrupted).initunderencPPTParam nso it shares the parameter encoding withhandle; the initialization program ignoresp.replyBound.handlecertifieswordHandleas a uniform strict oracle-PPT program onencHandlerCall.normalizecertifies state-word renormalizationenc ∘ decodein polynomial time (analogous toWordInterface.computable_replyNormalize), needed so composite routing/composition branches can preserve untouched components' behavior on off-image state words.growth,growth_poly, andpreservebound additive encoded-state growth per activation by a polynomial in the encoded parameter and request word alone (independent of the current state). No state-independent reply bound is imposed: replies may depend on the current state and are bounded automatically byhandle's output-length bound.
- codec : StateCodec M
Binary presentation of the family's private states.
- init : Probability.IsPPTOn (encPPTParam n) Turing.MultiTapeTM.encBits fun (p : PPTParam n) => ⇑(self.codec p.secParam p.corrupted).enc <$> (M p.secParam p.corrupted).init
Initializing the machine and encoding its initial state is uniform strict PPT under
encPPTParam n(the initialization program ignoresp.replyBound). - handle : Probability.IsOraclePPTOn (Probability.encHandlerCall (encPPTParam n) (Turing.MultiTapeTM.encFinite iE.Channel) Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) fun (x : PPTParam n × (iE.Channel × List Bool) × List Bool) => wordHandle M iI iE self.codec x.1 x.2.1 x.2.2
One lowered word activation is uniform strict oracle PPT in the parameter, request, and state word.
- normalize : Turing.MultiTapeTM.ComputableInPolyTime (fun (x : PPTParam n × List Bool) => (self.codec x.1.secParam x.1.corrupted).enc ((self.codec x.1.secParam x.1.corrupted).decode x.2)) (Turing.MultiTapeTM.encPair (encPPTParam n) Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits
Decoding and re-encoding an arbitrary state word is uniformly computable in polynomial time (
enc ∘ decode). A branch that leaves a component's state unchanged must still re-encode its state word, including words outside the codec's image, in polynomial time; this normalization cost is needed for closure under routing, adversary placement, and composition (analogous toWordInterface.computable_replyNormalize). Additive encoded-state growth bound per activation, depending only on the parameter and request word (not on the current state).
- growth_poly : Turing.MultiTapeTM.PolyBounded (fun (pair : PPTParam n × List Bool) => ((Turing.MultiTapeTM.encPair (encPPTParam n) Turing.MultiTapeTM.encBits) pair).length) fun (pair : PPTParam n × List Bool) => self.growth pair.1 pair.2
growthis polynomially bounded in the encoded parameter and request word. - preserve (p : PPTParam n) (request : iE.Channel × List Bool) (s : (M p.secParam p.corrupted).State) (result : List Bool × List Bool) : result ∈ OracleComp.support (wordHandle M iI iE self.codec p request ((self.codec p.secParam p.corrupted).enc s)) → result.2.length ≤ ((self.codec p.secParam p.corrupted).enc s).length + self.growth p request.2
Starting from any encoded state, every supported word activation grows the encoded state by at most
growth p request.2bits.
Library infrastructure (no cited result): PPTCertificate.preserve in the exact invariant
and additive-growth form consumed by
IsOraclePPTOn.run_interpret_preprocess_open_of_bounded_growth.
Strict-PPT predicates for UC machines, protocols, adversaries, and environments #
Library construction (no cited definition; not Definition 6 of [Can20a]): a UC machine
family is strict PPT in this library's word model when it admits a PPTCertificate.
Library construction (no cited definition; follows the typed-object-plus-encoding convention
of AdversaryOf.IsPPT, not Definition 6 of [Can20a]): a UC protocol is strict PPT in this
library's word model for party port party and network port netPort when it admits a
PPTCertificate over WordInterface.empty and WordInterface.protocol party netPort. No
implication to or from Protocol.PolyBounded is claimed.
Library construction (no cited definition; follows the typed-object-plus-encoding convention
of AdversaryOf.IsPPT, not Definition 6 of [Can20a]): a UC adversary is strict PPT in this
library's word model for imported network port netPort and exported adversary port adv when it
admits a PPTCertificate over WordInterface.net netPort and WordInterface.net adv. No
implication to or from Adversary.PolyBounded is claimed.
Library construction (no cited definition; follows the typed-object-plus-encoding convention
of AdversaryOf.IsPPT and aligns docstring style with MPC.Environment.IsPPT, not Definition 6 of
[Can20a]): a UC environment is uniform strict oracle PPT for party and adv when one
uniform strict oracle-PPT machine reads encEnvParam (unary secParam, unary replyBound, and
aux) and simulates the lowered execution program ProbOracleComp.lowerWith (WordInterface.exec party adv) e.replyBound (Z e.secParam e.aux).
Because the clock is polynomial in secParam + replyBound + aux.length, this admits environments
whose work grows with replyBound and aux.length (unlike Environment.PolyBounded's κ-only
call budget), and it is uniform (no nonuniform advice). No implication to or from
Environment.PolyBounded is claimed.
Ideal functionalities #
Library construction (no cited definition): one word-level activation of a closed ideal
functionality step step, decoding the request word through port and the state word through
codec, running step, and re-encoding the reply and updated state.
Library construction (no cited definition; not Definition 6 of [Can20a]): a strict-PPT
certificate for a UC ideal functionality in this library's word model. Because an ideal
functionality makes no imported oracle calls and onInput/onBackdoor do not depend on κ or C,
init is certified on (κ, C) while onInput and onBackdoor are certified as closed IsPPTOn
programs on (request word, state word) with one additive encoded-state growth bound.
Binary presentation of the functionality's private state.
- init : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encFinite (Finset (Fin n)))) Turing.MultiTapeTM.encBits fun (p : ℕ × Finset (Fin n)) => ⇑self.stateCodec.enc <$> F.init p.1 p.2
Initializing the functionality and encoding its state is uniform strict PPT in
(κ, C). - onInput : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (wordStep party self.stateCodec fun (q : Fin n × In) => F.onInput q.1 q.2)
Answering a decoded party-port word request and re-encoding the reply and next state is uniform strict PPT.
- onBackdoor : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) (wordStep back self.stateCodec F.onBackdoor)
Answering a decoded backdoor word request and re-encoding the reply and next state is uniform strict PPT.
- normalize : Turing.MultiTapeTM.ComputableInPolyTime (fun (w : List Bool) => self.stateCodec.enc (self.stateCodec.decode w)) Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits
Decoding and re-encoding an arbitrary state word is computable in polynomial time (
stateCodec.enc ∘ stateCodec.decode): a branch that leaves a component's state unchanged must still re-encode its state word, including words outside the codec's image, in polynomial time, needed for closure under hybrid wrapping and protocol composition (analogous toWordInterface.computable_replyNormalize). Additive encoded-state growth bound per activation, depending only on the request word.
growthis polynomially bounded in the request word length.- preserve_onInput (req : List Bool) (s : F.State) : let q := party.queryDecoder.decode req; ∀ result ∈ ((F.onInput q.1 q.2).run s).eval.support, (self.stateCodec.enc result.2).length ≤ (self.stateCodec.enc s).length + self.growth req
Every supported party-port transition from an encoded state grows the encoded state by at most
growth reqbits. - preserve_onBackdoor (req : List Bool) (s : F.State) (result : BackR × F.State) : result ∈ ((F.onBackdoor (back.queryDecoder.decode req)).run s).eval.support → (self.stateCodec.enc result.2).length ≤ (self.stateCodec.enc s).length + self.growth req
Every supported backdoor transition from an encoded state grows the encoded state by at most
growth reqbits.
Library construction (no cited definition; follows the typed-object-plus-encoding convention
of AdversaryOf.IsPPT, not Definition 6 of [Can20a]): a UC ideal functionality is strict PPT
in this library's word model for party port party and backdoor port back when it admits an
IdealFunctionality.PPTCertificate.
Environment-machine composition #
Library construction (no cited definition): state-passing word-level execution of a lowered
UC environment Z evaluated at envParam e against wordHandle at param e, starting from an
already-encoded machine state state.
Library construction (no cited definition): word-level execution of a lowered UC environment
Z evaluated at envParam e against a machine family M at param e equipped with a
StateCodec, sampling the encoded initial state of M (param e).secParam (param e).corrupted and
interpreting the lowered environment through wordHandle.
Library infrastructure (no cited result): running a strict-PPT environment at envParam e
against any machine family equipped with a PPTCertificate at param e via wordRun
(sampling the initial encoded state via cert.init and interpreting lowered queries via
cert.handle with polynomially bounded additive state growth cert.preserve_wordHandle) yields a
uniform strict oracle-PPT program over iI.Channel.
Baseline certificates #
Library construction (no cited definition): canonical WordCodec for PUnit states,
encoding PUnit.unit as [].
Library infrastructure (no cited result): the stateless forwarding machine Machine.id E has
a strict-PPT certificate over any WordInterface E.
Library infrastructure (no cited result): the dummy adversary forwarding netSpec NetQ NetR has
a strict-PPT certificate in this library's word model (toward #6043, not Definition 6 of
[Canetti2020]).
Library infrastructure (no cited result): a strict-PPT ideal functionality induces a strict-PPT
protocol via IdealFunctionality.toProtocol.