When I was perhaps nine years, I borrowed a book from the library on various maths and CS topics. It outlined various simple ciphers, including one that I used a lot, just for fun. I can't remember the name of the book, or the name of the cipher, so I hope you can help me with the latter one.

It is a monoalphabetic substitution cipher with words as key. The key, an arbitrary word in the alphabet, is concatenated with the alphabet itself, and then duplicate letters are removed (keeping only the first occurrence). The resulting word is the cipher alphabet.

For instance, using the modern English alphabet and the key "STACKEXCHANGE", the cipher alphabet would become "STACKEXHNG" (key, later duplicates removed) concatenated with "BDFIJLMOPQRUVWYZ" (alphabet without letters from key):


Of course, this cipher is insecure past the "highest" letter in the key (Y=Y, Z=Z), but it's still interesting as a practical explanation of substitution ciphers (perhaps even more, due to its weaknesses).

To repeat my question: does this scheme have a commonly known name? Or is known to be attributed to a person?


2 Answers 2


This is a simple substitution cipher, specifically a mixed/deranged alphabet cipher. See wikipedia's description:

Substitution of single letters separately—simple substitution—can be demonstrated by writing out the alphabet in some order to represent the substitution. This is termed a substitution alphabet. The cipher alphabet may be shifted or reversed (creating the Caesar and Atbash ciphers, respectively) or scrambled in a more complex fashion, in which case it is called a mixed alphabet or deranged alphabet. Traditionally, mixed alphabets may be created by first writing out a keyword, removing repeated letters in it, then writing all the remaining letters in the alphabet in the usual order. Using this system, the keyword "zebras" gives us the following alphabets:

  • $\begingroup$ I guess I should have checked Wikipedia first. I'll take its word for it. Thanks :) $\endgroup$
    – Rhymoid
    Commented Jun 16, 2012 at 22:59

It's sometimes called a keyword cipher. As dr jimbob notes, it's a particular type of monoalphabetic substitution cipher.

Ps. See also this recent question about breaking such ciphers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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