What is cipher block chaining? (2024)

What is cipher block chaining? (1)

By

  • TechTarget Contributor

What is cipher block chaining?

Cipher block chaining (CBC) is a mode of operation for a block cipher -- one in which a sequence of bits are encrypted as a single unit, or block, with a cipher key applied to the entire block. Cipher block chaining uses what is known as an initialization vector (IV) of a certain length. By using this along with a single encryption key, organizations and individuals can safely encrypt and decrypt large amounts of plaintext.

One of CBC's key characteristics is that it uses a chaining process that causes the decryption of a block of ciphertext to depend on all the preceding ciphertext blocks. As a result, the entire validity of all preceding blocks is contained in the previous, adjacent ciphertext block. A single bit error in a ciphertext block affects the decryption of all subsequent blocks. Rearrangement of the order of the ciphertext blocks, for example, can cause the decryption process to become corrupted.

Essentially, in cipher block chaining, each plaintext block is XORed (numerically combined) with the previous ciphertext block and then encrypted. An XOR is a coding mechanism used to combine different inputs. It is used in this case to facilitate the combination of plaintext blocks and encryption keys. The process repeats itself until all plaintext blocks have been successfully turned into ciphertext blocks.

What is cipher block chaining? (2)

How does cipher block chaining work?

Cipher block chaining is a process used to encrypt and decrypt large plaintext inputs by creating a cryptographic chain wherein each ciphertext block is dependent on the last.

The first step to initiating a cipher block chain is to XOR the first of many plaintext blocks with an IV -- a unique, fixed-length conversion function -- to create a random, or pseudorandom, output. This XOR output is then encrypted using a cipher key to produce a ciphertext block, an encrypted text format that can be decrypted with the correct key.

For example, after the first plaintext block has been transformed into a ciphertext block, the subsequent plaintext block must be encrypted using a similar process. The only difference, however, is that the ciphertext block replaces the IV as one of the XOR inputs. This means that the encryption of the plaintext block after the first one is dependent on the encryption of the first plaintext block. With each plaintext block encryption, the adjacent ciphertext block must be used -- like a chain. Therefore, the second ciphertext block is produced by XORing the first ciphertext block with the second plaintext block and using the same encryption key. This process would repeat itself until there is no more plaintext left to encrypt.

The CBC decryption process works in a similar but distinct way. Contrary to similar decryption methods, the process does not start with the final ciphertext block. In fact, it can all happen simultaneously because all inputs are present.

To invert the cipher block chaining procedure, one must essentially reverse the encryption process. To do that, one must first feed the first ciphertext block through the decryption process. This involves using the same encryption key as before but on the ciphertext block. The product of this interaction is then XORed with the original IV to extract the original plaintext block. While similar, decrypting the second ciphertext block is different from decrypting the first one because an IV cannot be used.

After combining the second ciphertext block with the cipher key, the output is XORed with the first ciphertext block to produce the second plaintext block. In this case, the previous ciphertext block replaces the IV during the decryption process. Remember, this is how the second ciphertext block was originally created; the second plaintext block and the first ciphertext block were XORed together. The process is complete once all ciphertexts have been successfully decrypted into plaintext.

Identical ciphertext blocks can only be produced if the same plaintext block is encrypted using the same key, IV and ciphertext block order. Ideally, the IV should be different for any two messages encrypted with the same key. Patterns like this can make it that much easier for malicious hackers or cybercriminals to decrypt a series of responses because the decryption is more predictable. Though the IV doesn't need to be a secret, some applications, such as security consultancy, may find this desirable.

What is cipher block chaining? (3)

The advantages of cipher block chaining

Cipher block chaining is one of the most used methods for encrypting large messages. As the more secure successor of electronic codebook (ECB) -- the easiest block cipher mode of functioning -- CBC can reliably encrypt large plaintext inputs but at a slower pace than some parallel encryption algorithms.

Here are some advantages to cipher block chaining.

Identical blocks do not share the same cipher

CBC has the advantage over the ECB mode in that the XORing process hides plaintext patterns. Even if the first plaintext block and third plaintext block were the exact same segment of plaintext, it is highly unlikely that the first ciphertext block and third ciphertext block would be the same. Essentially, this means that two identical pieces of plaintext, when encrypted, should not produce identical, or even similar, results. The only reason why it is not impossible is that there is a minuscule chance that XORing the second ciphertext block and the third plaintext block produces the same product as XORing the first plaintext block with the IV.

Better security

Because cipher block chaining relies on using previous ciphertext blocks to encrypt subsequent plaintext blocks, hackers and decryptors must have all ciphertext blocks available in order to successfully decrypt entire CBC outputs. This multistep encryption mechanism makes it difficult to deconstruct, thereby increasing the security of the messages it is trying to encrypt.

