You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real-proof pointer: every proof in the distribution relies on inlining.
76
-
[`examples/Proofs/PRG/TriplingPRGSecure.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/PRG/TriplingPRGSecure.proof) is a clean illustration -- the
76
+
[`examples/Proofs/PRG/TriplingPRG_PRGSecurity.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/PRG/TriplingPRG_PRGSecurity.proof) is a clean illustration -- the
77
77
`TriplingPRG` scheme composes calls to an underlying `PRG`, and those calls are inlined
78
78
before the PRG reduction hops.
79
79
@@ -114,7 +114,7 @@ return u;
114
114
slice boundaries align with the component widths, saving a round-trip through
115
115
concatenation and slicing.
116
116
117
-
Real-proof pointer: [`examples/Proofs/SymEnc/SymEncPRFCPA$.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/SymEncPRFCPA%24.proof) -- the final
117
+
Real-proof pointer: [`examples/Proofs/SymEnc/SymEncPRF_INDCPA$_MultiChal.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/SymEncPRF_INDCPA%24_MultiChal.proof) -- the final
118
118
merge of two independent uniform samples into the CPA$ random game relies on XOR
119
119
absorption after the PRF is replaced by a random function.
120
120
@@ -146,7 +146,7 @@ ModInt<q> u <- ModInt<q>;
146
146
return u;
147
147
```
148
148
149
-
Real-proof pointer: [`examples/Proofs/SymEnc/ModOTPSecure.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/ModOTPSecure.proof) uses the ModInt
149
+
Real-proof pointer: [`examples/Proofs/SymEnc/ModOTP_INDOT.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/ModOTP_INDOT.proof) uses the ModInt
150
150
one-time-pad argument directly.
151
151
152
152
{: .note }
@@ -183,7 +183,7 @@ return (h ^ b) * (h ^ c);
183
183
return G.generator ^ (a * b + a * c);
184
184
```
185
185
186
-
Real-proof pointer: [`examples/Proofs/PubEnc/ElGamalCPA.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/PubEnc/ElGamalCPA.proof) uses the
186
+
Real-proof pointer: [`examples/Proofs/PubKeyEnc/ElGamal_INDCPA_MultiChal.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/PubKeyEnc/ElGamal_INDCPA_MultiChal.proof) uses the
187
187
group masking move (the DDH `Right` game replaces `pk ^ r` with a random group element `c`,
188
188
and the uniform-absorbs rule fires to simplify `mL * c` to `c`, making the ciphertext
**What it states:** Sampling uniformly with replacement from a set `S` is
428
428
indistinguishable from sampling without replacement (exclusion sampling, `<-uniq`).
@@ -447,12 +447,12 @@ UniqueSampling.NoReplacement compose R_Uniq against Adversary; // by UniqueSampl
447
447
G_after against Adversary; // interchangeability
448
448
```
449
449
450
-
Real-proof pointer: used in [`examples/Proofs/SymEnc/SymEncPRFCPA$.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/SymEncPRFCPA%24.proof),
Real-proof pointer: used in [`examples/Proofs/SymEnc/SymEncPRF_INDCPA$_MultiChal.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/SymEncPRF_INDCPA%24_MultiChal.proof),
**What it states:** Applying a hash function `H : D -> BitString<n>` to a uniformly
458
458
sampled input from `D` is indistinguishable from sampling `BitString<n>` uniformly.
@@ -465,11 +465,11 @@ block without sampling, so not a random oracle), and the proof requires treating
465
465
output of `H` on a uniform input as uniformly random. This is the standard-model
466
466
counterpart to what `FreshInputRFToUniform` does automatically in the ROM.
467
467
468
-
Real-proof pointer: used in [`examples/Proofs/Group/DDHImpliesHashedDDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/DDHImpliesHashedDDH.proof).
468
+
Real-proof pointer: used in [`examples/Proofs/Group/DDH_implies_HashedDDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/DDH_implies_HashedDDH.proof).
**What it states:** Programming a random function at a single target point with a fresh
475
475
uniform value is statistically equivalent to evaluating it naturally. The `Natural` game
@@ -482,11 +482,11 @@ challenge point -- replacing `H(target)` with an independently sampled value so
482
482
challenge ciphertext becomes statistically independent of the adversary's hash queries.
483
483
This is a standard technique in ROM proofs.
484
484
485
-
Real-proof pointer: used in [`examples/Proofs/Group/CDHImpliesHashedDDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/CDHImpliesHashedDDH.proof).
485
+
Real-proof pointer: used in [`examples/Proofs/Group/CDH_implies_HashedDDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/CDH_implies_HashedDDH.proof).
**What it states:** Comparing an adversary-supplied value against a hidden, uniformly
492
492
sampled target is indistinguishable from always returning false. The `Real` game samples
@@ -498,7 +498,7 @@ game always returns `false`. Any adversary distinguishes the two with advantage
498
498
uniform value, and the proof argues that such a guess succeeds only with negligible
499
499
probability.
500
500
501
-
Real-proof pointer: used in [`examples/Proofs/Group/DDHImpliesCDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/DDHImpliesCDH.proof).
501
+
Real-proof pointer: used in [`examples/Proofs/Group/DDH_implies_CDH.proof`](https://github.com/ProofFrog/examples/blob/main/Proofs/Group/DDH_implies_CDH.proof).
502
502
503
503
{: .important }
504
504
Using a helper game adds to the trust base -- see the [Soundness]({% link researchers/soundness.md %}) page in the For Researchers area.
@@ -565,7 +565,7 @@ fired asymmetrically).
565
565
566
566
-*Add a helper assumption.* If the gap corresponds to a statistical fact (birthday
567
567
bound, hash-on-uniform, ROM programming), introduce the appropriate helper game from
568
-
`examples/Games/Misc/` and use the four-step reduction pattern to cross the gap.
568
+
`examples/Games/Helpers/` and use the four-step reduction pattern to cross the gap.
569
569
570
570
-*Restructure existing code.* If the canonical forms differ only in ordering --
571
571
operand order in a concatenation, field declaration order, branch order in an
**Paths are file-relative**: the path is resolved relative to the directory containing the importing file, not relative to the directory where the CLI is invoked.
336
336
337
-
**Example.** The proof `examples/Proofs/SymEnc/OTUCimpliesOTS.proof` imports:
337
+
**Example.** The proof `examples/Proofs/SymEnc/INDOT$_implies_INDOT.proof` imports:
Pick names that make sense for the property in question, and consider how the security property is stated in the relevant literature. Neither side is "preferred": your game hopping proof can go from left to right or right to left; all that matters is that in a proof's `games:` list, the sequence must start on one side and end on the other.
36
35
@@ -127,29 +126,29 @@ ProofFrog's convention, following Joy of Cryptography, allows all game oracles (
127
126
The last line of every `.game` file is an `export as` statement that assigns a name to the security property:
128
127
129
128
```prooffrog
130
-
export as OneTimeSecrecy;
129
+
export as INDOT;
131
130
```
132
131
133
132
This name is how the rest of the tool chain refers to the security property. In a proof file, after importing the game file, you write:
134
133
135
-
-`OneTimeSecrecy(E).Left` — the left game instantiated with scheme `E`
136
-
-`OneTimeSecrecy(E).Right` — the right game instantiated with `E`
137
-
-`OneTimeSecrecy(E).Adversary` — the type of adversary for this property
134
+
-`INDOT(E).Left` — the left game instantiated with scheme `E`
135
+
-`INDOT(E).Right` — the right game instantiated with `E`
136
+
-`INDOT(E).Adversary` — the type of adversary for this property
138
137
139
-
The `export as` name is also what appears in the proof's `theorem:` and `assume:` sections. The name must be a valid identifier; by convention it matches the file name (e.g., `OneTimeSecrecy.game` exports `OneTimeSecrecy`).
138
+
The `export as` name is also what appears in the proof's `theorem:` and `assume:` sections. The name must be a valid identifier; by convention it matches the file name (e.g., `INDOT.game` exports `INDOT`).
140
139
141
140
---
142
141
143
142
## Helper games as a special case
144
143
145
-
Not every `.game` file has to define a *cryptographic security property*. Game files can be used to capture facts that ProofFrog's engine is not able to reason about, such as mathematical properties, statistical claims, or additional program equivalence properties. The [`Games/Misc/`](https://github.com/ProofFrog/examples/tree/main/Games/Misc) directory contains several *helper games*.
144
+
Not every `.game` file has to define a *cryptographic security property*. Game files can be used to capture facts that ProofFrog's engine is not able to reason about, such as mathematical properties, statistical claims, or additional program equivalence properties. The [`Games/Helpers/`](https://github.com/ProofFrog/examples/tree/main/Games/Helpers) directory contains several *helper games*.
146
145
147
146
Here are some helper games that capture mathematical facts:
148
147
149
-
-**`UniqueSampling`** ([`UniqueSampling.game`](https://github.com/ProofFrog/examples/blob/main/Games/Misc/UniqueSampling.game)): sampling uniformly from a set `S` is indistinguishable from sampling from `S` with exclusion of a bookkeeping set (rejection sampling).
150
-
-**`HashOnUniform`** ([`HashOnUniform.game`](https://github.com/ProofFrog/examples/blob/main/Games/Misc/HashOnUniform.game)): applying a hash to a uniformly random input yields a uniform output.
151
-
-**`RandomTargetGuessing`** ([`RandomTargetGuessing.game`](https://github.com/ProofFrog/examples/blob/main/Games/Misc/RandomTargetGuessing.game)): guessing a random target is no easier than guessing any fixed value.
152
-
-**`ROMProgramming`** ([`ROMProgramming.game`](https://github.com/ProofFrog/examples/blob/main/Games/Misc/ROMProgramming.game)): facts about programming random oracles.
148
+
-**`UniqueSampling`** ([`UniqueSampling.game`](https://github.com/ProofFrog/examples/blob/main/Games/Helpers/Probability/UniqueSampling.game)): sampling uniformly from a set `S` is indistinguishable from sampling from `S` with exclusion of a bookkeeping set (rejection sampling).
149
+
-**`Regularity`** ([`Regularity.game`](https://github.com/ProofFrog/examples/blob/main/Games/Hash/Regularity.game)): applying a hash to a uniformly random input yields a uniform output.
150
+
-**`RandomTargetGuessing`** ([`RandomTargetGuessing.game`](https://github.com/ProofFrog/examples/blob/main/Games/Helpers/Probability/RandomTargetGuessing.game)): guessing a random target is no easier than guessing any fixed value.
151
+
-**`ROMProgramming`** ([`ROMProgramming.game`](https://github.com/ProofFrog/examples/blob/main/Games/Helpers/Probability/ROMProgramming.game)): facts about programming random oracles.
153
152
154
153
Helper games are structurally identical to security-property games — they are pairs of games with `export as` — but they appear in a proof's `assume:` block rather than the `theorem:` block. They can be assumed freely because they hold unconditionally or statistically, not by reduction to a computational hardness assumption. For the full catalog of available helper games and when to use each, see the [Canonicalization]({% link manual/canonicalization.md %}) page.
155
154
@@ -161,7 +160,7 @@ When a mathematical fact is encoded via a helper game and used to bridge a step
The adversary submits two equal-length messages and receives an encryption of either the left or the right one. A fresh key is sampled per query, so no key reuse is implied. One-time secrecy holds if the adversary cannot tell which message was encrypted.
Like one-time secrecy, but the key is sampled once in `Initialize` and reused across all oracle calls. The state field `k` persists from one `Eavesdrop` call to the next, modelling the chosen-plaintext attack setting where the adversary may request many encryptions under the same key.
0 commit comments