Information Assurance - F18

CSE 365

Assignment 2

Assignment 2 is due 9/28/18 on or before 11:59:59pm MST.

Part 1 — Julius’s Test (40 points)

You’ve discovered the ciphertext, now it’s time to break the ciphertext and recover the key.

Your agents have found that the following Python encryption algorithm is used:

1
2
3
4
5
6
import base64
def encrypt(cleartext, key):
    to_return = bytearray(len(cleartext))
    for i in xrange(len(cleartext)):
        to_return[i] = ord(cleartext[i]) ^ ord(key)
    return base64.encodestring(str(to_return))

Break the encryption and recover the key.

Submission Instructions

You will need to submit a README file, the key, and all the code you used to break the ciphertext.

Your README file should contain your name, ASU ID, the plaintext, where the plaintext came from, how to use the code that you used to break the ciphertext, and a description of how you broke the encryption.

The key should be submitted in hexadecimal (starting with “0x”).

Part 2 — Alan’s Test (60 points)

You’ve discovered another ciphertext, now it’s time to break the ciphertext and recover the key.

Your agents have found that the following Python encryption algorithm is used:

1
2
3
4
5
6
import base64
def encrypt(cleartext, key):
    to_return = bytearray(len(cleartext))
    for i in xrange(len(cleartext)):
        to_return[i] = ord(cleartext[i]) ^ ord(key[i % len(key)])
    return base64.encodestring(str(to_return))

Break the encryption and recover the key.

Submission Instructions

You will need to submit a README file, the key, and all the code you used to break the ciphertext.

Your README file should contain your name, ASU ID, and a description of how you broke the encryption.

The key should be submitted in hexadecimal (starting with “0x”).

Submission Instructions

Your README file should contain your name, ASU ID, the plaintext, where the plaintext came from, how to use the code that you used to break the ciphertext, and a description of how you broke the encryption.

Submission Site

Create an account to submit your homework on the course submisison site.