7.6 CONFOUNDER

EXERCISE 7.5: CONFOUNDER

Check to see if any part of your encrypted packets are repeating. This will happen if the data going into the encryption routine (with a fixed IV and key) is the same at the beginning. Because dictionaries do not necessarily order their data, the username may come after the timestamp, in which case the packates may be different each time. If your packets aren’t repeating any bytes at all, perphaps fix the timestamp or otherwise force the encrypt function to encrypt the same data twice.

Once you have repeating bytes, introduce confounders into your code by prepending 16 bytes of random plaintext in front of the serialized bytes. Make sure to remove it upon decryption. Does that get rid of the repeating bytes? Would a confounder work for AES-CTR Mode?