-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtesting-idealish.uci
133 lines (127 loc) · 3.24 KB
/
testing-idealish.uci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
(* partially idealized use of SMC2 - first SMC is idealized,
second SMC uses idealized key exchange
assertions are identical in real and ideal *)
load SMC2.
functionality
SMC2.SMC2Real
(SMC.SMCIdeal,
SMC.SMCReal(KeyExchange.KEIdeal)).
prover [""]. (* we'll do without SMT solvers *)
var text1 : text.
var text2 : text.
var pt1 : port.
var pt2 : port.
assumption envport_pt1 : envport func pt1.
assumption envport_pt2 : envport func pt2.
(* experiment with real world *)
real.
send [email protected]_req(pt2, text1)$func.
run.
assert msg_out
((func ++ [3], 1))@
Forwarding.FwAdv.fw_obs
((func, 1), (func, 2),
(epdp_port_port_univ).`enc (pt1, pt2))
@((adv, 2))
ctrl_adv.
send ((adv, 2))@Forwarding.FwAdv.fw_ok$(func ++ [3]).
run.
assert msg_out
((func ++ [4], 1))@
Forwarding.FwAdv.fw_obs((func, 2), (func, 1), [])
@((adv, 3))
ctrl_adv.
send ((adv, 3))@Forwarding.FwAdv.fw_ok$((func ++ [4])).
run.
assert msg_out
((func ++ [1], 1))@SMC.SMC2Sim.sim_req((func, 1), (func, 2))@((adv, 4))
ctrl_adv.
send ((adv, 4))@SMC.SMC2Sim.sim_rsp$((func ++ [1])).
run.
assert msg_out
((func, 2))@SMC2.SMC2Dir.Pt2.smc_rsp(pt1, text1)@pt2
ctrl_env.
send [email protected]_req(text2)$func.
run.
assert msg_out
((func ++ [2; 1], 1))@
KeyExchange.KEI2S.ke_sim_req1
((func ++ [2], 1), (func ++ [2], 2))
@((adv, 8))
ctrl_adv.
send ((adv, 8))@KeyExchange.KEI2S.ke_sim_rsp$(func ++ [2; 1]).
run.
assert msg_out
((func ++ [2; 1], 1))@KeyExchange.KEI2S.ke_sim_req2@((adv, 8))
ctrl_adv.
send ((adv, 8))@KeyExchange.KEI2S.ke_sim_rsp$(func ++ [2; 1]).
run.
assert msg_out
((func ++ [2; 2], 1))@
Forwarding.FwAdv.fw_obs
((func ++ [2], 1), (func ++ [2], 2),
epdp_port_port_key_univ.`enc
((func, 2), (func, 1), epdp_text_key.`enc text2 ^^ (g ^ rand)))
@((adv, 7))
ctrl_adv.
send ((adv, 7))@Forwarding.FwAdv.fw_ok$(func ++ [2; 2]).
run.
assert msg_out
((func, 1))@SMC2.SMC2Dir.Pt1.smc_rsp(text2)@pt1
ctrl_env.
finish.
ideal.
send [email protected]_req(pt2, text1)$func.
run.
assert msg_out
((func ++ [3], 1))@
Forwarding.FwAdv.fw_obs
((func, 1), (func, 2),
(epdp_port_port_univ).`enc (pt1, pt2))
@((adv, 2))
ctrl_adv.
send ((adv, 2))@Forwarding.FwAdv.fw_ok$((func ++ [3])).
run.
assert msg_out
((func ++ [4], 1))@
Forwarding.FwAdv.fw_obs((func, 2), (func, 1), [])
@((adv, 3))
ctrl_adv.
send ((adv, 3))@Forwarding.FwAdv.fw_ok$((func ++ [4])).
run.
assert msg_out
((func ++ [1], 1))@SMC.SMC2Sim.sim_req((func, 1), (func, 2))@((adv, 4))
ctrl_adv.
send ((adv, 4))@SMC.SMC2Sim.sim_rsp$(func ++ [1]).
run.
assert msg_out
((func, 2))@SMC2.SMC2Dir.Pt2.smc_rsp(pt1, text1)@pt2
ctrl_env.
send [email protected]_req(text2)$func.
run.
assert msg_out
((func ++ [2; 1], 1))@
KeyExchange.KEI2S.ke_sim_req1
((func ++ [2], 1), (func ++ [2], 2))
@((adv, 8))
ctrl_adv.
send ((adv, 8))@KeyExchange.KEI2S.ke_sim_rsp$(func ++ [2; 1]).
run.
assert msg_out
((func ++ [2; 1], 1))@KeyExchange.KEI2S.ke_sim_req2@((adv, 8))
ctrl_adv.
send ((adv, 8))@KeyExchange.KEI2S.ke_sim_rsp$(func ++ [2; 1]).
run.
assert msg_out
((func ++ [2; 2], 1))@
Forwarding.FwAdv.fw_obs
((func ++ [2], 1), (func ++ [2], 2),
epdp_port_port_key_univ.`enc ((func, 2), (func, 1), g ^ rand))
@((adv, 7))
ctrl_adv.
send ((adv, 7))@Forwarding.FwAdv.fw_ok$(func ++ [2; 2]).
run.
assert msg_out
((func, 1))@SMC2.SMC2Dir.Pt1.smc_rsp(text2)@pt1
ctrl_env.
finish.