I love cryptographic side-channels, but I've never had the chance to write about them in detail. This CTF challenge caught my eye, and I think it makes for an accessible introduction to the concept. The challenge didn't have many solves though - evidently there's a need for more writeups.
I made my own AES implementation. To test its performance, I timed the encrypting and decryption operations. However, I noticed that the decryption is a lot slower than the encryption. Help me find out what is wrong.
chall.c is a CLI program that lets the user AES encrypt or decrypt messages of their choice, using a key loaded from flag.txt. We don't have flag.txt, but we do have out, which is a log of someone else using the program. Presumably, the flag was loaded as the key, at the time.
It's a big file, and there are 300,000 total encrypt/decrypt operations logged. It still doesn't give us a key, but we do get to know the plaintext and ciphertext for each operation - and crucially, the time it took to execute, with nanosecond precision.