Electronic Code-Book Ciphers

0 Conversations

What is an Electronic Code-Book?

The advent of powerful computers permitted a number of improvements to cryptographic systems. Obviously computers could handle extremely complex encryption algorithms very quickly, permitting complexity to be rapidly increased. In practice one of the principal methods of increasing complexity is to widen the blocklength of the cipher. It is possible, in fact, to divide all computer ciphers into block ciphers and stream ciphers. Block ciphers are by far the most common types of cipher in use today and they have spawned a great many variants, the most common types being Electronic Code-Book ciphers and Cipher Block-Chaining ciphers. All block ciphers work on the principle that a block of message is imported and encrypted, then the next block udergoes the procedure and so on. The longer the block, the more obscured underlying patterns in the plaintext become so generally a longer blocklength equates to increased security. It isn't true to say that this is a simple question however. The paper-based Playfair cipher has a blocklength twice that of the electro-mechanical Enigma machine, yet Enigma is much the tougher system to cryptanalyse.

Blocklength is normally described in bits, and as there are 8 bits in a byte 1 and these have been converted to character blocklengths to retain commonality with pre-computer ciphers in the statistics sections.

The monoalphabetic Playfair cipher has a blocklength of two characters, other ciphers have offered similar lengths, but blocklengths over four characters long really had to wait for the advent of the computer.

The detail of operation for ECB mode ciphers differs dramatically depending on the algorithm, but there are certain common features. Broadly speaking a block of characters is brought into the algorithm, modified using the key and then exported again. The important things to gather are:

  • The key is the same for each input block.
  • The output block is sensitively dependent on the input block, so changing a single character anywhere in the input block will potentially alter every character on output.
  • The output block is sensitively dependent on the key, so changing a single character anywhere in the key will potentially alter every character on output.
  • If the input block and key are identical for two iterations of the cipher then the output blocks will be identical.

Obviously the problem is that if the plaintext consists of frequently repeated sequences then if the key remains the same throughout the encryption then there can be repeated output blocks. This is relatively unlikely because of the blocklength, identical repeats in eight or more characters will prove rare, but it still can happen.

Aside from blocklength, there is another requirement for security. The encrypted ciphertext must be difficult to mathematically relate to the plaintext, making the sequence of encryption difficult to determine. This is done by repeating the encryption process a number of times, splitting the algorithm into 'rounds'. Because the output of each round becomes the input for the next and because the rounds are each miniature cryptographic routines in their own right it becomes rapidly impossible to identify the processes within the cipher unless it is possible for an attacker to obtain a sample of the plaintext and the ciphertext and also the intermediate output between the rounds.

DES

The Data Encryption Standard is a most unusual cipher, or more accurately it was a most unusual cipher when it first appeared.

The US government wanted a cipher that could be incorporated into almost any piece of hardware or software and would produce competent security for that product. In order to accomplish this they came up with the unprecedented step of initiating a competition for the contract. The eventual winner of the competition was renamed DES, the winning company was IBM. Up to that point encryption algorithms were closely guarded secrets, you definitely didn't want the potential eavesdropper to know how your cipher worked, so the open competition was astounding. Actually the reasoning was quite sound. In a successful cipher all security must reside in the key, this means that should your algorithm be compromised then this would not mean the cipher was obsolete.

So if your cipher's algorithm doesn't need to be secret, then why not open it up completely. While this does cause a risk, in the sense that a weakness in the algortihm could be found by an attacker it also adds a gigantic strength: All the experts in the world can try picking holes in the algorithm, if none of them succeed then it's fair to suggest that the algorithm is fairly secure. No logical testing of an algorithm can provide such confidence.

DES was adopted in several different forms for almost every concievable application, used by commercial enterprises, government agencies and no doubt those less well intentioned. Its longevity and popularity have ensured that it is the most thoroughly tested cipher ever and in all that time it has never failed to live up to its brief.

In recent years DES has come under fire for the simple reason that computers are becoming so fast that it is increasingly possible to build a system at home that can crack DES. A short-term solution was the implementation of 'Triple-DES', where the cipher uses two keys and the message is encrypted with the first, decrypted with the second and then encrypted again with the first. While a substantial improvement in security it failed to overcome the simple fact that 64bit ciphers, however well designed, simply aren't secure enough these days. Accordingly a new competition was instituted to find the 'Advanced Encryption Standard', AES.

DES can operate in several modes, ECB being the weakest of its methods of operation, but countless ECB implementations were produced principally because of the simplicity of the coding required and so DES is easily the most widely used ECB cipher ever.

The Statistics of DES in ECB Mode

  • Alphabets: 1
  • Blocklength: 8
  • Keyspace: Approaching 1020
1One byte represents a single character of a message

Bookmark on your Personal Space


Conversations About This Entry

There are no Conversations for this Entry

Entry

A611254

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more