Ciphers

Work in progress. This note is still being written and incomplete.

2 min read Last updated Tue Aug 04 2026 03:56:01 GMT+0000 (Coordinated Universal Time)

An encryption algorithm (ee), also called a cipher, transforms a plaintext (mm) into a ciphertext (cc) under the control of a secret key (kk).

c=ek(m)c = e_k(m)

The reverse process, decryption (dd) or decipherment, recovers the plaintext:

m=dk(c)m = d_k(c)

Secret Key

The secrecy of plaintext mm is totally dependent on the secrecy of the key kk.

Algorithms with this property are called symmetric cryptosystems or secret key cryptosystems. Both parties to a secret communication must know kk and keep it secret.

Security also depends on Kerckhoffs’s principle, covered in a dedicated note, for what a cryptosystem may safely assume is public.

Categorization

Ciphers are classified along several axes, not mutually exclusive. A modern cipher often falls into multiple categories at once.

Classical Ciphers

The ciphers used in the pre-computer era are called historical ciphers or classical ciphers.

Historical ciphers used plaintext linked to:

  • A particular language.
  • The alphabet of symbols or characters used.
  • The peculiar statistical characteristics of the language.

For English:

  • A 26 character alphabet (A to Z).
  • Higher usage of characters e, t, a, o, i.
  • Higher appearance of bigrams (th, he, an, in) and trigrams (the, ing, and, her, ere).

Mono-alphabetic Ciphers

A plaintext character is replaced with a ciphertext character according to a fixed rule.

Preserves the language’s statistical characteristics in the ciphertext.

The shift and substitution ciphers are examples of mono-alphabetic ciphers.

Poly-alphabetic Ciphers

Uses multiple substitution alphabets, e.g. one alphabet for odd-numbered positions and a different one for even-numbered positions, flattening the character frequency graph.

Using nn alphabets in a poly-alphabetic cipher gives a key space of (26!)n(26!)^n at the cost of remembering a key of length 26n26n characters.

Was this helpful?