Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

As far as I understand:

  • The primary disadvantage associated with stream ciphers is the need for a random and unique key for each run in order to protect against reused-key attacks.
  • OFB/CFB/CTR block cipher modes turn the cipher into a stream cipher. Again, the IV/nonce should be random and unique.

What's the advantage of using the aforementioned block cipher modes over using a regular stream cipher (even though the latter would probably be faster)?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There is no real advantage, other than the fact that it allows you to convert a block cipher into a stream cipher securely. Since there has been a large amount of research put into block ciphers and ciphers such as AES are commonly implemented in hardware (such as AES-NI), it allows for reuse of the primitives.

Side note: the nonce generally does not need to be random to be secure, it just needs to be unique. Since it will be irreversibly and unpredictably permuted by the block cipher it can be predictable unlike an IV, but a nonce reuse is significantly more devastating than an IV reuse.

share|improve this answer
2  
"Side note: the nonce generally does not need to be random to be secure, it just needs to be unique" - Side Note #2: This depends on the mode of operation (and yes it does hold in this case) –  figlesquidge May 29 at 8:33
    
Side Note #3: CTR mode is extremely sensitive to how you choose the IV. –  K.G. May 29 at 9:56
1  
@K.G. - how so? Just a simple counter will do. –  hunter May 29 at 10:21
    
As additional background, when these modes were initially specified, there weren't really any good, widely accepted stream ciphers, and that continued to be the case until relatively recently. –  otus May 29 at 12:08
    
@hunter I think he means it's extremely sensitive in that a accidentally reused nonce is way way worse than a reused IV –  Iburi Noc May 30 at 2:05

Your Answer

 
discard

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.