Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can we have separate key for separate blocks which we get while operating a plain text message using CBC encryption model? If yes, what are it's advantage? Please enlighten me.

share|improve this question
No, as that would no longer be CBC mode, which is described as using a single key – Richie Frame Mar 27 '14 at 19:43
that being said, it would eliminate the need for an IV, but make the key change overhead insanely high – Richie Frame Mar 27 '14 at 19:44

SHORT: The key remains the same. CBC mode is one of the ways which allow block cipher to securely process multi block input.

Block cipher with single key produces same output for same input, as it is relatively common for input to contain duplicate blocks, instead of using block cipher as is, a more complex construct is needed.

The idea of CBC mode is that the ciphertext of the previous block affects encryption of the next block. Specifically, plaintext input is XORed with the previous block cipher text (or with "Initialization Vector" also known as IV) for the first block. This operation is much less time consuming than key change.

So shortly, the benefit of CBC mode is that it allows securely using the block cipher, something that raw block cipher (ECB mode) generally does not allow for multi block messages.

In addition to CBC mode, also numerous other block cipher modes of operation exist. There are circumstances where one of the other block cipher modes of operation is more appropriate than CBC.

The most basic block cipher modes of operation (ECB, CBC, CFB, OFB, CTR) are described e.g. in Wikipedia and NIST Special Publication 800-38A. The Wikipedia article contains great picture, which illustrates the need for modes of operation beyond ECB.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.