Table of contentsClick link to navigate to the desired location
This content has been automatically translated from Ukrainian.
CFB (abbreviated from Cipher Feedback) – is one way to encrypt data that works on the principle of «chain». Imagine that you have a message that you want to encrypt and you do it in blocks (for example, 16 bytes each). Each block is not encrypted separately, but depends on the previous one, which creates a domino effect.
How does Cipher Feedback work?
- We take the initial random piece of data (IV – Initialization Vector) and encrypt it.
- Mix the obtained result ( using the XOR operation) with the first block of plaintext. This is the first encrypted block.
- This encrypted block is then used to encrypt the next block of text.
- And so on – each encrypted block affects the next one.
Simple examples
Secret chat. Let's imagine that you are copying in a secure messenger. To make the message impossible to intercept and modify without consequence, each piece of text is encrypted so that it depends on the previous one. If an attacker tries to change one word, it will spoil all the next text.
File encryption. Suppose you have a text document that must be saved in encrypted form. Using CFB, the file will be encoded so that changing one character in the source text will change the entire encrypted stream after it. This helps protect against data replacement.
Cipher Feedback in simple words
- CFB allows encryption of a data stream without a fixed block size (such as in streaming video or audio).
- Changing one byte in plaintext causes all subsequent encrypted blocks to change, making it difficult to forge.
- Suitable for use in network protocols and messengers, where encryption must work quickly and efficiently.
To simplify even more, CFB – is like when you encrypt your message, and each subsequent part is encoded based on the previous one, creating a chain reaction effect.
This post doesn't have any additions from the author yet.