6
$\begingroup$

I am taking a class on security systems. My professor considers CBC to be a stream cipher mode, like CFB and OFB. Most sources I have read do not agree with this, so I asked my professor about this, and he claims it is usually called a stream cipher mode. Is this true?

$\endgroup$
  • 2
    $\begingroup$ if cbc mode is a stream cipher, then what is a block cipher? Stream Cipher can process any number of input bits may be one bit at a time or one byte at a time, but block cipher always process bit lengths in multiple of its block length n so does CBC mode. if input text is shorter than block length, one has to append it using padding schemes to make it multiple of block length. The Counter mode can be termed as stream cipher. crypto.stackexchange.com/questions/5333/… $\endgroup$ – khan Sep 1 '17 at 18:46
  • $\begingroup$ What does the professor, Clifford Neuman, call CTR mode? Basically he is being "difficult" against common understanding and using his reputation to get away with a definition not commonly used. Just asked my full time crypto professional and the answer was "no". It was mentioned that CBC stands for "Cipher Block Chaining", notice the word Block. Also Counter mode (CBC) turns a block cipher into a stream cipher. Thus a block cipher is not inherently a stream cipher. If you use his definition in interaction with crypto professionals you will be mis-understood—at best. $\endgroup$ – zaph Mar 2 at 20:47
5
$\begingroup$

The exact answer may depend on your definition of "usually" or what would be a canonical source for such a statement.

There are few sources (personal opinion) more canonical than Handbook of Applied Cryptography. In it, Remark 7.25 says the following related to your question:

The CBC mode may also be considered a stream cipher with n-bit blocks playing the role of very large characters. Thus modes of operation allow one to define stream ciphers from block ciphers.

This was not really the answer I expected to write when I first read your question, but I would say that you professor's statement, being inline with what HAC says, is true.

In referencing this remark, the book says (p.3):

Whereas block ciphers generally process plaintext in relatively large blocks (e.g., n ≥ 64), stream ciphers typically process smaller units (see Note 6.1); the distinction, however, is not definitive (see Remark 7.25).

$\endgroup$
2
$\begingroup$

Terminology is ultimately arbitrary, but few people call CBC a stream cipher, and there are good reasons not to call it a stream cipher.

CBC is prone to padding oracle attacks such as Lucky thirteen (variants of which are still extant in TLS implementations today). CBC requires padding, because input usually comes in octets, not in 16-byte blocks, and this is very important to know when deciding whether to use it. (And because of how difficult it is to manage padding, the answer is usually “don't use it”.)

If you call CBC a stream cipher, then it is not true that “stream ciphers don't use padding”, and you have to allow for the fact that stream ciphers are vulnerable to padding oracles. Most symmetric ciphers in use today are bit-based stream ciphers, and do not use padding, which makes them easy to use. It's useful to have a short word or phrase to designate such easy-to-use ciphers, and almost everyone calls them “stream ciphers”.

So, no, CBC is not a stream cipher. It's a more complicated construction which has pitfalls that a stream cipher, by construction, doesn't have.

$\endgroup$
0
$\begingroup$

This question is old and deserves an adequate answer.

CBC mode needs to have the entire block of plain text before it can encrypt it. This is because it is this block that is the input into the cipher algorithm. Therefore it is a block cipher mode.

Something like CTR doesn't use the plain text as input to the cipher algorithm but rather a nonce concatenated with a counter. The plain text is then XORed with the output of the cipher algorithm. So, as soon as you have 1 bit of your plain text available, you can encrypt it.

The difference is what goes into the cipher algorithm. If the plain text goes in, it is block cipher. If it is an IV or nonce that goes in, it is stream cipher.

$\endgroup$
  • $\begingroup$ There are stream cipher operates on bytes, even if you want, you can define words. etc/ $\endgroup$ – kelalaka Mar 2 at 19:15
  • 3
    $\begingroup$ Therefore it is a block cipher. - CBC is not a block cipher, it is a mode of operation that is used with a block cipher. $\endgroup$ – Ella Rose Mar 2 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy