CTR(Counter)

Like OFB, CTR mode makes a block cipher function as a stream cipher.

It uses an incrementing counter value for each block, encrypts it, and then XORs the result with the plaintext to generate the ciphertext.

CTR mode supports parallel processing and does not require padding, making it highly efficient.

Since each block is processed independently, any corruption or modification of a ciphertext block does not affect other blocks.


CTR mode Encrytion


CTR mode Decrytion


Definitions

  • : Plaintext block
  • : Ciphertext block
  • : Encryption function with key