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
Copy file name to clipboardExpand all lines: design.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,23 @@
1
1
---
2
-
title: Engine Functionality
2
+
title: Design
3
3
layout: default
4
4
nav_order: 3
5
5
---
6
6
7
-
# Engine Functionality
7
+
# Design
8
+
9
+
## Philosophy
10
+
11
+
ProofFrog takes a novel approach in that it focuses purely on high-level manipulations of games as abstract syntax trees (ASTs) instead of working at the level of logical formulae.
12
+
Treating games as ASTs allows us to leverage techniques from compiler design
13
+
and static analysis to prove output equivalence of games; thereby allowing us to demonstrate the validity of hops in a game sequence.
14
+
The main technique used in our engine is to take pairs of game ASTs and perform a variety of transformations in an attempt to coerce each AST into a canonical form.
15
+
If each pair of ASTs in a game hop can be made equivalent, then our proof engine can assert the validity of the hop.
16
+
ProofFrog also targets ease of use: although it implements a domain-specific language that a user must learn, the language has an imperative C-like syntax that should be comfortable for the average cryptographer.
17
+
Furthermore, it performs transformations to the ASTs with little user guidance which makes writing a proof in many cases as simple as just specifying the hops.
18
+
Finally, the proof syntax attempts to closely mimic that of a typical pen-and-paper proof.
19
+
20
+
## Engine Functionality
8
21
9
22
A diagram for ProofFrog's engine functionality in full is presented below.
10
23
@@ -20,7 +33,7 @@ A diagram for ProofFrog's engine functionality in full is presented below.
20
33
- The "Remove Duplicated Fields" transformation searches each pair of fields in a game with the same type and unifies the values if it can be statically determined they share the same value throughout the game's entire lifetime
21
34
- The "Apply User Assumptions" transformation utilizes assumptions about variables that a user can specify between pair of games to simplify conditions
22
35
- "Apply Branch Elimination" takes branches where the conditions are `true` or `false` and simplifies them
23
-
- "Remove Unnecessary Fields" deletes any fields that do not effect the return value of any oracle
36
+
- "Remove Unnecessary Fields" deletes any fields that do not affect the return value of any oracle
24
37
- "Canonicalize Returns" takes return statements that return variables and (when the value of the variable can be statically determined) rewrite them to return that variable
25
38
- "Collapse Branches" takes adjacent if/else-if branches with identical blocks of code and rewrites them into one branch where the condition is the OR of the previous two conditions
26
39
- "Simplify Not Operations" just takes `!(a == b)` and rewrites it to `a != b`
Below are a list of examples that ProofFrog can currently verify.
10
10
Many are adapted from [The Joy of Cryptography](https://joyofcryptography.com/).
11
-
In such cases, we will indicate which claim in the textbook is being proved.
11
+
In such cases, we will indicate which claim in the textbook is being proved. References and examples are from the old PDF preview version, and need to be updated to the final print edition.
This proves [Theorem 2.15](https://joyofcryptography.com/pdf/book.pdf#page=49).
16
16
17
-
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/OTUC%3D%3EOTS.proof).
17
+
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/OTUCimpliesOTS.proof).
18
18
19
19
## CPA$ Security implies CPA Security
20
20
21
-
This proves [Claim 7.3](https://joyofcryptography.com/pdf/book.pdf#page=145)
21
+
This proves [Claim 7.3](https://joyofcryptography.com/pdf/book.pdf#page=145).
22
22
23
-
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/CPA%24%3D%3ECPA.proof).
23
+
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/CPA%24impliesCPA.proof).
24
24
25
25
## Composing Two Symmetric Encryption Schemes for One-Time Uniform Ciphertexts
26
26
@@ -35,13 +35,16 @@ This proof analyzes a symmetric encryption scheme {% katex %}\Sigma{% endkatex %
35
35
\Sigma.\mathrm{Dec}((k_S, k_T), c) = S.\mathrm{Dec}(k_S, T.\mathrm{Dec}(k_T, c))
36
36
{% endkatex %}
37
37
38
-
If {% katex %}T{% endkatex %} has one-time uniform ciphertexts, then so does {% katex %}\Sigma{% endkatex %}. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/GeneralDoubleOTUC.proof)
38
+
If {% katex %}T{% endkatex %} has one-time uniform ciphertexts, then so does {% katex %}\Sigma{% endkatex %}. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/GeneralDoubleOTUC.proof).
39
+
40
+
## OTUC implies Double OTUC
41
+
42
+
If a symmetric encryption scheme has one-time uniform ciphertexts, then the double encryption scheme (composing two copies of it) also has one-time uniform ciphertexts. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/OTUCimpliesDoubleOTUC.proof).
39
43
40
44
## Composing Two Symmetric Encryption Schemes for CPA$ security
41
45
42
46
This proof analyzes the same encryption scheme {% katex %}\Sigma{% endkatex %} as in the prior heading. If {% katex %}T{% endkatex %} is CPA$ secure, then so is {% katex %}\Sigma{% endkatex %}. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/DoubleCPA%24.proof).
43
47
44
-
45
48
## Double One-Time Pad has One-Time Uniform Ciphertexts
46
49
47
50
This proves [Claim 2.13](https://joyofcryptography.com/pdf/book.pdf#page=45).
@@ -50,30 +53,79 @@ The proof file can be found [here](https://github.com/ProofFrog/examples/blob/ma
50
53
51
54
## Pseudo One-Time Pad has One-Time Uniform Ciphertexts
52
55
53
-
This proves [Claim 5.4](https://joyofcryptography.com/pdf/book.pdf#page=102)
56
+
This proves [Claim 5.4](https://joyofcryptography.com/pdf/book.pdf#page=102).
54
57
55
58
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Book/5/5_3.proof).
56
59
57
60
## Pseudorandomness of a length-tripling PRG
58
61
59
-
This proves [Claim 5.5](https://joyofcryptography.com/pdf/book.pdf#page=105)
62
+
This proves [Claim 5.5](https://joyofcryptography.com/pdf/book.pdf#page=105).
60
63
61
64
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/PRG/TriplingPRGSecure.proof).
62
65
63
66
## One-Time Secrecy implies CPA Security for Public Key Encryption Schemes
64
67
65
-
This proves [Claim 15.5](https://joyofcryptography.com/pdf/book.pdf#page=273)
68
+
This proves [Claim 15.5](https://joyofcryptography.com/pdf/book.pdf#page=273).
66
69
67
70
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/PubEnc/OTSimpliesCPA.proof).
68
71
72
+
## KEM-DEM Hybrid Encryption is CPA secure
73
+
74
+
This proves CPA security of the hybrid public key encryption scheme constructed via the KEM-DEM paradigm, assuming CPA security of the KEM and one-time secrecy of the symmetric encryption scheme.
75
+
76
+
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/PubEnc/KEMDEMCPA.proof).
77
+
69
78
## Hybrid Encryption is CPA secure
70
79
71
-
This proves [Claim 15.9](https://joyofcryptography.com/pdf/book.pdf#page=279)
80
+
This proves [Claim 15.9](https://joyofcryptography.com/pdf/book.pdf#page=279).
72
81
73
82
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/PubEnc/Hybrid.proof).
74
83
75
84
## Encrypt-then-MAC is CCA secure
76
85
77
-
This proves [Claim 10.10](https://joyofcryptography.com/pdf/book.pdf#page=205)
86
+
This proves [Claim 10.10](https://joyofcryptography.com/pdf/book.pdf#page=205).
78
87
79
88
The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Proofs/SymEnc/EncryptThenMACCCA.proof).
89
+
90
+
## Textbook Exercises
91
+
92
+
The following are ProofFrog proofs of exercises from [The Joy of Cryptography](https://joyofcryptography.com/).
93
+
94
+
### Exercise 2.13
95
+
96
+
One-time secrecy of the double symmetric encryption scheme. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Book/2_Exercises/2_13.proof).
97
+
98
+
### Exercise 2.14
99
+
100
+
An alternative characterization of one-time secrecy. Proved in both directions:
101
+
[forward](https://github.com/ProofFrog/examples/blob/main/Book/2_Exercises/2_14_Forward.proof) and
CCA$ security implies CCA security. The proof file can be found [here](https://github.com/ProofFrog/examples/blob/main/Book/9_Exercises/9_6_CCA%24impliesCCA.proof).
0 commit comments