In a way, CBC is an example of effective challenge-response authentication. A user or group that requires access to a certain set of documents must be able to present the necessary ciphertext blocks to successfully decrypt the entire message or text.

The disadvantages of cipher block chaining

As effective as cipher block chaining is in securing large amounts of plaintext, it does have its challenges, especially when it comes to speed and convenience.

Not tolerant of block losses

While distinct ciphertext blocks are extremely useful in terms of encryption strength, they can be a detriment in terms of decryption reliability. If one or more of the ciphertext blocks becomes lost, damaged or corrupted, a user won't be able to perform a complete decryption. While this can be a minimal inconvenience and rarely happens, it does force agencies to employ secure storage systems to retain all ciphertext data.

Parallel CBC encryption is not possible

Due to the recursive nature of CBC's encryption process, it is impossible to simultaneously encrypt all plaintext inputs using cipher block chaining. Without having collected all previous ciphertext blocks, a user cannot achieve parallel encryption because each plaintext block encryption is dependent on the last. The order is so important that, if it were switched during the CBC encryption process, it would result in a completely different set of ciphertext blocks.

This was last updated in May 2021

Continue Reading About cipher block chaining (CBC)

  • Weighing double key encryption challenges, payoffs
  • Block ciphers: REESSE3+ vs. International Data Encryption Algorithm
  • Cipher block chaining technology: How will it influence information governance?

Related Terms

What is SSH (Secure Shell) and How Does It Work?
SSH (Secure Shell or Secure Socket Shell) is a network protocol that gives users -- particularly systems administrators -- a ...Seecompletedefinition
What is the Cybersecurity Information Sharing Act (CISA)?
The Cybersecurity Information Sharing Act (CISA) allows United States government agencies and non-government entities to share ...Seecompletedefinition
What is threat detection and response (TDR)? Complete guide
Threat detection and response (TDR) is the process of recognizing potential cyberthreats and reacting to them before harm can be ...Seecompletedefinition

Dig Deeper on Data security and privacy

  • What is Data Encryption Standard (DES)?By: PeterLoshin
  • cryptanalysisBy: TechTargetContributor
  • Advanced Encryption Standard (AES)By: RahulAwati
  • initialization vectorBy: RahulAwati
What is cipher block chaining? (2024)

FAQs

What is a cipher block chain? ›

Cipher Block Chaining (CBC) is a block mode of DES that XORs the previous encrypted block of ciphertext to the next block of plaintext to be encrypted.

What is a block cipher with an example? ›

For example, AES (Advanced Encryption Standard) is a type of block cipher which encrypts 128-bit sized blocks with a deterministic block of size 128, 192, or 256 bits. A few popular block ciphers are Data Encryption Standard (DES), Blowfish, and Twofish.

Is cipher block chaining symmetric or asymmetric? ›

A block cipher uses a symmetric key and algorithm to encrypt and decrypt a block of data.

What is the difference between cipher block chaining and counter mode? ›

The Counter Mode component provides data privacy, while CBC-MAC provides data integrity and authentication. CCM is a generic authenticated encryption block cipher mode, meaning it can be used with any block-oriented encryption algorithm.

What is block chain explained? ›

What is blockchain? Blockchain is a shared, immutable ledger that facilitates the process of recording transactions and tracking assets in a business network. asset can be tangible (a house, car, cash, land) or intangible (intellectual property, patents, copyrights, branding).

What is ciphertext in blockchain? ›

Ciphertext refers to data that is encrypted and unreadable. The only way to read encrypted data is by decrypting it using an encryption key. Since ciphertext can't be read without providing the encryption key, it's the best way to protect your sensitive data from prying eyes and unauthorized access.

What is the purpose of a block cipher? ›

A block cipher encrypts bits, the smallest unit of computational information, in blocks. In contrast, other types of encryption methods tend to encrypt bits one by one. Block ciphers are frequently used to encrypt large amounts of data into data blocks.

What is a cipher example? ›

Cipher — A cipher is a system to make a word or message secret by changing or rearranging the letters in the message. Example: For example: A=G or A=&. Cryptology — Cryptology is the art and science of making and breaking codes.

How to decode a block cipher? ›

Block Ciphers

The cipher maps an n bit plaintext to an n bit ciphertext, using a secret key of some fixed size; the mapping function must be invertible, so decryption is accomplished by simply applying the inverse map to the ciphertext.

Is cipher block chaining safe? ›

Cipher block chaining uses what is known as an initialization vector (IV) of a certain length. By using this along with a single encryption key, organizations and individuals can safely encrypt and decrypt large amounts of plaintext.

