2012-11-15 10:48:46 +00:00
|
|
|
# 1 "ikev1-pk-m.cpp"
|
|
|
|
# 1 "<command-line>"
|
|
|
|
# 1 "ikev1-pk-m.cpp"
|
|
|
|
# 16 "ikev1-pk-m.cpp"
|
|
|
|
# 1 "common.h" 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hashfunction prf, KDF;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-08 15:08:40 +00:00
|
|
|
hashfunction g, h;
|
2012-11-15 10:48:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hashfunction H;
|
|
|
|
# 97 "common.h"
|
|
|
|
protocol @oracle (DH, SWAP) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
role DH {
|
|
|
|
var i, r: Nonce;
|
|
|
|
|
|
|
|
recv_!DH1( DH, DH, h(g(r),i) );
|
|
|
|
send_!DH2( DH, DH, h(g(i),r) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
role SWAP {
|
|
|
|
var i, r, Ni, Nr: Nonce;
|
|
|
|
|
|
|
|
|
|
|
|
var Ci, Cr: Nonce;
|
|
|
|
# 150 "common.h"
|
|
|
|
recv_!SWAP1( SWAP, SWAP, KDF(Ni, Nr, h(g(r),i), Ci, Cr) );
|
|
|
|
send_!SWAP2( SWAP, SWAP, KDF(Ni, Nr, h(g(i),r), Ci, Cr) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
# 17 "ikev1-pk-m.cpp" 2
|
|
|
|
# 27 "ikev1-pk-m.cpp"
|
|
|
|
usertype String;
|
|
|
|
const list, algo: String;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protocol @executability(O) {
|
|
|
|
|
|
|
|
|
|
|
|
role O {
|
|
|
|
var i, r, Ni, Nr, Ci, Cr: Nonce;
|
|
|
|
var I, R: Agent;
|
|
|
|
|
|
|
|
|
|
|
|
recv_!O1( O, O, {prf(Ni, Nr, h(g(r),i), g(i), g(r), Ci, Cr, list, I)}KDF(Ni, Nr, h(g(r),i), Ci, Cr) );
|
|
|
|
send_!O2( O, O, {prf(Ni, Nr, h(g(i),r), g(i), g(r), Ci, Cr, list, I)}KDF(Ni, Nr, h(g(i),r), Ci, Cr) );
|
|
|
|
|
|
|
|
|
|
|
|
recv_!O3( O, O, {prf(Ni, Nr, h(g(i),r), g(r), g(i), Cr, Ci, list, R)}KDF(Ni, Nr, h(g(i),r), Ci, Cr) );
|
|
|
|
send_!O4( O, O, {prf(Ni, Nr, h(g(r),i), g(r), g(i), Cr, Ci, list, R)}KDF(Ni, Nr, h(g(r),i), Ci, Cr) );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protocol ikev1-pk-m(I, R)
|
|
|
|
{
|
|
|
|
role I {
|
|
|
|
fresh i, Ni, Ci: Nonce;
|
|
|
|
var Nr, Cr: Nonce;
|
|
|
|
var Gr: Ticket;
|
|
|
|
|
|
|
|
send_1( I, R, Ci, list );
|
|
|
|
recv_2( R, I, Ci, Cr, algo );
|
|
|
|
send_3( I, R, Ci, Cr, g(i), {I}pk(R), {Ni}pk(R) );
|
|
|
|
recv_4( R, I, Ci, Cr, Gr, {R}pk(I), {Nr}pk(I) );
|
|
|
|
claim( I, Running, R, g(i),Gr,Ci,Cr,Ni,Nr );
|
|
|
|
send_!5( I, R, Ci, Cr, {prf(Ni, Nr, h(Gr,i), g(i), Gr, Ci, Cr, list, I)}KDF(Ni, Nr, h(Gr,i), Ci, Cr) );
|
|
|
|
recv_!6( R, I, Ci, Cr, {prf(Ni, Nr, h(Gr,i), Gr, g(i), Cr, Ci, list, R)}KDF(Ni, Nr, h(Gr,i), Ci, Cr) );
|
|
|
|
|
|
|
|
|
|
|
|
claim( I, SKR, KDF(Ni, Nr, h(Gr,i), Ci, Cr) );
|
|
|
|
|
|
|
|
claim( I, Alive );
|
|
|
|
claim( I, Weakagree );
|
|
|
|
claim( I, Commit, R, g(i),Gr,Ci,Cr,Ni,Nr );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
role R {
|
|
|
|
fresh r, Nr, Cr: Nonce;
|
|
|
|
var Ni, Ci: Nonce;
|
|
|
|
var Gi: Ticket;
|
|
|
|
|
|
|
|
recv_1( I, R, Ci, list );
|
|
|
|
send_2( R, I, Ci, Cr, algo );
|
|
|
|
recv_3( I, R, Ci, Cr, Gi, {I}pk(R), {Ni}pk(R) );
|
|
|
|
send_4( R, I, Ci, Cr, g(r), {R}pk(I), {Nr}pk(I) );
|
|
|
|
recv_!5( I, R, Ci, Cr, {prf(Ni, Nr, h(Gi,r), Gi, g(r), Ci, Cr, list, I)}KDF(Ni, Nr, h(Gi,r), Ci, Cr) );
|
|
|
|
claim( R, Running, I, Gi,g(r),Ci,Cr,Ni,Nr );
|
|
|
|
send_!6( R, I, Ci, Cr, {prf(Ni, Nr, h(Gi,r), g(r), Gi, Cr, Ci, list, R)}KDF(Ni, Nr, h(Gi,r), Ci, Cr) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
claim( R, SKR, KDF(Ni, Nr, h(Gi,r), Ci, Cr) );
|
|
|
|
|
|
|
|
claim( R, Alive );
|
|
|
|
claim( R, Weakagree );
|
|
|
|
claim( R, Commit, I, Gi,g(r),Ci,Cr,Ni,Nr );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|