Word encodings, trapdoor preimage systems, and shared UOV ROM helpers #
Defines framed word encodings and strict parsers, WordTrapdoorPreimageSystem,
wordDetScheme, wordSaltedScheme, bounded-preimage typed adapters (toBoundedTyped),
and shared polynomial-time list/oracle/sampling utilities used across the UOV ROM
reduction modules.
Word-level encodings, decoders, and strict target/salt/preimage parsing #
Canonical membership test for encPair encBits encBits: holds iff w equals the
re-encoding of (unframe w, dropFrame w).
Word-level trapdoor preimage systems, INV, and PS #
Uniform PPT trapdoor-preimage signature core on word keys/preimages and fixed-width bit-string
targets BitString (targetLen n).
Key-pair generator
(pk, sk)at unary parametern.Target bit-width schedule in unary security parameter
n.Forward map
P(pk, s)returning a target word of lengthtargetLen n.Trapdoor inversion sampler returning
noneon explicit failure.Secret-free simulated preimage sampler used in preimage simulatability (
PS).- keyGen_ppt : Probability.IsPPTOn Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) self.keyGen
Key generation is uniform strict PPT.
- targetLen_poly : Turing.MultiTapeTM.ComputableInPolyTime self.targetLen Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encUnary
Target bit width is computable in polynomial time in unary.
- eval_poly : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : ℕ × List Bool × List Bool) => self.eval p.1 p.2.1 p.2.2) encTrapdoorInput Turing.MultiTapeTM.encBits
Forward evaluation is deterministic polynomial time.
- invert_ppt : Probability.IsPPTOn encTrapdoorInput (Turing.MultiTapeTM.encOption Turing.MultiTapeTM.encBits) fun (p : ℕ × List Bool × List Bool) => self.invert p.1 p.2.1 p.2.2
Trapdoor inversion is uniform strict PPT.
- samplePreimage_ppt : Probability.IsPPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits fun (p : ℕ × List Bool) => self.samplePreimage p.1 p.2
Simulated preimage sampling is uniform strict PPT.
Word-level target verification for optional preimages.
Typed TrapdoorPreimageSystem induced by sys at parameter n on targets
BitString (sys.targetLen n).
Simulated word PS sample: draw s ← sys.samplePreimage n pk and return (eval n pk s, some s).
Combined polynomial length bound on (1ⁿ, pk, sk) supports for (pk, sk) ← sys.keyGen n
together with y (length = sys.targetLen n), (sys.invert n sk y), and (sys.samplePreimage n pk): provides uniform pk.length ≤ keyBound n and encoded PS reply bound psReplyBound n.
Word-level target preimage inverter (INV adversary): receives (n, (pk, y)) and outputs an
optional candidate preimage Option (List Bool).
Efficiency predicate for a WordPreimageInverter.
Typed view of a word preimage inverter at parameter n.
Word-level uniform target inversion (INV) experiment.
Word-level preimage resistance (INV, [KosugeXagawa2022], Section 2.2, Figure 3, and
Definition 4, pp. 8–9): every uniform classical strict-PPT WordPreimageInverter succeeds in
wordTargetGame with negligible probability.
Word-level preimage simulatability (PS) distinguisher: queries the Unit oracle for an
encoded (y, xOpt) pair and outputs a Boolean bit.
Typed view of a WordPSDistinguisher at parameter n, encoding oracle answers (y, xOpt) via
encPair encBits (encOption encBits).
Real word PS experiment (b = 0).
Simulated word PS experiment (b = 1).
Word-level preimage simulatability (PS, novel to this library; closest source:
[KosugeXagawa2022], Section 2.3, Figure 4 (PS) and Definition 7, p. 10):
wordPsGameReal and wordPsGameSim are indistinguishable to every uniform classical
strict oracle-PPT WordPSDistinguisher.
Implies [KosugeXagawa2022] Definition 7 (PS): a 1-query distinguisher checking
xOpt.isSome forces negligible invert failure probability, so retrying none shifts a
q-query view negligibly, and dropping y recovers Fig. 4. The converse fails for samplers
that fail non-negligibly on valid conditional distributions (for instance, for a system where
eval ∘ samplePreimage is uniform on targets, a sampler returning none with probability
1 / 2 and otherwise matching samplePreimage conditioned on eval: Fig. 4's retry hides the
failures, while xOpt.isSome separates the no-retry games). Unlike Fig. 4, real samples keep
none failures without retrying and expose (y, xOpt) rather than xOpt alone. The
accompanying test suite exhibits both a satisfiable identity system and a constant-none
failing instance.
Why it is plausible. Any trapdoor sampler whose conditional invert law matches
samplePreimage up to negligible distinguishing advantage and whose none failure rate is
negligible satisfies WordPreimageSimulatable as well as Definition 7.
Elimination step applying WordPreimageSimulatable at a concrete WordPSDistinguisher.
Shared polynomial-time word cache, reply decoding, and query-domain helpers #
Boolean validity check matching parseSaltedQuery? sLen w |>.isSome.
Finite subtype of bit words of length at most m, used to restrict preimage spaces at fixed
security parameter n.
Instances For
Finiteness of BoundedWord m via its injection into BitString m × Fin (m + 1).
Polynomial upper bound on preimage lengths produced by sys.invert n.
Clip an optional word preimage to BoundedWord bound, rejecting longer words as none.
Idealized per-target random inversion table sampled from sys.invert and clipped at
sysInvBound sys n.
Word ROM signature schemes (wordDetScheme and wordSaltedScheme) #
Non-dependent secret key type for wordDetScheme: (sk, invTable) where invTable maps raw
target words to optional preimages.
Deterministic unsalted word-level ROM hash-and-sign scheme backed by sys.
The secret key carries a truly random preimage-inversion table (wordInvTable, with no PRF
derandomization and no retry on none), so signing is idealized rather than polynomial-time.
Salted word-level ROM hash-and-sign scheme backed by sys and salt bit width saltLen n.
Per-signature signing coins carry a uniform salt and a truly random preimage-inversion table
(wordInvTable, with no PRF derandomization and no retry on none), so signing is idealized
rather than polynomial-time.
Completeness of wordDetScheme: when (sys.toTyped n).InvertCorrect holds, every signature
produced by wordDetScheme sys n verifies under the same random-oracle cache.
Completeness of wordSaltedScheme: when (sys.toTyped n).InvertCorrect holds, every
signature produced by wordSaltedScheme sys saltLen n verifies under the same random-oracle
cache.