Skip to content

Commit 5836d9b

Browse files
committed
small cleanup
1 parent 454b8a2 commit 5836d9b

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

examples/Online_with_authn/DY.OnlineA.Invariants.Proofs.fst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,13 @@ let decode_ack_proof tr alice keys_sid msg =
193193
let plain = serialize message_t (Ack ack) in
194194
parse_wf_lemma message_t (bytes_invariant tr) plain;
195195
FStar.Classical.move_requires (parse_wf_lemma message_t (is_publishable tr)) plain
196-
197196
)
198197

199198

200199
/// Additionally,
201200
/// we need an injectivity lemma.
202201
/// The goal is to show that Alice uses the nonces n_a
203-
/// only once, i.e., the nonce n_a are unique for every run.
202+
/// only once, i.e., the nonces n_a are unique for every run.
204203
///
205204
/// We show this with the help of the Initiating event:
206205
/// If there are two events triggered by the same Alice
@@ -223,7 +222,7 @@ val event_initiating_injective:
223222
(requires
224223
trace_invariant tr /\
225224
event_triggered tr alice (Initiating {alice; bob; n_a} ) /\
226-
event_triggered tr alice (Initiating {alice; bob =bob'; n_a} )
225+
event_triggered tr alice (Initiating {alice; bob = bob'; n_a} )
227226
)
228227
(ensures
229228
bob == bob'
@@ -304,7 +303,8 @@ let receive_ack_invariant alice keys_sid msg_ts tr =
304303
// from the state predicate of the looked up SendingPing state of Alice:
305304
assert(event_triggered tr alice (Initiating {alice; bob;n_a}));
306305

307-
// from the state predicate of the SendingAck state of bob':
306+
// from the state predicate of the SendingAck state of bob'
307+
// (via the state prediate for the SendinPing state of Alice with bob'):
308308
assert(event_triggered tr alice (Initiating {alice; bob = bob'; n_a} ));
309309

310310
// the injectivity lemma from above, yields bob' = bob

examples/Online_with_authn/DY.OnlineA.Invariants.fst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ open DY.OnlineA.Protocol
1919
/// * event invariants
2020
///
2121
/// We then have to show
22-
/// * these invariants imply the secrecy property (see DY.OnlineS.Secrecy) and
22+
/// * these invariants imply the security properties: responder authentication and nonce secrecy (see DY.OnlineS.Properties) and
2323
/// * every protocol step maintains these invariants (see DY.OnlineS.Invariants.Proofs)
2424
/// With this, we then know that
25-
/// the protocol model satisfies the secrecy property.
25+
/// the protocol model satisfies the security properties.
2626

2727
/// We highlight only the differences to
2828
/// the invariants for the nonce secrecy proof (Online_with_secrecy/DY.OnlineS.Invariants.fst)
29-
///
3029

3130
(*** Crypto Invariants ***)
3231

@@ -134,12 +133,6 @@ let state_predicate_p: local_state_predicate state_t = {
134133
)
135134
)
136135
| ReceivedAck rack -> (
137-
(* a ReceivedAck state may only be stored if
138-
the stored nonce is labeled for
139-
* the storing principal (alice)
140-
* the principal stored in the state
141-
(the expected sender of the Ack)
142-
*)
143136
let alice = prin in
144137
let bob = rack.bob in
145138
let n_a = rack.n_a in
@@ -168,7 +161,7 @@ let state_predicate_p: local_state_predicate state_t = {
168161
/// we also have prediates on events.
169162
/// The intuition is similar:
170163
/// They say when an event is allowed to be triggered, or
171-
/// what guarantees we obtain, if we observe an event on the trace.
164+
/// what guarantees we obtain, if we observe a specific event on the trace.
172165

173166
let event_predicate_event_t: event_predicate event_t =
174167
fun tr prin e ->
@@ -216,11 +209,6 @@ let trace_invariants_p: trace_invariants = {
216209

217210
(*** Protocol Invariants ***)
218211

219-
/// The final protocol invariants
220-
/// consisting of
221-
/// * the crypto invariants and
222-
/// * the trace invariants
223-
224212
instance protocol_invariants_p: protocol_invariants = {
225213
crypto_invs = crypto_invariants_p;
226214
trace_invs = trace_invariants_p;

examples/Online_with_authn/DY.OnlineA.Authn.fst renamed to examples/Online_with_authn/DY.OnlineA.Properties.fst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module DY.OnlineA.Authn
1+
module DY.OnlineA.Properties
22

33
open Comparse
44
open DY.Core
@@ -15,7 +15,7 @@ open DY.OnlineA.Invariants
1515
/// i.e., Bob sent n_a in an acknowledgement to Alice.
1616
/// Unless one of Alice or Bob are corrupt.
1717

18-
val authn:
18+
val responder_authentication:
1919
tr:trace ->
2020
alice:principal -> bob:principal ->
2121
n_a:bytes ->

0 commit comments

Comments
 (0)