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 = [ \
|
2006-01-06 12:45:48 +00:00
|
|
|
"ccitt509-1c.spdl",
|
|
|
|
"ccitt509-1.spdl",
|
|
|
|
"ccitt509-3.spdl",
|
|
|
|
"ccitt509-ban3.spdl",
|
|
|
|
"denning-sacco-lowe.spdl",
|
|
|
|
"denning-sacco.spdl",
|
|
|
|
"kaochow.spdl",
|
2005-03-08 14:07:36 +00:00
|
|
|
"kaochow-v2.spdl",
|
|
|
|
"kaochow-v3.spdl",
|
2006-01-06 12:45:48 +00:00
|
|
|
"ksl-lowe.spdl",
|
2005-03-09 12:28:15 +00:00
|
|
|
"ksl.spdl",
|
2006-01-06 12:45:48 +00:00
|
|
|
"needham-schroeder-lowe.spdl",
|
|
|
|
"needham-schroeder-sk-amend.spdl",
|
|
|
|
"needham-schroeder-sk.spdl",
|
|
|
|
"neumannstub-hwang.spdl",
|
|
|
|
"neumannstub.spdl",
|
|
|
|
"otwayrees.spdl",
|
|
|
|
"smartright.spdl",
|
|
|
|
"splice-as-cj.spdl",
|
|
|
|
"splice-as-hc.spdl",
|
|
|
|
"splice-as.spdl",
|
|
|
|
"woo-lam-pi-f.spdl",
|
|
|
|
"woo-lam-pi.spdl",
|
|
|
|
"woo-lam.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"yahalom-lowe.spdl",
|
2006-01-06 12:45:48 +00:00
|
|
|
"yahalom-paulson.spdl" ]
|
2005-03-14 09:58:44 +00:00
|
|
|
|
2006-01-06 12:45:48 +00:00
|
|
|
return list_ppfix(list, "../spdl/SPORE/","")
|
2005-03-14 09:58:44 +00:00
|
|
|
|
|
|
|
def from_bad_literature():
|
|
|
|
list = [ \
|
2006-01-06 12:45:48 +00:00
|
|
|
"andrew-ban-concrete.spdl",
|
2005-03-14 09:58:44 +00:00
|
|
|
"andrew-ban.spdl",
|
|
|
|
"andrew-lowe-ban.spdl",
|
2006-01-06 12:45:48 +00:00
|
|
|
"andrew.spdl",
|
|
|
|
"needham-schroeder.spdl",
|
2005-03-02 16:28:09 +00:00
|
|
|
"tmn.spdl",
|
2006-01-06 12:45:48 +00:00
|
|
|
"wmf-lowe.spdl",
|
|
|
|
"wmf.spdl",
|
|
|
|
"woo-lam-pi-1.spdl",
|
|
|
|
"woo-lam-pi-2.spdl",
|
|
|
|
"woo-lam-pi-3.spdl",
|
|
|
|
"yahalom-ban.spdl",
|
|
|
|
"yahalom.spdl" ]
|
2005-03-02 16:28:09 +00:00
|
|
|
|
2006-01-06 12:45:48 +00:00
|
|
|
return list_ppfix(list, "../spdl/SPORE/","")
|
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 = [ \
|
2006-01-06 12:45:48 +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-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()
|