2006-11-21 13:40:50 +00:00
|
|
|
# 1 "tls-HSDDM05.cpp"
|
|
|
|
# 1 "<built-in>"
|
|
|
|
# 1 "<command line>"
|
|
|
|
# 1 "tls-HSDDM05.cpp"
|
2006-11-24 08:10:52 +00:00
|
|
|
# 28 "tls-HSDDM05.cpp"
|
2006-11-21 13:40:50 +00:00
|
|
|
usertype Params, String;
|
|
|
|
|
|
|
|
const pk,hash: Function;
|
|
|
|
secret sk,unhash: Function;
|
|
|
|
inversekeys(pk,sk);
|
|
|
|
inversekeys(hash,unhash);
|
|
|
|
|
|
|
|
const clientstring,serverstring: String;
|
|
|
|
|
|
|
|
const Alice, Bob, Eve: Agent;
|
|
|
|
const Terence: Agent;
|
|
|
|
|
2006-11-24 08:10:52 +00:00
|
|
|
protocol tls-HSDDM05(X,Y)
|
2006-11-21 13:40:50 +00:00
|
|
|
{
|
|
|
|
role X
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Nx: Nonce;
|
|
|
|
fresh msecret: Nonce;
|
|
|
|
fresh pa: Params;
|
2006-11-21 13:40:50 +00:00
|
|
|
var Ny: Nonce;
|
|
|
|
var pb: Params;
|
|
|
|
|
|
|
|
send_1( X,Y, X,Nx,pa );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_2( Y,X, Ny,pb,{ Y,pk(Y) }sk(Terence) );
|
2006-11-24 08:10:52 +00:00
|
|
|
send_3( X,Y, { X,pk(X) }sk(Terence),{X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence)}sk(X),{msecret}pk(Y),hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),clientstring) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_4( Y,X, hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),{ X,pk(X) }sk(Terence),{X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence)}sk(X),{msecret}pk(Y),hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),clientstring),serverstring) );
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
claim_X1( X, Secret, msecret );
|
|
|
|
}
|
|
|
|
|
|
|
|
role Y
|
|
|
|
{
|
|
|
|
var Nx: Nonce;
|
|
|
|
var msecret: Nonce;
|
|
|
|
var pa: Params;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Ny: Nonce;
|
|
|
|
fresh pb: Params;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1( X,Y, X,Nx,pa );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_2( Y,X, Ny,pb,{ Y,pk(Y) }sk(Terence) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_3( X,Y, { X,pk(X) }sk(Terence),{X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence)}sk(X),{msecret}pk(Y),hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),clientstring) );
|
2006-11-24 08:10:52 +00:00
|
|
|
send_4( Y,X, hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),{ X,pk(X) }sk(Terence),{X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence)}sk(X),{msecret}pk(Y),hash(msecret,X,Nx,pa,Ny,pb,{ Y,pk(Y) }sk(Terence),clientstring),serverstring) );
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
claim_Y1( Y, Secret, msecret );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|