Cipher feedback mode with shift registrers Can someone please explain to me how the Cipher Feedback Mode works? From what I have read some examples have a shift register in its explanation but some examples don't. Is there two versions of CFB and what is the difference? What is and how does a shift register work?
The first picture shows the process without a shift register and the second picture uses a shift register.
Screenshots from the related video:




Also, in the explanation of AES on Wikipedia it says that the four steps sub bytes, shift rows, mix columns and round key addition is done in 14 cycles for a 256 bit key. Is that the case for the CFB mode as well or is that just for a different mode of operation?
To address the last bit first: CFB and AES aren't really the same thing. AES is a block encryption algorithm (encrypts a single block of data, 128-bits in the case of AES). CFB is a mode of operation, which defines how multiple blocks are encrypted, and is agnostic to the algorithm. CFB is used the same way no matter what the "Encrypt" function in the middle is.

For your first question.. I'll start by saying that I have no idea what's going on in the second photo; between the hand writing and abbreviated notations, not to mention the literal hand, I can't follow it.

But the first one is much clearer.

For each block...


Either the IV or previous ciphertext is encrypted using the AES algorithm (or whatever algorithm is being used) to produce what's effectively a key stream (like a stream encryption algorithm)
The current block of plaintext is XOR'd with the key stream to produce the ciphertext


It's basically using a block encryption algorithm (AES) as a stream encryption algorithm.

The cool thing about this is that (with the key) you can easily decrypt arbitrary data from the middle of the stream - all you need is the ciphertext of the previous block (or the IV), which you encrypt and XOR with whatever you're decrypting. But you can't encrypt new data in the middle - changing a block changes the entire rest of the cipher. So it's optimized for encrypting in-order and decrypting in any order.

Typical attacks against stream ciphers may also work; for example, you don't get any real integrity protection. Somebody can XOR a byte from the block to change it to something they control (although I suspect this can only be done in the final block, otherwise it's going to change the remainder of the ciphertext).

But yeah, I think the first diagram is pretty straight forward. No clue what the second is talking about..