scyther/gui/Protocols/IKE/ikev1-quick-nopfs.spdl
Cas Cremers f9a34f4de5 BUGFIX: Updating hashfunction usage in protocol files to new conventions.
After the new function implementation, the 'Function' type is no longer one-way by default.
However, many protocol description files relied on this implicit assumption.
The solution is to use 'hashfunction' declarations instead to model one-wayness.

Original bug report by Binh Thanh Nguyen.
2014-01-08 15:13:16 +00:00

119 lines
2.0 KiB
Plaintext

# 1 "ikev1-quick-nopfs.cpp"
# 1 "<command-line>"
# 1 "ikev1-quick-nopfs.cpp"
# 16 "ikev1-quick-nopfs.cpp"
# 1 "common.h" 1
hashfunction prf, KDF;
hashfunction g, 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;
# 129 "common.h"
var I, R: Agent;
# 150 "common.h"
recv_!SWAP1( SWAP, SWAP, KDF(k(I,R),Ni,Nr) );
send_!SWAP2( SWAP, SWAP, KDF(k(R,I),Ni,Nr) );
}
}
# 17 "ikev1-quick-nopfs.cpp" 2
# 27 "ikev1-quick-nopfs.cpp"
usertype String;
const list, algo: String;
protocol @executability(O) {
role O {
var mid, Ni, Nr: Nonce;
var I, R: Agent;
recv_!O1( O, O, {prf(k(I,R), mid, list, Ni), list, Ni}k(I,R) );
send_!O2( O, O, {prf(k(R,I), mid, list, Ni), list, Ni}k(R,I) );
recv_!O3( O, O, {prf(k(R,I), mid, Ni, algo, Nr), algo, Nr}k(R,I) );
send_!O4( O, O, {prf(k(I,R), mid, Ni, algo, Nr), algo, Nr}k(I,R) );
recv_!O5( O, O, {prf(k(I,R), mid, Ni, Nr)}k(I,R) );
send_!O6( O, O, {prf(k(R,I), mid, Ni, Nr)}k(R,I) );
}
}
protocol ikev1-quick-nopfs(I, R)
{
role I {
fresh i, Ni, Ci, mid: Nonce;
var Nr, Cr: Nonce;
send_!1( I, R, mid, {prf(k(I,R), mid, list, Ni), list, Ni}k(I,R) );
recv_!2( R, I, mid, {prf(k(I,R), mid, Ni, algo, Nr), algo, Nr}k(I,R) );
claim( I, Running, R, Ni, Nr );
send_!3( I, R, mid, {prf(k(I,R), mid, Ni, Nr)}k(I,R) );
claim( I, SKR, KDF(k(I,R),Ni,Nr) );
claim( I, Alive );
claim( I, Weakagree );
claim( I, Commit, R, Ni, Nr );
}
role R {
fresh r, Nr, Cr: Nonce;
var Ni, Ci, mid: Nonce;
recv_!1( I, R, mid, {prf(k(R,I), mid, list, Ni), list, Ni}k(R,I) );
claim( R, Running, I, Ni, Nr );
send_!2( R, I, mid, {prf(k(R,I), mid, Ni, algo, Nr), algo, Nr}k(R,I) );
recv_!3( I, R, mid, {prf(k(R,I), mid, Ni, Nr)}k(R,I) );
claim( R, SKR, KDF(k(R,I),Ni,Nr) );
claim( R, Alive );
claim( R, Weakagree );
claim( R, Commit, I, Ni, Nr );
}
}