Signatures in the random-oracle model #
A signature scheme in the random-oracle model ([BS23], Section 8.10.2) signs and
verifies with oracle access to a function H : Query → Digest, which the security experiment
draws uniformly at random. Signing draws its coins and then runs an OracleComp program against
H; verification is a deterministic OracleComp program. The oracle is sampled lazily: each new
point gets a uniform answer, remembered in an association list (oracle), so the query and digest
types need not be finite beyond the digests.
The existential-unforgeability experiment (eufCmaGame, [BS23], Attack Game 13.1 in
its random-oracle version) gives a forger the public key and oracle access to the signer and to
H; the forger wins with a valid signature on a message it never asked to have signed. A
Forger has explicit coins, drawn first, and is otherwise a deterministic OracleComp program;
this is the form in which a forger can be rerun on the same coins, as forking needs. Its signing
and hash calls are counted separately (Forger.CallBounded), as security bounds depend on them
differently.
The shared interactive execution core (world, logSigning, runLoggedForger, liftVerify,
liftOracleForger, worldRealize, worldGame) realizes the forger's signing/hash interface and
the verifier's hash interface inside a single Cslib.Interactive.World whose state is the shared
random-oracle cache List (Query × Digest), with local signing-pair logging List (M × Sig).
Projecting the pair log recovers handler (runWith_world_runLoggedForger_liftOracleForger), and
specializing the post-verification acceptance predicate yields:
eufCmaGame, which gates only the final forged messagemsgbyFreshOutputsOnFinalMessage, leaving signing queries unrestricted and allowing internal random-oracle collisions;- key-only existential unforgeability
ufCma0Game; and - strong (fresh-pair) unforgeability
sufCmaGameand its key-only companionsufCma0Game.
A standard-model scheme Cslib.Crypto.Signature.Scheme is a scheme here with Query := Empty
(Signature.Scheme.toROM in CslibFrontier.Crypto.Computational.Signature.RandomOracle), and
its forgery experiments are instances of worldGame.
Main definitions #
Cslib.Crypto.Protocols.ROMSignature.ForgerSpec: the disjoint sum of signing and hash calls.Cslib.Crypto.Protocols.ROMSignature.Scheme: key generation, signing and verification.Cslib.Crypto.Protocols.ROMSignature.Forger: a forger with explicit coins.Cslib.Crypto.Protocols.ROMSignature.signingCost,Cslib.Crypto.Protocols.ROMSignature.hashCost,Cslib.Crypto.Protocols.ROMSignature.Forger.CallBounded: separate signing and hash call budgets.Cslib.Crypto.Protocols.ROMSignature.FreshOutputs,Cslib.Crypto.Protocols.ROMSignature.FreshOutputsOnFinalMessage: full transcript message distinctness and final-message freshness (msg ∉ queried).Cslib.Crypto.Protocols.ROMSignature.oracle,Cslib.Crypto.Protocols.ROMSignature.handler: the lazily sampled uniform random oracle and joint signing/hash handler.Cslib.Crypto.Protocols.ROMSignature.forgerWorldImpl,Cslib.Crypto.Protocols.ROMSignature.world,Cslib.Crypto.Protocols.ROMSignature.logSigning,Cslib.Crypto.Protocols.ROMSignature.runLoggedForger,Cslib.Crypto.Protocols.ROMSignature.liftVerify,Cslib.Crypto.Protocols.ROMSignature.liftOracleForger,Cslib.Crypto.Protocols.ROMSignature.worldRealize,Cslib.Crypto.Protocols.ROMSignature.worldGame: sharedCslib.Interactive.Worldexecution core.Cslib.Crypto.Protocols.ROMSignature.eufCmaGame,Cslib.Crypto.Protocols.ROMSignature.ufCma0Game,Cslib.Crypto.Protocols.ROMSignature.sufCmaGame,Cslib.Crypto.Protocols.ROMSignature.sufCma0Game: adaptive and key-only signature security games.Cslib.Crypto.Protocols.ROMSignature.Scheme.Correct,Cslib.Crypto.Protocols.ROMSignature.Scheme.CorrectOn: all-message and admissible-message completeness predicates.
Main results #
Cslib.Crypto.Protocols.ROMSignature.Forger.CallBounded.isQueryBounded: separate signing and hash bounds imply a total query bound.Cslib.Crypto.Protocols.ROMSignature.FreshOutputs.freshOutputsOnFinalMessage,Cslib.Crypto.Protocols.ROMSignature.decide_freshOutputsOnFinalMessage: full output freshness implies final-message freshness, decided by!queried.contains msg.Cslib.Crypto.Protocols.ROMSignature.lookup_of_mem_support_oracle,Cslib.Crypto.Protocols.ROMSignature.length_le_of_mem_support_oracle,Cslib.Crypto.Protocols.ROMSignature.lookup_mono_of_mem_support_oracle,Cslib.Crypto.Protocols.ROMSignature.interpret_oracle_mono_and_replay: post-call cache lookup, monotonicity, growth bounds, and deterministic replay fororacle.Cslib.Crypto.Protocols.ROMSignature.runWith_world_liftProver,Cslib.Crypto.Protocols.ROMSignature.runWith_world_liftVerify,Cslib.Crypto.Protocols.ROMSignature.runWith_world_runLoggedForger_liftOracleForger,Cslib.Crypto.Protocols.ROMSignature.eval_world_worldRealize,Cslib.Crypto.Protocols.ROMSignature.eval_world_worldRealize_liftOracleForger: exact execution equivalences for theInteractive.Worldcore.Cslib.Crypto.Protocols.ROMSignature.eufCmaGame_eq_worldGame,Cslib.Crypto.Protocols.ROMSignature.sufCma0Game_eq_ufCma0Game: shared-world characterizations of the signature games.Cslib.Crypto.Protocols.ROMSignature.Scheme.Correct.correctOn,Cslib.Crypto.Protocols.ROMSignature.Scheme.correctOn_true_iff: relationship betweenScheme.CorrectandScheme.CorrectOn.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 8.10.2, Attack Games 13.1–13.2 and Definitions 13.2–13.3.
The calls of a forger: a signing call names a message and returns a signature, and a hash call names a point and returns its digest.
A signature scheme in the random-oracle model, with public keys PK, secret keys SK,
messages M, signatures Sig, and oracle H : Query → Digest. Signing first draws coins.
Draw a public key and a secret key.
- SignCoins : Type
The signer's coins.
Draw the signer's coins for a message.
- sign : SK → M → self.SignCoins → OracleComp (fun (x : Query) => Digest) Sig
Sign, querying the oracle.
- verify : PK → M → Sig → OracleComp (fun (x : Query) => Digest) Bool
Verify, querying the oracle.
A forger with explicit coins: it draws its coins, then, given the public key, calls the signer and the oracle and outputs a message and a signature.
- Coins : Type
The forger's coins.
Draw the forger's coins.
Forge, calling the signer and the oracle.
A forger's call costs one when it is a signing call.
A forger's call costs one when it is a hash call.
A forger making at most signs signing and hashes hash calls makes at most
signs + hashes calls.
Every message in the signing query log and final candidate forgery is distinct.
Instances For
The final forged message msg was never queried to the signing oracle (msg ∉ queried),
allowing earlier signing queries or internal random-oracle queries to repeat.
Instances For
Distinctness of all outputs (FreshOutputs) implies freshness of the final forged message
(FreshOutputsOnFinalMessage).
A query at a point absent from the cache draws a uniform digest and records it.
A query at a cached point returns the cached digest and leaves the cache unchanged.
A table entry produced by a call of oracle is found at its queried point.
A call of oracle adds at most one entry to the cache.
Every cache transition of oracle preserves existing bindings and stores d at q.
Running an OracleComp against oracle Digest preserves existing cache entries, and the same
program deterministically replays (a, cFinal) on any extending cache cFinal.
Answer a forger's calls: sign with the secret key, recording the message, or query the oracle. Signing and the forger share the oracle.
Shared Interactive.World execution core #
Implementation of the forger's signing and hash calls against the shared random-oracle cache
List (Query × Digest) without recording a signing log.
The interactive oracle world of a random-oracle signature experiment under secret key sk:
the forger's signing and hash calls (ForgerSpec M Query Sig Digest) and the verifier's hash calls
(fun _ : Query => Digest) share the same lazily sampled random-oracle cache
List (Query × Digest).
Forger call handler that forwards signing and hash queries to the external ForgerSpec
oracle while logging each (message, signature) pair returned by the signing oracle.
Run an adaptive ProbOracleComp forger while recording the list of (message, signature)
pairs returned by the signing oracle.
Lift a verifier OracleComp over the hash oracle into the joint prover/verifier oracle
interface of world.
Embed a deterministic OracleComp forger program into ProbOracleComp.
Shared interactive execution core in world scheme sk: run a ProbOracleComp forger with
signing-pair logging, then run scheme.verify pk on the candidate forgery in the same
random-oracle world, and judge the outcome with accept verified msig pairs.
Evaluate a signature security game through Interactive.World.eval on world scheme sk:
draw (pk, sk) ← scheme.keyGen, run worldRealize scheme pk (forger pk) accept in
world scheme sk, and return the acceptance distribution.
Running a lifted prover computation in world scheme sk reduces to running it against
forgerWorldImpl scheme sk.
Running a lifted verifier computation in world scheme sk reduces to interpreting it against
oracle Digest.
Running runLoggedForger (liftOracleForger prog) against forgerWorldImpl scheme sk and
projecting the logged (message, signature) pairs to their first components reproduces
handler scheme sk.
Evaluating worldRealize on any ProbOracleComp forger in world scheme sk matches running
runLoggedForger forger against forgerWorldImpl scheme sk and then running scheme.verify on
the resulting cache.
Evaluating worldRealize on a lifted deterministic OracleComp forger in world scheme sk
matches running logSigning + forgerWorldImpl and then scheme.verify on the resulting cache.
Security games (eufCmaGame, ufCma0Game, sufCmaGame) #
The random-oracle EUF-CMA experiment ([BS23], Attack Game 13.1): the forger wins with a valid signature, under the same oracle, on a message it never had signed.
eufCmaGame is equivalent to evaluating worldRealize in world scheme sk with the
final-message freshness predicate !(pairs.map Prod.fst).contains msg.
Key-only existential unforgeability (ufCma0Game): the forger wins when its candidate
forgery verifies and it made zero signing queries (pairs.isEmpty).
Strong (fresh-pair) existential unforgeability under chosen-message attack (sufCmaGame):
the forger wins when its candidate (msg, sig) verifies and (msg, sig) was never returned by the
signing oracle (!pairs.contains (msg, sig)).
Key-only strong existential unforgeability (sufCma0Game): the forger wins when its candidate
(msg, sig) verifies, (msg, sig) was never returned by the signing oracle, and the signing log
is empty (pairs.isEmpty).
Key-only strong unforgeability sufCma0Game coincides with ufCma0Game because an empty
signing log contains no pairs.
Completeness (Scheme.Correct and Scheme.CorrectOn) #
A scheme is correct when every honest signature verifies under the same oracle, from every state of the oracle.
A scheme is correct on messages satisfying admissible when every honest signature on an
admissible message verifies under the same oracle, from every state of the oracle.
All-message correctness implies correctness on any admissible message predicate.
Correctness on fun _ => True is equivalent to unrestricted Scheme.Correct.