From the course: Symmetric Cryptography Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

CTR: Counter

CTR: Counter

From the course: Symmetric Cryptography Essential Training

Start my 1-month free trial

CTR: Counter

- [Instructor] Here we gave counter mode, sometimes referred to as CTR mode. This is another stream cipher-like mode, each block encrypts a unique counter value, which gets combined with the initialization vector. The output of which then is XORed with the plain text block to create the ciphertext block. And like output feedback, the ciphertext isn't actually included in the subsequent blocks. And also like output feedback, it allows for error correction that's applied to the plaintext to still work properly. Unlike output feedback though, we can do both encryption and decryption in parallel. That allows us to have random access to the plaintext when we need it. One thing to note is that the counter value will almost always be represented as an integer. When that integer is combined with the initialization vector, it's critical that it's represented consistently as either big-endian or little-endian. XORing the IV with the little-endian bytes shown here will produce a different result…

Contents