Security against guessing Internet roulette outcomes #
Semantic security gives security for single-zero Internet roulette (Fin 37, outcomes 0..36)
([BS23], Section 2.2.4, pp. 22–25). The book defines four even-money bets (high,
low, even, odd, p. 22); RouletteBet includes those four and adds red and black,
making the universal statements over all players stronger. Each bet wins on 18 nonzero
wheel outcomes and loses on 0 and the remaining 18 outcomes, so an adversary betting against an
encrypted wheel outcome has concrete Internet roulette advantage
nndist Pr[W(r, bet) = 1] (18 / 37) (|Pr[W(r, bet) = 1] - 18 / 37|, p. 22).
In the concrete single-cipher model (Cipher.oneTimeExperiment), the explicit TwoStage reduction
rouletteReduction asks to distinguish a uniform r : Fin 37 from 0, equating the roulette
advantage with the semantic-security distinguishing advantage whenever valid admits every pair
(r, 0) on Fin 37 (rouletteAdvantage_eq_advantage_rouletteReduction, capturing (2.7) and (2.8)
on p. 23, and cf. (2.9) on p. 25; without an efficiency claim). The hypothesis
∀ r : Fin 37, valid r 0 = true is required because Cipher.oneTimeExperiment rejects pairs where
valid returns false, whereas Attack Game 2.1 admits every fixed-size message pair on Fin 37.
In the uniform asymptotic DEMOneTimeKeyINDCPAOf model (keyLen, encryptSym),
rouletteToDEMAdversary uses rouletteReduction with modular residue sampling
ProbComp.sampleModNat (width n) 37 in place of exact uniform Fin 37 sampling, saving the residue
encoded in unary length in the adversary state (isPPT_rouletteToDEMAdversary). Consequently,
rouletteDEMAdvantage_le_demKeyGame_add incurs a (74 : ℝ≥0) / 2 ^ width n statistical-distance
overhead (one 37 / 2 ^ width n term on each side of the two-experiment bound) where the book has
an equality. Fixing width := id internally,
DEMOneTimeKeyINDCPAOf.negligible_rouletteDEMAdvantage proves Theorem 2.9 (p. 23):
rouletteDEMAdvantage keyLen encryptSym A is negligible for every uniform strict PPT adversary
A : ℕ → List Bool → ProbComp RouletteBet.
Main definitions #
Cslib.Crypto.Encryption.RouletteBet,Cslib.Crypto.Encryption.rouletteWin: the four book even-money bets (even,odd,low,high) plusredandblackonFin 37, and the winning predicateW(r, bet).Cslib.Crypto.Encryption.rouletteExperiment,Cslib.Crypto.Encryption.idealRouletteExperiment,Cslib.Crypto.Encryption.rouletteAdvantage: the real and ideal roulette experiments and concrete roulette advantage.Cslib.Crypto.Encryption.rouletteReduction: the parameterizedTwoStagesemantic-security reduction.Cslib.Crypto.Encryption.rouletteDEMExperiment,Cslib.Crypto.Encryption.rouletteDEMAdvantage,Cslib.Crypto.Encryption.rouletteToDEMAdversary: the parameterized DEM-style roulette experiment, advantage defined from it, and uniform adversary reduction.
Main results #
Cslib.Crypto.Encryption.succProbability_uniform_rouletteWin: each bet wins with probability18 / 37under uniformFin 37.Cslib.Crypto.Encryption.succProbability_idealRouletteExperiment: the ideal roulette experiment wins with probability18 / 37.Cslib.Crypto.Encryption.rouletteAdvantage_eq_advantage_rouletteReduction: display (2.7) (p. 23).Cslib.Crypto.Encryption.isPPT_rouletteToDEMAdversary: strict uniform PPT certification ofrouletteToDEMAdversary.Cslib.Crypto.Encryption.rouletteDEMAdvantage_le_demKeyGame_add: concrete DEM reduction bound.Cslib.Crypto.Encryption.DEMOneTimeKeyINDCPAOf.negligible_rouletteDEMAdvantage: asymptotic Theorem 2.9 fromDEMOneTimeKeyINDCPAOf.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 2.2.4 (pp. 22–25), Theorem 2.9 (p. 23).
Even-money bets on a 37-pocket single-zero roulette wheel Fin 37 ([BS23],
Section 2.2.4, p. 22). Includes the book's four bets (even, odd, low, high) together with
the additional bets red and black; each wins on 18 nonzero outcomes and loses on 0 and the
remaining 18 outcomes.
- red : RouletteBet
- black : RouletteBet
- even : RouletteBet
- odd : RouletteBet
- low : RouletteBet
- high : RouletteBet
Instances For
Winning predicate W(r, bet) for European roulette outcome r : Fin 37 and bet
bet : RouletteBet ([BS23], Section 2.2.4, p. 22). Outcome 0 always loses.
Under a uniform wheel spin r : Fin 37, every RouletteBet wins with probability 18 / 37.
Real Internet roulette experiment: spin a uniform wheel outcome r : Fin 37, sample a fresh
key k ← sampleKey, encrypt r, and test rouletteWin r bet on the adversary's bet
([BS23], Section 2.2.4, p. 22).
Ideal Internet roulette experiment: spin r : Fin 37, pass an encryption of the fixed outcome
0 to the adversary, and test rouletteWin r bet ([BS23], Section 2.2.4, p. 23).
In idealRouletteExperiment, the ciphertext reveals nothing about r, so any adversary wins
with probability 18 / 37.
Internet roulette advantage IRadv[A] := |Pr[W(r, bet) = 1] - 18 / 37| ([BS23],
Section 2.2.4, p. 22), packaged as a nonnegative real via nndist.
Explicit TwoStage semantic-security reduction for Internet roulette, parameterized by the
challenge index sampler sampleIndex ([BS23], Section 2.2.4, p. 23): choose (r, 0)
with r ← sampleIndex and save r, then on challenge ciphertext ct run A ct and return
rouletteWin r bet.
Display (2.7) ([BS23], Section 2.2.4, p. 23, and cf. (2.8)): whenever valid admits
every pair (r, 0) on Fin 37, rouletteAdvantage equals the semantic-security distinguishing
advantage of rouletteReduction (ProbComp.uniform (Fin 37)) A.
Uniform asymptotic DEM reduction #
Parameterized symmetric-cipher Internet roulette experiment using a keyLen n-bit key and
encryptSym n via wordCipher.
Parameterized symmetric-cipher Internet roulette advantage |Pr[W(r, bet) = 1] - 18 / 37|,
defined directly through rouletteDEMExperiment.
Word-level AdversaryOf (Fin 37) wrapper around rouletteReduction: phase 1 invokes
rouletteReduction with sampleModNat (width n) 37 and stores r.val in the unary state length;
phase 2 recovers r from state.length % 37, runs A n ct, and evaluates rouletteWin.
Whenever width is polynomial-time computable in unary and A is uniform strict PPT,
rouletteToDEMAdversary width A is a uniform strict PPT AdversaryOf (Fin 37).
Concrete DEM semantic-security reduction for Internet roulette: rouletteDEMAdvantage is
bounded by the distinguishing advantage of rouletteToDEMAdversary width A plus
(74 : ℝ≥0) / 2 ^ width n from approximating two Fin 37 uniform wheel spins with
ProbComp.sampleModNat (width n) 37.
Asymptotic Theorem 2.9 ([BS23], Section 2.2.4, p. 23): under
DEMOneTimeKeyINDCPAOf encIndex keyLen encryptSym, every uniform strict PPT adversary
A : ℕ → List Bool → ProbComp RouletteBet has negligible Internet roulette advantage.