diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c18dd8d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..6c22dc2 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Assignments for Spring 2024 CSE548 - Advanced Computer Network Security at ASU diff --git a/hw1.2/answer.txt b/hw1.2/answer.txt index 8630a6e..db77c53 100644 --- a/hw1.2/answer.txt +++ b/hw1.2/answer.txt @@ -19,3 +19,6 @@ b - julia gzip header includes filename. filename is 14 chars, key is 12 chars, so first and thirteenth character have same key byte, get rotation from that and then (the thing has a space at the end lol, also intentional typos?) All work and no play makes Jack a dull boy.All work and no play makes Jack a dull boy.All woRk and no play makes Jack a dull boy.All work and ho play maoes Jack a dull boy.All work and no plAy makes Jack a dull boy.Alk work and no plAy makes Jack a dull boy.All work and no play makes Jack a dull boy.All work and no pLay maksa Jack a dull boy.All work and no play makes Jack a dull boy.All + +c - rsa +ater intrusion detection systems used adaptive meth-ods involving neural networks and Petri nets to improve their detection abilities.One system, IDIOT [538], monitors audit logs looking for a sequence ofevents that correspond to an attack. An alternative point of view, used by the STATsystem [456], is to ignore the actual states and focus on the commands that changethem. Researchers at the Univer diff --git a/hw1.2/commontarball/src/README.txt b/hw1.2/commontarball/README.txt similarity index 100% rename from hw1.2/commontarball/src/README.txt rename to hw1.2/commontarball/README.txt diff --git a/hw1.2/commontarball/src/aes.py b/hw1.2/commontarball/aes.py similarity index 100% rename from hw1.2/commontarball/src/aes.py rename to hw1.2/commontarball/aes.py diff --git a/hw1.2/commontarball/src/attack_jed.py b/hw1.2/commontarball/attack_jed.py similarity index 100% rename from hw1.2/commontarball/src/attack_jed.py rename to hw1.2/commontarball/attack_jed.py diff --git a/hw1.2/commontarball/buildkey-givetostudents.py b/hw1.2/commontarball/buildkey-givetostudents.py index 15580de..a6bff30 100644 --- a/hw1.2/commontarball/buildkey-givetostudents.py +++ b/hw1.2/commontarball/buildkey-givetostudents.py @@ -9,7 +9,7 @@ def wrap64(string): return '\n'.join(textwrap.wrap(string,64)) bitsknownint = 0 - +prev_tryabit, prev_i = 0, 255 for line in fileinput.input(): if len(line) > 10: firstline = line @@ -21,8 +21,12 @@ for line in fileinput.input(): tryabit = hint & 1 i = hint >> 1 # All you have to do is figure out what YYY and ZZZ should be... - if (YYY): - ZZZ + if(i != prev_i): + bitsknownint = (bitsknownint << 1) | prev_tryabit + prev_tryabit, prev_i = tryabit, i + +# putting in the right order +bitsknownint = int("{0:b}".format(bitsknownint)[::-1],2) #while (len(bitsknown) < 256): # i = 255 - len(bitsknown) diff --git a/hw1.2/commontarball/src/cse468encrypt.py b/hw1.2/commontarball/cse468encrypt.py similarity index 100% rename from hw1.2/commontarball/src/cse468encrypt.py rename to hw1.2/commontarball/cse468encrypt.py diff --git a/hw1.2/commontarball/src/key.pub b/hw1.2/commontarball/key.pub similarity index 100% rename from hw1.2/commontarball/src/key.pub rename to hw1.2/commontarball/key.pub diff --git a/hw1.2/commontarball/src/rsa.py b/hw1.2/commontarball/rsa.py similarity index 100% rename from hw1.2/commontarball/src/rsa.py rename to hw1.2/commontarball/rsa.py diff --git a/hw1.2/commontarball/src/sample_client.py b/hw1.2/commontarball/sample_client.py similarity index 100% rename from hw1.2/commontarball/src/sample_client.py rename to hw1.2/commontarball/sample_client.py diff --git a/hw1.2/commontarball/src/sample_server.py b/hw1.2/commontarball/sample_server.py similarity index 100% rename from hw1.2/commontarball/src/sample_server.py rename to hw1.2/commontarball/sample_server.py