AES - CTR Mode

AES Counter Mode is using the AES output as a xor key. To generate the output a nonce is used, modified by a counter (concatenated, summed …) at each block.

The main problem with this mode is that the nonce must be unique for each message, and the counter must be different for each block (it can be reset at each message). If this is not the case, the xor key will be the same for different blocks, which can compromise the encrypted message. (See the weaknesses of XOR encryption

Definition

CTR Encryption CTR Encryption CTR Decryption CTR Decryption