Does it make the encryption stronger? I thought it was used to make sure the ciphertext is more "random." It doesn't really make it any stronger, or so I think.
See this link: http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29
Check out the images just below. ECB (no feedback) may give an "echo" of the plaintext in the ciphertext. A feedback loop fixes this.
The DES operation encrypts 64 bits (8 bytes) of data, using a 56-bit key. That's it.
Most files are longer than 8 bytes though, so we need to break the file up into blocks and process each one somehow. Naively we could do this by just encrypting each block with the same key, in isolation from the rest (so-called "electronic code book", or ECB mode).
However, many file formats contain common sequences of bytes (to pick a familiar example - HTML documents often contain many links starting with <a href=
). Using ECB mode, every occurrence of these sequences would encrypt to the same ciphertext, giving an attacker clues about the plaintext structure. Furthermore, the original text can often be guessed from the context (chances are fairly good that an HTTPS request contains some HTML, for instance) so the attacker could construct new messages without knowing the original key - and trick the recipient into accepting those messages as genuine.
There are several ways to fix this; one being "cipher-block chaining" (CBC mode) where the ciphertext from each block is "mixed" with the subsequent block, disguising these repeated sequences. Additionally a strong initialisation vector (IV) is used - this is a random value used to 'seed' the encryption, ensuring that even if the same file is encrypted twice with the same key, the ciphertexts will differ - leaving the attacker with fewer clues about the content.