forked from tls13tamarin/TLS13Tamarin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zero_rtt.m4i
88 lines (77 loc) · 1.95 KB
/
zero_rtt.m4i
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
dnl(
/*
Client rules for 0-RTT data in PSK mode.
From the specification 2.3. Zero-RTT Data
Client Server
ClientHello
+ early_data
+ pre_shared_key
+ key_share*
(Finished)
(Application Data*)
(end_of_early_data) -------->
ServerHello
+ early_data
+ pre_shared_key
+ key_share*
{EncryptedExtensions}
{Finished}
<-------- [Application Data*]
{Finished} -------->
[Application Data] <-------> [Application Data]
*/)
include(msgs.m4i)
include(crypto.m4i)
include(state.m4i)
rule end_early_data:
let
C = $C
S = $S
in
[ EarlySendStream(tid, C, S, auth_status, ead_keyc, early_data_indication())
]
--[
C_EndZeroRTT(tid)
]->
[
Out(senc{EndOfEarlyData}ead_keyc)
]
rule recv_end_early_data:
let
C = $C
S = $S
in
[ EarlyRecvStream(tid, S, C, auth_status, ead_keyc, early_data_indication()),
In(senc{EndOfEarlyData}ead_keyc)
]
--[
S_RecvEndZeroRTT(tid)
]->
[
]
rule send_early_data:
let
C = $C
S = $S
in
[ EarlySendStream(tid, C, S, auth_status, ead_keyc, early_data_indication()),
Fr(~data)
]
--[ C_SendZeroRTT(tid)
]->
[ EarlySendStream(tid, C, S, auth_status, ead_keyc, early_data_indication()),
Out(senc{data_record(~data)}ead_keyc)
]
rule recv_early_data:
let
C = $C
S = $S
in
[ EarlyRecvStream(tid, S, C, auth_status, ead_keyc, early_data_indication()),
In(senc{data_record(data)}ead_keyc)
]
--[ S_RecvZeroRTT(tid)
]->
[
EarlyRecvStream(tid, S, C, auth_status, ead_keyc, early_data_indication())
]