XOR Encryption Challenges

What You Need

A Kali Linux machine, real or virtual. You could also use OS X, or Windows with Python installed.

Challenge 1: Decrypting a Text File Without the Key (10 pts. extra credit)

This one is pretty simple: the key is a capital letter, from A to Z.

To get the ciphertext, execute this command:

curl https://samsclass.info/124/proj14/xorchal1-cipher > xorchal1-cipher
Decrypt the file. When you get it, you'll see a message including the word "Congratulations", as shown below:

When you've succeeded, use the form below to put your name on the WINNERS PAGE.

Your Name (without spaces):
Key (in decimal):

Challenge 2: Decrypting a Text File Without the Key (10 pts. extra credit)

The key is a single byte from \x00 to \xff.

To get the ciphertext, execute this command:

curl https://samsclass.info/124/proj14/xorchal2-cipher  > xorchal2-cipher
Decrypt the file. When you get it, capture a whole-desktop image showing the contents, which begin with "Congratulations", as shown below:

When you've succeeded, use the form below to put your name on the WINNERS PAGE.

Your Name (without spaces):
Key (in decimal):

Challenge 3: Decrypting an Image File Without the Key (10 pts. extra credit)

The key is a single byte from \x00 to \xff.

To get the ciphertext, execute this command:

curl https://samsclass.info/124/proj14/xorchal3-cipher  > xorchal3-cipher
This is an image file. When decrypted, it starts with a PNG file header, as shown below:

Notice that the first 4 bytes are 89, 50, 4E, 47; the 2nd through 4th byte spell out PNG in ASCII.

Decrypt the file. When you get it, change its filename extension to PNG and open it in an image viewer or Web browser.

When you've succeeded, use the form below to put your name on the WINNERS PAGE.

Your Name (without spaces):
Key (in decimal):

Challenge 4: Decrypting an Image File Without the Key (10 pts. extra credit)

The key is two bytes from \x0000 to \xffff.

To get the ciphertext, execute this command:

curl https://samsclass.info/124/proj14/xorchal4-cipher  > xorchal4-cipher
This is an image file. When decrypted, it starts with a JPEG file header, as shown below:

Notice that the first 2 bytes are FFD8, and some later bytes contain the ASCII characters JFIF.

Decrypt the file. When you get it, change its filename extension to JPG and open it in an image viewer or Web browser.

When you've succeeded, use the form below to put your name on the WINNERS PAGE.

Your Name (without spaces):
Key's First Byte (in decimal):


Last revised: 8-4-16