Cipher Mode Might Getcha


This attack requires an expert & dedicated cryptanalyst.

The easy fix, explained below, is do not use ECB mode.

Block ciphers encrypt data in chunks called, wait for it, blocks.

Block sizes depend on the method and key size.

abcdef ghijkl mnopqr abcdef are 4 clear & encrypted blocks. 

———————

The 'gotcha is' how individual chunks (blocks) are encrypted.

———————

There's an exposed pattern in the above encryption.

Both abcdef blocks encrypts to identical text.

With enough data, expert cryptanalysts can use these patterns to

figure out clear text. Since I don't understand how, I can't describe it.

———————

ECB (Electronic Code Book Mode) encrypts this way; most others don't.

It's easy to see when comparing ECB vs CBC (Cipher Block Chaining)

(fyi–DoCrypt uses CTR mode which is, also, recommended by experts)

 

Click Example
Button
 Then click Encrypt a few times and notice...
 
1. ECB encryption never changes. CBC changes every time.
Changing message or doesn't effect results.
 
2. ECB encrypts every '12345678' identically
Changing doesn't effect results
 But characters must be in identical 8 letter groups
 
3. Like 2. above, identical 8-letter groups (1 3 5 7 )
encrypt identically

Play time

Click example 2; modify any number int the first '12345678'; Encrypt.

Notice totally changes 1st ECB block compared to other '123..8'.

Cipher's secure only blocks; Cipher modes secure groups of blocks.

———————

Most experts advise against using ECB.

Of course, if you got AES & CBC absolutely use it.

But if not, decide who your defending against & their resources.

security thru obscurity is a practical strategy —unless someone with

 sufficient resources allocates them against ECB encrypted text.

References ↓

———————

Don't use ECB with pictures  WordPress

Cipher modes of operation –Wiki

ECB weakness in general –Wiki

ECB weakness –math genius only