SPRUJF2A March 2026 – March 2026 AM13E23019
The counter mode leverages a nonce (number used once) and a counting integer to generate a keystream by appending the counter to the nonce and encrypting the combined nonce || counter value with the cipher key.
The nonce must only be used once with a given key k. The counter value can start from any value and is incremented for each 128-bit block of data.
The keystream is derived be encrypting the nonce || counter value for each 128-bit data block with the cipher key k. The output ciphertext is then obtained by XORing the plaintext with the encrypted nonce || counter value for each data block. The CTR cipher is shown in Figure 29-6.
The AES accelerator implements logic and storage for incrementing and storing nonce || counter from one block to the next.