When trying to understand how “modes of operation” are applied when using block ciphers like DES, I noticed I must be missing something. Maybe I simply misunderstood or mixed up things somewhere.

How are (keeping the DES example) Feistel structure properties achieved, when a mode of operation such as ECB is used?


The block cipher itself is used as a black box for any mode of operation. The internal design - including if the block cipher uses a Feistel network - is completely tranparent to the mode of operation.

The only thing that matters for the mode of operation is the block size of the block cipher. This, together with any usage limitations, limits the applicability of the block cipher for certain modes of operation. (Tripple) DES is less useful for modes of operation such as CTR and unusable for GCM which requires a 128 bit block size.

Note that the block cipher is basically a configuration parameter for the mode of operation. The block cipher itself doesn't use a mode of operation - it is being used by one.

  • $\begingroup$ DES obviously should not be used anymore. Only 3DES with 192/168 bit keys still has limited applicability. $\endgroup$
    – Maarten Bodewes
    Jun 24 '16 at 13:55
  • $\begingroup$ @MaartenBodewes Correction: 112/168. Should not be used for new systems but de facto is still widely used. All ATMs and POS terminals/PinPads in the UK use single DES. And will continue using it for years and years... $\endgroup$
    – tum_
    Jun 24 '16 at 18:33
  • $\begingroup$ I meant 192/168, i.e. DES-ABC keys. It says should in the recommendation in the comment right? That products still use single or two key DES is shamefull. $\endgroup$
    – Maarten Bodewes
    Jun 24 '16 at 18:39
  • $\begingroup$ Oh, OK, I thought you made a typo. Yes, shameful but that's the reality - the cost and the risk of an upgrade comes into play and ... no one wants to pay and no one (of those who could) wants to take the risk. Real life, nothing new. $\endgroup$
    – tum_
    Jun 24 '16 at 18:47

A block cipher mode is an algorithm used along with a block algorithm to encrypt arbitrary size plaintext, providing both confidentiality and authentication.

A single block cipher operates only on a fixed block length. It is not alone enough to encrypt larger plaintexts. It functions as a blackbox in an encryption scheme (see Random Oracle Model).

The are many block cipher modes of operations. Some work as a stream cipher (synchronous and self-synchronous), and some provide avalanche effect over certain or large portions of the input (encryption/decryption). Here is list of a few of them:

  1. Electronic Codebook (ECB): ECB simply encrypts consecutive blocks of data with the chosen block cipher and key.

ECB Encrypt

ECB Decrypt

It is important to note that this mode fails to successfully disrupt patterns in the plaintext, as identical blocks get encrypted to identical cipher blocks.

  1. Counter(CTR): Counter mode turns a block cipher into a synchronous stream cipher. It requires an IV or nonce which is combined with a counter and encrypted with a block cipher. The counter can be any non repeating function, however a simple increment by one is secure enough, and not to mention, the most efficient.

CTR encrypt CTR decrypt

  1. Output Feedback (OFB): This also turns a block cipher into a synchronous stream cipher. It starts encryption with an IV, and operates by encrypting the previous block.

OFB encrypt OFB decrypt

  1. Cipher Feedback (CFB): This one converts a block cipher into a self-synchronous stream cipher. It starts with an IV, XORs the output to get the first ciphertext block, and uses every previous ciphertext block as the next IV. CFB encrypt CFB decrypt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.