Today your goal is to decrypt a secret message using AES. Given a ciphertext and key you will decrypt and print the message.
Your program may be in any language. It will be run with input on stdin, and its output on stdout will be checked for correctness.
The first line of input on stdin will be the 16 byte key, encoded in hexadecimal. The second line of input on stdin will be the 16 byte ciphertext, encoded in hexadecimal.
The output of the program must be the 16 byte message after decrypting the ciphertext using AES-128 with the given key. You must output the result interpreted as ASCII octets. You may assume that any result is valid ASCII after decrypting.
You may not use any library/built-in features that implement AES. You may use such features to convert between hex/binary/ASCII encodings.
Shortest code in bytes wins.
Example input and output: