Monoalphabetic Ciphers

A cipher is monoalphabetic if any letter of the alphabet is always enciphered by the same ciphertext letter.

For example, the following are monoalphabetic ciphers:

Caesar's cipher
plaintext a b c d e f g h i j k l m o n p q r s t u v w x y z
ciphertext d e f g h i j k l m n o p q r s t u v w x y z a b c

My Cipher
plaintext a b c d e f g h i j k l m o n p q r s t u v w x y z
ciphertext Œ š œ Ÿ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ­ ® ¯ ° ± ² þ

In Caesar's cipher the alphabet is shifted three places. Of course, we can shift it any number of places. Because in English alphabet there are 26 letters, there will be 26 distinct alphabets.

Ciphers of such sort are called additive. The number of positions that the alphabet was shifted is called a key. The key tells precisely how the algorithm proceeds in a particular message. Because usually an algorithm for encryption is relatively large and difficult to keep secret, the overall security of the cryptosystem relies on the secrecy of the key.

Mathematically, any additive cipher can be expressed by the following equation:

c = (p + a) mod 26
where p is the position of the plaintext letter,
a is the key,
and c is the position of the resulting ciphertext letter.

The part mod 26 (which means the remainder of the sum when divided by 26) is necessary to ensure that alphabet, so to speak, 'wraps around' when shifted.

One of the simplest and oldest devices used to encipher by additive cipher is the cipher wheel.

the cipher wheel

Invented in Italy in 1470 by the Renaissance architect and theorist Leone Battista Alberti, it realizes all 26 possibilities of an additive cipher. Its appeal is in the fact that with it, encipherment and decipherment can be performed without carrying bulky or compromising written materials.

The cipher disk came into large-scale use in the United States for the first time in the Civil War. The Federal's chief signal officer patented a version of it, very similar to the original Italian disk, for use in flag signaling.

About a half-century later the U.S. army adopted a simplified version, very similar to this device, in which one alphabet was "standard" and the other "reverse standard." During the period of the First World War and for several years afterward, the Army issued the disk in this form to units that needed a cipher which could be carried and used easily and which gave a few hours' protection to tactical messages.


Try it out yourself! Additive Cipher
Message to encipher:

Key*:       
* The key can be 0, then the cipher will map the message to ...itself!

Of course, you do not have to add the key. You can multiply it. Such cipher will be called a multiplicative cipher.

Not every key will work, that is, not every key will produce a unique alphabet. For example, if we multiply the position of each letter in the English alphabet by 2, then letters h and u both map to ciphertext letter p. So, we cannot use such alphabet as a cipher -- any cipher must make it possible to reconstruct the plaintext uniquely from the ciphertext.


Try it out yourself! Multiplicative Cipher
Message to encipher:

Key*:       
* A key has to be a number relatively prime to 26, otherwise the mapping will not be unique.

Both additive and multiplicative ciphers can be generalized to affine ciphers. These can be expressed simply by a linear equation:

c = a(p + b)             (affine cipher version I)
or
c = ap + b               (affine cipher version II)
where p is the position of the plaintext letter,
a and b are the keys,
and c is the position of the resulting ciphertext letter.
All of this is, of course, mod 26 to ensure that the number will indicate a valid letter.


Try it out yourself! Affine Ciphers

Message to encipher:


Additive key:        Multiplicative key*:

Version of affine cipher:

* A key has to be a number relatively prime to 26, otherwise the mapping will not be unique.



There is another sort of monoalphabetic cipher -- a keyword cipher. For it you need two things, a keyword and an offset letter. We omit all repeating letters from the keyword and obtain a sequence of distinct letters. For example, let the keyword be marmaduke. Then, the sequence will be marduke. Now, we write this sequence of letters beneath the plaintext alphabet starting beneath the offset letter.


Try it out yourself! Keyword Cipher

Message to encipher:


Keyword*:  
Offset letter:

* The length of the keyword must not exceed 26, for it acts as a displacement of the alphabet.



[ Polyalphabetic Ciphers | Cryptology ]