Bad Entropy
It's easy to generate bad symmetric keys
Let's say you want to encrypt something via AES. One of the first things you'll have to do is generate a key. Suppose one generated a key by taking the current unix timestamp (seconds since Jan 01 1970), and passing that into md5 to get the key. Reference python below:
from hashlib import md5 from time import time def genkey(): i = int(time()) return md5(str(i)).digest()Then some secret string was encrypted (via AES-ECB i.e.vanilla AES and with no padding) to get the following ciphertext:
0xa99210d796a1e37503febf65c329c1b2What is the secret string (ASCII encoded)? Hint: I generated the key the week of Monday, January 25th, 2016.