Re: Implementing byte stream cipher



"Rob Warnock" <rpw3@xxxxxxxx> wrote in message
news:h5idnazNGLcU683ZRVn-tw@xxxxxxxxxxxxxxxx
Joseph Ashwood <ashwood@xxxxxxx> wrote:
+---------------
| 1) Any cipher mode becomes weaker after 2^(blockSize/2) blocks, for a
| 64-bit cipher this is 32GB, for a 128-bit cipher this is 256,000
PetaBytes
| (295,147,905,179,352,825,856 bytes).
+---------------

Typo, perhaps? 295,147,905,179,352,825,856 is 2^68.
2^(128/2) == 2^64 == 18,446,744,073,709,551,616.

Nope, that is 2^64*blockSize (blockSize = 128 bits = 16 bytes = 2^4 bytes) =
295........856 = 256PB, just like the first is 2^32*blockSize = 32GB. There
are ways to bring it down to that level with a strong mode, actually even
lower (e.g. bottom-bit only CTR mode), and with enough malice aforethought
you can even cause CBC to behave badly after block 1 (requires knowledge of
the key and cipher).
Joe


.