Defined in protocol/primitives.spthy.
KEM_e_PK(sk) -> pk
KEM_e_Encaps_ct(pk, coins) -> ct
KEM_e_Encaps_ss(pk, coins) -> ss
KEM_e_Decaps(ct, sk) -> ss
Accompanied by equational theory on correctness of decapsulation.
KEM_s_PK(sk) -> pk
KEM_s_Encaps_ct(pk, coins) -> ct
KEM_s_Encaps_ss(pk, coins) -> ss
KEM_s_Decaps(ct, sk) -> ss
Accompanied by equational theory on correctness of decapsulation.
KEM_c_PK(sk) -> pk
KEM_c_Encaps_ct(pk, coins) -> ct
KEM_c_Encaps_ss(pk, coins) -> ss
KEM_c_Decaps(ct, sk) -> ss
Accompanied by equational theory on correctness of decapsulation.
HKDFExtract(ikm, salt) -> output
HKDFExpand(key, label, transcript) -> output
HMAC(key, msg) -> tag
All variants of KEMTLS can use:
-
KEMTLS_KEM_s_KeyGen
:- generates a new
KEM_s
key pair(pk, sk)
- binds a public key
pk
to a new party name$P
- outputs the public key
- generates a new
-
KEMTLS_KEM_c_KeyGen
:- generates a new
KEM_c
key pair(pk, sk)
- binds a public key
pk
to a new party name$P
- outputs the public key
- generates a new
KEMTLS_SAUTH_OR_MUTUAL_ClientAction1
:- outputs
<CLIENT_HELLO>
- outputs
KEMTLS_SAUTH_ServerAction1
:- accepts stage 1 and 2 keys
- outputs
<SERVER_HELLO, SERVER_CERTIFICATE>
KEMTLS_SAUTH_ClientAction2
:- accepts stage 1-5 keys
- outputs
<CLIENT_KEM_CIPHERTEXT, CLIENT_FINISHED>
KEMTLS_SAUTH_ServerAction2Part1
:- inputs
<CLIENT_KEM_CIPHERTEXT>
- accepts stage 3 and 4 keys
- inputs
KEMTLS_SAUTH_ServerAction2Part2
:- part 1 and part 2 are separated so that the stage 3 and 4 keys can be accepted even if the MAC check fails
- inputs
<CLIENT_FINISHED>
- accepts stage 5 and 6 keys
- outputs
<SERVER_FINISHED>
KEMTLS_SAUTH_ClientAction3
:- accepts stage 6 key
KEMTLS_SAUTH_OR_MUTUAL_ClientAction1
:- outputs
<CLIENT_HELLO>
- outputs
KEMTLS_MUTUAL_ServerAction1
:- accepts stage 1 and 2 keys
- outputs
<SERVER_HELLO, CERTIFICATE_REQUEST, SERVER_CERTIFICATE>
KEMTLS_MUTUAL_ClientAction2
:- accepts stage 1-4 keys
- outputs
<CLIENT_KEM_CIPHERTEXT, CLIENT_CERTIFICATE>
KEMTLS_MUTUAL_ServerAction2
:- accepts stage 3 and 4 keys
- outputs
<SERVER_KEM_CIPHERTEXT>
KEMTLS_MUTUAL_ClientAction3
:- accepts stage 5 key
- outputs
<CLIENT_FINISHED>
KEMTLS_MUTUAL_ServerAction3
:- accepts stage 5 and 6 keys
- outputs
<SERVER_FINISHED>
KEMTLS_MUTUAL_ClientAction3
:- accepts stage 6 key
For KEMTLS, stage
can be '1'
, '2'
, ..., '6'
.
Registered(P, pk, type)
: Records that a public keypk
of typetype
(eitherKEM_c
orKEM_s
) was registered for partyP
.
The following action facts directly correspond to variables in the multi stage key exchange model in Section B.1 of https://eprint.iacr.org/2020/534.pdf.
Owner(tid, P)
orOwner(tid, 'anonymous')
: Records that the owner of threadtid
is partyP
or is anonymous.Role(tid, 'client')
orRole(tid, 'server')
: Records that the role of the party in threadtid
is a client or a server.CID(tid, stage, cid)
: Records that the contributive identifier of stagestage
for threadtid
iscid
.SID(tid, stage, sid)
: Records that the session identifier of stagestage
for threadtid
issid
.Peer(tid, P)
: Records that the alleged peer for threadtid
isP
.Accept(tid, stage)
: Records that threadtid
has accepted a key in stagestage
.SK(tid, stage, key)
: Records that threadtid
has accepted keykey
in stagestage
.FS(tid, stage_target, stage_accepted, fslevel)
: Records that threadtid
has during stagestage_accepted
accepted the stagestage_target
key as having forward secrecy levelfslevel
(inwfs1
,wfs2
,fs
).Auth(tid, stage_target, stage_accepted)
: Records that threadtid
has during stagestage_accepted
accepted the stagestage_target
key as authenticated.ProtocolMode(tid, stage_target, stage_accepted, mode)
: Records that threadtid
has during stagestage_accepted
accepted that stagestage_target
was running in protocol modemode
(one of:KEMTLS_SAUTH
,KEMTLS_MUTUAL
,KEMTLS_SAUTH_OR_MUTUAL
).- Note this variable was not present in the original paper since the original model did not account for running multiple protocol modes simultaneously.
The following action facts record adversary use of corruption oracles:
RevealedSessionKey(tid, stage)
: Records that the stagestage
key in threadtid
was revealed to the adversary.CorruptedLTK(P)
: Records that partyP
's long-term secret key was revealed to the adversary.
!Ltk(P, pk, sk, type)
: Records that partyP
's long-term public key of typetype
ispk
and the corresponding secret key issk
.!Pk(P, pk, type)
: Records that partyP
's long-term public key of typetype
ispk
.!SessionKey(tid, stage, key)
: Records that the stagestage
session key for threadtid
iskey
.State(tid, mode, action, vars, transcript)
: Records state for threadtid
to be consumed by subsequent protocol actions.mode
is the protocol mode the state is intended for.action
is the name of the protocol action that output this state (e.g.,ClientAction1
,ClientAction2
, etc.)vars
is a tuple of variables (<var1, var2, etc>
).transcript
is a tuple of protocol messages.
ORevealSessionKey
: Reveals a session key recorded with!SessionKey(tid, stage, key)
. Records this using aRevealedSessionKey
action fact.OCorruptLTK
: Reveals the long-term secret key recorded with!Ltk(P, pk, sk, type)
. Records this using aCorrupted
action fact.