2005-03-08 14:07:36 +00:00
|
|
|
#!/usr/bin/python
|
2005-03-02 16:28:09 +00:00
|
|
|
#
|
|
|
|
# protocol list
|
|
|
|
#
|
2005-03-03 11:47:53 +00:00
|
|
|
#
|
|
|
|
def list_ppfix(list, prefix, postfix):
|
|
|
|
newlist = []
|
|
|
|
for i in list:
|
|
|
|
newlist.append(prefix + i + postfix)
|
|
|
|
return newlist
|
|
|
|
|
2005-03-14 09:58:44 +00:00
|
|
|
def from_good_literature():
|
2005-03-02 16:28:09 +00:00
|
|
|
list = [ \
|
|
|
|
"bke.spdl",
|
|
|
|
"boyd.spdl",
|
|
|
|
"ccitt509-ban.spdl",
|
2005-03-14 13:44:32 +00:00
|
|
|
"denning-sacco-shared.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"gong-nonce-b.spdl",
|
|
|
|
"gong-nonce.spdl",
|
|
|
|
"isoiec11770-2-13.spdl",
|
2005-03-08 14:07:36 +00:00
|
|
|
"kaochow-v2.spdl",
|
|
|
|
"kaochow-v3.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"nsl3.spdl",
|
2005-03-09 12:28:15 +00:00
|
|
|
"ksl.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"soph.spdl",
|
|
|
|
"splice-as-hc-cj.spdl",
|
|
|
|
"woolam-pi-f.spdl",
|
|
|
|
"yahalom-lowe.spdl",
|
|
|
|
"yahalom-paulson.spdl",
|
|
|
|
"yahalom.spdl" ]
|
|
|
|
|
|
|
|
return list_ppfix(list, "../spdl/","")
|
|
|
|
|
|
|
|
def from_bad_literature():
|
|
|
|
list = [ \
|
|
|
|
"andrew-ban.spdl",
|
|
|
|
"andrew-lowe-ban.spdl",
|
|
|
|
"kaochow.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"ns3.spdl",
|
|
|
|
"ns-symmetric-amended.spdl",
|
|
|
|
"ns-symmetric.spdl",
|
|
|
|
"otwayrees.spdl",
|
|
|
|
"splice-as-hc.spdl",
|
|
|
|
"splice-as.spdl",
|
|
|
|
"tmn.spdl",
|
|
|
|
"wmf-brutus.spdl",
|
|
|
|
"woolam-cmv.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"yahalom-ban.spdl" ]
|
2005-03-02 16:28:09 +00:00
|
|
|
|
2005-03-03 11:47:53 +00:00
|
|
|
return list_ppfix(list, "../spdl/","")
|
2005-03-02 16:28:09 +00:00
|
|
|
|
2005-03-14 09:58:44 +00:00
|
|
|
def from_literature():
|
|
|
|
return from_good_literature() + from_bad_literature()
|
|
|
|
|
2005-03-02 16:28:09 +00:00
|
|
|
def from_others():
|
|
|
|
list = [ \
|
|
|
|
"bke-broken.spdl",
|
|
|
|
"bke-one.spdl",
|
|
|
|
"bkepk-ce2.spdl",
|
|
|
|
"bkepk-ce.spdl",
|
|
|
|
"broken1.spdl",
|
|
|
|
"carkey-broken-limited.spdl",
|
|
|
|
"carkey-broken.spdl",
|
|
|
|
"carkey-ni2.spdl",
|
|
|
|
"carkey-ni.spdl",
|
|
|
|
"five-run-bound.spdl",
|
|
|
|
"helloworld.spdl",
|
2005-03-09 21:41:30 +00:00
|
|
|
"kaochow-palm.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"ns3-brutus.spdl",
|
|
|
|
"nsl3-nisynch-rep.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"nsl7.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"onetrace.spdl",
|
|
|
|
"samasc-broken.spdl",
|
|
|
|
"simplest.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"soph-keyexch.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"speedtest.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"woolam-ce.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"unknown2.spdl"]
|
2005-03-03 11:47:53 +00:00
|
|
|
|
|
|
|
return list_ppfix(list, "../spdl/","")
|
2005-03-02 16:28:09 +00:00
|
|
|
|
2005-03-03 15:25:59 +00:00
|
|
|
def from_all():
|
|
|
|
return from_literature() + from_others()
|
|
|
|
|
2005-03-02 16:28:09 +00:00
|
|
|
def select(type):
|
2005-03-03 15:25:59 +00:00
|
|
|
n = int(type)
|
|
|
|
if n == 0:
|
2005-03-02 16:28:09 +00:00
|
|
|
# 0 means all protocols
|
2005-03-03 15:25:59 +00:00
|
|
|
return from_all()
|
|
|
|
elif n == 1:
|
|
|
|
# 1 means from literature
|
|
|
|
return from_literature()
|
2005-03-14 09:58:44 +00:00
|
|
|
elif n == 2:
|
|
|
|
# 2 means from literature, no known attacks
|
|
|
|
return from_good_literature()
|
2005-03-03 15:25:59 +00:00
|
|
|
else:
|
|
|
|
# Otherwise empty list
|
|
|
|
return []
|
2005-03-08 14:07:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
for l in [from_literature(), from_others()]:
|
|
|
|
for p in l:
|
|
|
|
print p
|
|
|
|
print
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|