Proj 3: Cracking AES (With Weak Keys) with CrypTool 2 (10 pts. + 10 pts. extra)

What you need


To crack AES, when given partial information about the key. If the key is truly random and unknown, there is no known way to crack AES.

Getting CrypTool 2

On your Windows machine, download Cryptool 2.0 Stable from this URL:

Using the Wizard to Crack AES

Open CrypTool 2, as shown below.

On the left side, in the "Main Functions" section, click the Wand icon labelled "Use the wizard...", as shown below.

In the "TASK SELECTION" screen, on the left side, click Cryptanalysis. Then click Next.

In the "AGE SELECTION" screen, click "Modern Encryption" and click Next.

In the "TYPE SELECTION" screen, click "Symmetric Encryption" and click Next.

In the "ALGORITHM SELECTION" screen, select AES, and click Next.

In the next screen, accept the default selection of "Ciphertext-Only" and click Next.

In the "AES - CIPHERTEXT-ONLY ANALYSIS" screen, some example ciphertext appears, as shown below.

Notice the "Keypattern"--most of the key is known. Only the portion shown as "*" is unknown. This is the weakness that makes the attack possible. There are six asterisks, and each is a hexadecimal character, so there are only 16^6 = 16.8 million possible keys.

Notice that there is no setting for Language. This attack will use simple entropy--encrypted text is more chaotic than text in a language.

Also note the "Chaining Mode" option. The simplest is ECB--the others are more secure. For now, accept the default of ECB.

Click Next. The progress screen is very small and difficult to see, but I was able to expand it as shown below, and it is obvious how it works. It's testing about 500,000 keys per second, and the attack requires about 33 seconds, so it's testing all 16.8 million possible keys. It chooses the result with the lowest entropy, which is shown in the "Value" column. The correct cleartext has entropy 4.2, and all the others have entropy of 5.2 or larger.

It works, finding the cleartext, which is in German, as shown below.

Challenge 1 (10 pts.)

Decrypt this ciphertext. It's in ECB mode, and the key is all zeroes except for the last 24 bits.
Use the form below to put your name on the WINNERS PAGE.
Your Name (without spaces):
The author of that quote in capital letters, like this: SLARTIBARTFAST

Saving a Screen Image

Make sure the your name is visible on the winners page, as shown below.

Press Shift+PrintScrn to copy the whole desktop to the clipboard.


Paste the image into Paint.

Save the document with the filename "YOUR NAME Proj 3a", replacing "YOUR NAME" with your real name.

Challenge 2 (10 pts. extra credit)

Decrypt this. The key is all "F" except the first 12 bits and the last 12 bits.


Don't assume it's in ECB mode.
Use the form below to put your name on the WINNERS PAGE.
Your Name (without spaces):
The first four words of the decrypted text, in capital letters, like TO SERVE AND PROTECT:
Save a whole-screen image of the winners page showing your name with the filename "YOUR NAME Proj 3b".

Turning in your Project

Email the images to with the subject line: Proj 3 from YOUR NAME.

Posted 8-1-16 by Sam Bowne
Updated 9-21-17 with better link to Cryptool Stable