ECB

Electronic Codebook Block

In ECB mode, each block of plaintext is encrypted independently using the same key and encryption algorithm, producing a corresponding block of ciphertext.

The encryption process is deterministic, meaning that for a given key and plaintext block, the resulting ciphertext block will always be the same.

How to detect ECB mode ?

If the user can supply a plaintext that is cipher by the application, then by sending a plaintext of 3 times the block size it's possible to see if ECB is used.

circle-info

As explained before, ECB encrypt each block independently. By sending multiple exact same blocks, the result will be exactly the same for each blocks.

Why sending 3 blocks instead of 2 ? It's cause possible misalignment.

but if the data is concat with non arbitrary values we can have :

All block are differents. The workaround is to submit a 3 times block size input.

Last updated