All original content is created in Ukrainian. Not all content has been translated yet. Some posts may only be available in Ukrainian.Learn more

What is CFB (Cipher Feedback)?

Post cover: What is CFB (Cipher Feedback)?
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?

  1. We take the initial random piece of data (IV – Initialization Vector) and encrypt it.
  2. Mix the obtained result ( using the XOR operation) with the first block of plaintext. This is the first encrypted block.
  3. This encrypted block is then used to encrypt the next block of text.
  4. 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.

[Fix] Heroku / SearchBox addon - помилка ідексації "The client is unable to verify that the server is Elasticsearch"
31 Jan 13:09

[Fix] Heroku / SearchBox addon - помилка ідексації "The client is unable to verify that the server is Elasticsearch"

meme code
meme code@memecode
06 Feb 15:31

Фікс помилки [DEPRECATION] #adapters is deprecated. Use #profiles instead. (Codecov / docile)

meme code
meme code@memecode
Що таке Promise у JavaScript і як швидко зрозуміти суть?
18 Feb 11:01

Що таке Promise у JavaScript і як швидко зрозуміти суть?

meme code
meme code@memecode
Структура Promise (JavaScript) та як з цим працювати
18 Feb 14:33

Структура Promise (JavaScript) та як з цим працювати

meme code
meme code@memecode
Що таке Memoization (приклади Ruby та Ruby on Rails)?
20 Feb 18:16

Що таке Memoization (приклади Ruby та Ruby on Rails)?

meme code
meme code@memecode
Що таке debounce у JavaScript і чому це важливо?
21 Mar 16:39

Що таке debounce у JavaScript і чому це важливо?

meme code
meme code@memecode
Що таке XOR і як він працює?
21 Mar 17:05

Що таке XOR і як він працює?

meme code
meme code@memecode
Embed програмування: що це таке і з чого почати
24 Mar 16:48

Embed програмування: що це таке і з чого почати

meme code
meme code@memecode
Pessimistic Lock у Rails: що це таке і коли застосовувати. Які є альтернативи?
31 Mar 17:45

Pessimistic Lock у Rails: що це таке і коли застосовувати. Які є альтернативи?

meme code
meme code@memecode
Why does PostgreSQL skip ID when saving new records? (Heroku)
31 Mar 19:13

Why does PostgreSQL skip ID when saving new records? (Heroku)

meme code
meme code@memecode
[Codecov] What is the difference between patch and project coverage?
09 Apr 16:03

[Codecov] What is the difference between patch and project coverage?

meme code
meme code@memecode
How do Scratch courses help children develop soft skills?
11 Apr 18:24

How do Scratch courses help children develop soft skills?

meme code
meme code@memecode