What are the pros and cons of block ciphers? ›

Block ciphers have the advantage of high diffusion and strong tamper resistance without detection. They have the disadvantage of slower encryption speed since the entire block must be captured for encryption/decryption. Block ciphers also breed errors since a mistake in just one symbol could alter the whole block.

Is CBC unsafe? ›

In short: The ECB mode is very insecure, the CBC mode alone also in many cases, but it can be supplemented (MAC) and thus become secure. About ECB mode: The plaintext is encrypted in blocks, whereby the blocks are independent of each other. As a result, identical plaintext blocks result in identical ciphertext blocks.

What is the most secure AES algorithm? ›

AES-256 encryption is extremely secure. It is the most secure encryption algorithm available today and is used extensively in government and military applications, as well as by businesses operating in highly regulated industries.

What types of attacks may occur on block ciphers? ›

Block ciphers, like any cryptographic system, are not impervious to attacks. In addition to exhaustive key search (brute force) attacks, they may also face threats from more sophisticated cryptanalytic attacks, such as differential and linear cryptanalysis.

Is CTR more secure than CBC? ›

CFB, OFB and CTR share two advantages over CBC mode: the block cipher is only ever used in the encrypting direction, and the message does not need to be padded to a multiple of the cipher block size (though ciphertext stealing can also be used for CBC mode to make padding unnecessary).

Should I disable all CBC ciphers? ›

Many organisations such as Qualys SSL Labs, Microsoft etc consider CBC ciphers to be weak and discourage their use. Major browsers have deprecated or disabled support for vulnerable CBC ciphers. CBC ciphers should be avoided and instead use GCM where possible.

What is a cipher in Bitcoin? ›

The process of encryption transforms the original data, known as plaintext, into a secret code known as ciphertext. The opposite process, known as decryption, transforms the ciphertext back into plaintext.

What is the difference between block and cipher? ›

A block cipher breaks down plaintext messages into fixed-size blocks before converting them into ciphertext using a key. Encrypting information bit-by-bit. A stream cipher, on the other hand, breaks a plaintext message down into single bits, which then are converted individually into ciphertext using key bits.

Top Articles
How do you update and restart the DHCP service and the network adapter drivers on the DHCP server?
Coping After Being Scammed or Hacked • Dóchas Psychological Services Inc.
Fiskars X27 Kloofbijl - 92 cm | bol
Joe Taylor, K1JT – “WSJT-X FT8 and Beyond”
Worcester Weather Underground
Pinellas County Jail Mugshots 2023
Craigslist Campers Greenville Sc
Wmu Course Offerings
Botanist Workbench Rs3
Teenbeautyfitness
Sissy Transformation Guide | Venus Sissy Training
Umn Pay Calendar
[PDF] INFORMATION BROCHURE - Free Download PDF
Taylor Swift Seating Chart Nashville
Gas Station Drive Thru Car Wash Near Me
Sound Of Freedom Showtimes Near Cinelux Almaden Cafe & Lounge
How to Create Your Very Own Crossword Puzzle
Ukc Message Board
Acts 16 Nkjv
Cincinnati Adult Search
Theater X Orange Heights Florida
Minnick Funeral Home West Point Nebraska
Craigslist Panama City Beach Fl Pets
Used Patio Furniture - Craigslist
14 Top-Rated Attractions & Things to Do in Medford, OR
R/Airforcerecruits
2023 Ford Bronco Raptor for sale - Dallas, TX - craigslist
Himekishi Ga Classmate Raw
Taylored Services Hardeeville Sc
Play It Again Sports Forsyth Photos
Used 2 Seater Go Karts
Acuity Eye Group - La Quinta Photos
Unm Hsc Zoom
The Hoplite Revolution and the Rise of the Polis
Appleton Post Crescent Today's Obituaries
Beth Moore 2023
Trebuchet Gizmo Answer Key
Mississippi State baseball vs Virginia score, highlights: Bulldogs crumble in the ninth, season ends in NCAA regional
Chris Provost Daughter Addie
2008 Chevrolet Corvette for sale - Houston, TX - craigslist
Buhsd Studentvue
Banana Republic Rewards Login
Pokemon Reborn Locations
B.C. lightkeepers' jobs in jeopardy as coast guard plans to automate 2 stations
Ferguson Showroom West Chester Pa
11 Best Hotels in Cologne (Köln), Germany in 2024 - My Germany Vacation
Ferhnvi
St Anthony Hospital Crown Point Visiting Hours
Kate Spade Outlet Altoona
Anonib New
Motorcycle For Sale In Deep East Texas By Owner
Naughty Natt Farting
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 6163

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.