Common cryptosystems features

Before we proceed further, it’s worth noting that all the cryptosystems we’ll discuss in this chapter have four common features:

  • Symmetric: They are all symmetric cryptosystems. Indeed, they all predate the discovery of public-key cryptography.

  • Confidentiality: They are all designed to provide confidentiality only.

  • Alphabetic: They are all described as operating on alphabetic characters. This is in contrast to modern cryptosystems, which generally operate on numbers, most commonly binary numbers. This has some implications—for example, we normally consider the size of the keyspace of these cryptosystems rather than discussing key length.

  • Unsuitable: Each, in its own different way, is completely unsuitable for use in modern cryptographic applications. In most cases, this is because these cryptosystems aren’t secure enough.

Caesar cipher

The Caesar cipher tends to be the first example in any introduction to cryptography. Although it’s a very straightforward cryptosystem, there are basic lessons to be learned from studying it. This cryptosystem is also sometimes referred to as the shift cipher. The name ‘Caesar cipher’ is occasionally used in a more restricted way to describe a shift cipher when the particular shift of three is used.

Description of the Caesar cipher

The idea of the Caesar cipher is to encrypt each letter of the alphabet with a letter that is obtained by ‘shifting’ the alphabet a secret number of positions. One way of visualizing this is to do the following:

  1. Write out the plaintext letters of the alphabet A to Z twice in order (one after the other).

  2. Imagine a ‘sliding ruler’ consisting of one copy of the ciphertext letters of the alphabet A to Z in order. This sliding ruler can be shifted to any position underneath the plaintext letters.

  3. Sender Alice and receiver Bob both agree on a secret shift, which is represented by a number between 0 and 25.

In order to encrypt a plaintext letter, Alice positions the sliding ruler underneath the first set of plaintext letters and slides it to the left by the number of positions of the secret shift. The plaintext letter is then encrypted to the ciphertext letter underneath it on the sliding ruler.

The result of this process is depicted in the figure below for an agreed shift of three positions. In this case, plaintext HOBBY is encrypted to ciphertext KREEB.

Get hands-on with 1400+ tech skills courses.