Image for Cipher Feedback (CFB) mode

Cipher Feedback (CFB) mode

Cipher Feedback (CFB) mode is a method of encrypting data that transforms a block cipher into a stream cipher, allowing encryption of data in small pieces like bytes or bits. It uses an initial secret key and an initialization vector (IV) to generate a pseudorandom stream of data. This stream is then combined with the plaintext using an exclusive-or (XOR) operation to produce the ciphertext. For decryption, the same process is applied, ensuring the original data is recovered. CFB mode is useful for encrypting real-time or streaming data securely, providing both confidentiality and data integrity.