new Key : key in newfamily Recv[i < n] in newfamily Send[i < n] in
Alice wants to communicate q messages to Bob using an authenticated channel. The authenticated channel is not secure: it leaks each message to Eve, and waits to receive an ok message back from her before delivering the in-flight message. Thus, Eve cannot modify any of the messages but can read and delay them for any amount of time. To transmit information securely, Alice sends encryptions of her messages, which Bob decrypts using a shared key not known to Eve.
new Key : key in newfamily Recv[i < n] in newfamily Send[i < n] in
newfamily LeakMsgRcvdIdAdv[i < n] in newfamily OkMsgAdvId[i < n] in
new Key : key in
( Key ::= samp gen_keydistribution gen_key : unit -> key (()) )
( Key ::= samp gen_key (()) )
( family Send[i < n] ::= in : msg <- read In[i] ; k : key <- read Key ; samp encdistribution enc : msg * key -> ctxt ( (in, k) ) )
( family LeakCtxtNetAdv[i < n] ::= send : ctxt <- read Send[i] ; return send )
( family LeakCtxtNetAdv[i < n] ::= x : unit <- read LeakMsgRcvdIdAdv[i] ; k : key <- read Key ; samp enc ( (zerosfunction zeros : unit -> msg(()), k) ) )
( family LeakMsgRcvdIdAdv[i < n] ::= in : msg <- read In[i] ; return () )
( family OkMsgAdvId[i < n] ::= okCtxt : unit <- read OkCtxtAdvNet[i] ; return okCtxt )
( family Recv[i < n] ::= okCtxt : unit <- read OkCtxtAdvNet[i] ; send : ctxt <- read Send[i] ; return send )
( family Out[i < n] ::= c : ctxt <- read Recv[i] ; k : key <- read Key ; return decfunction dec : ctxt * key -> msg((c, k)) )
( family Out[i < n] ::= okMsg : unit <- read OkMsgAdvId[i] ; in : msg <- read In[i] ; return in )
Recv[i < n] into fam Out[i < n]Recv[i < n]Dec[i < n] typed: msg
assigned:
k : key <- read Key ;Enc[i < n] typed: ctxt
assigned:
in : msg <- read In[i] ; Send[i < n] with
e : ctxt <- read Enc[i] ; return eEnc[i < n] into fam Send[i < n]Out[i < n] with
okCtxt : unit <- read OkCtxtAdvNet[i] ;Dec[i < n] into fam Out[i < n]Send[i < n] into fam LeakCtxtNetAdv[i < n]Send[i < n] into fam Dec[i < n]Send[i < n]Dec[i < n] with fam Enc[i < n] in groupchn Key rewrite group Dec[i < n] and Enc[i < n]
to (family Dec[i < n]
::= in : msg <- read In[i] ; return in)
|| (family Enc[i < n]
::= in : msg <- read In[i] ; k : key <- read Key ; samp enc ( (in, k) ))
by induction on i bound B (
use assumption enc-dec-correctness(keyN ::= samp gen_key (()) ) || Dec[i < n] with fam Enc[i < n]chn Key, fam Enc[i < n] from currentProtocol hiding chn Key)Enc[i < n] into fam LeakCtxtNetAdv[i < n]Dec[i < n] into fam Out[i < n]OkMsgAdvId[i < n] into fam Out[i < n] thenLeakMsgRcvdIdAdv[i < n] into fam LeakCtxtNetAdv[i < n] thenLeakMsgRcvdIdAdv[i < n] thenOkMsgAdvId[i < n]
)