Skip to content

Lesson 04: Simple Substitution Ciphers - CPS101 Mystery Cache

Hidden : 5/22/2011
Difficulty:
2 out of 5
Terrain:
1.5 out of 5

Size: Size:   micro (micro)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:


The cache is NOT at the posted coordinates

 

About This Series

This Calgary Puzzle Solving 101 Series (CPS101) is based on the original Puzzle Solving 101 Series by ePeterso2.

The first 12 caches in this series help you build your puzzle-solving skills. Each contains a lesson focusing on a specific skill, examples of how to use that skill, an actual puzzle to test that skill, and a cache to find as a reward. Study the lesson, solve the puzzle, and you’ll have the location of a cache.

When you enter correct coordinates into the geochecker, a piece of information will be revealed that is required for the final exam (the 13th cache in the series).


Lesson 04: Simple Substitution Ciphers

Because Calgary has so many cipher puzzles, the CPS101 series devotes two lessons to this subject: Simple Substitution Ciphers and Other Ciphers. Both these lessons are quite long, so make yourself comfortable.

Technically speaking, simple substitution ciphers include those encryptions where a single unit of plaintext is represented by a single unit of ciphertext. In simplified terms, each letter of the alphabet is replaced by another letter (or by a symbol).

The coded messages usually are seen, but they also can be heard (e.g., Morse code) or felt (e.g., Braille).

True Ciphers

Atbash Cipher

The Atbash cipher has been around since about 500 B.C. This substitution method is created by reversing the letters of the alphabet. Thus, the first letter (A) is replaced by the last letter (Z), the second letter (B) is replaced by the next to last letter (Y), and so on.

Plain:  a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher: Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

If you encounter some encrypted Atbash ciphertext (such as “XZOTZIB”), all you need to do is find each letter of the ciphertext on the bottom row and replace it with the plaintext letter directly above (“calgary,” in this case). Or you can have an online tool do the work for you.

Caesar Cipher

Named after Roman emperor Julius Caesar, who used this encryption scheme, the Caesar cipher (a.k.a. Caesar shift or ROT) actually is 25 variations on a theme. To employ this method, shift each letter of the alphabet a specific number of positions. Most geocachers already are familiar with the ROT-13 (i.e., Caesar-13) encryption.

For a Caesar-3 shift, the first letter (A) is replaced by the fourth (1+3) letter (D), the second letter (B) is replaced by the fifth (2+3) letter (E), and so on. Decryption is performed the same way it is for Atbash.

Plain:  a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher: 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

As you’ll see below, any simple substitution cipher is fairly easy to break, even if you don’t know the encoding scheme. One way to make secret messages a little harder to decrypt is to remove the spaces from between the words. Then, we might turn around and insert meaningless spaces at regular intervals (typically after every fifth letter).

Do you see how decrypting a Caesar-3 ciphertext of “SURYL QFHRI DOEHU WD” produces the plaintext “provinceofalberta” (i.e., “province of alberta”)? There are online tools that will quickly display the results of all 25 Caesar variations.

Mixed Alphabet

As knowledge of Atbash and Caesar ciphers spread, they obviously became less useful for preserving secrets. Mixed alphabets (or deranged alphabets) require a bit more work for strangers to unravel.

One common method for creating a mixed alphabet cipher is to share a keyword (e.g., “MEMORIALIZE”) with your partner, remove any repeated letters (“MEORIALZ”), and append the unused letters in alphabetical order (see below).

Plain:  a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher: M E O R I A L Z B C D F G H J K N P Q S T U V W X Y

Alternatively, you could randomly assign a cipher letter to each plain letter. This is harder to remember, though, which means you’ll probably risk writing the sequence on a piece of paper (which an enemy could discover).

Later, we’ll discuss several techniques for manually decrypting simple substitution ciphers when the encryption scheme is unknown, as is the case for mixed alphabets. There also are some handy online tools.

Numbers

The cipher doesn’t have to use letters. It easily could use numbers instead. A simple encryption scheme that many people already know is: a=1, b=2, etc. Numbers also can work in Atbash, Caesar, and mixed alphabets. Below is a numeric version of Atbash.

Plain:   a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q r s t u v w x y z
Cipher: 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1

Converting the ciphertext “24-26-13-26-23-26” yields the plaintext “canada.”

Symbols (Pigpen, Dancing Men, Fonts)

Some ciphers are formed by symbols, as in Pigpen and Dancing Men. Be aware that there are at least three versions of the Pigpen cipher (a.k.a. Masonic cipher, Freemason’s cipher, Rosicrucian cipher).

Many typographic symbol fonts also have a convenient one-to-one correspondence between letters and symbols.

The above images spell “hello” in Pigpen cipher, Dancing Men code, and Wingdings font, respectively.

Sounds (Tap Code)

Certain secret messages are meant to be heard rather than seen. Prisoners, for instance, have knocked on cell bars, pipes, and walls in tap code, perhaps dating back to the days of the Russian Czars.

For this code, the alphabet’s letters are arranged in a 5x5 grid, with “k” omitted (“c” is used instead). Now, each letter is represented by two numbers: its row and column. The letter “s” is in row 4 and column 3, so four taps followed by a short pause then three taps would transmit it. A longer pause follows each letter, and “x” serves double duty as a period.

This series of pings:

.... ...  .. ....  .. ..  ... ...  . .....  . ....    ... .  ... ....  .. ..

translates into “signed log”.

Pseudo Ciphers

Many geocache puzzle creators use simple substitution techniques that aren’t true ciphers. Substitution occurs, but the method never was intended to be kept secret. Instead, the public “encryption” scheme is either relatively unknown or can be disguised.

Morse Code

Developed in 1836 for use in the new electrical telegraph system, Morse code traditionally consists of a series of short and longer tones separated by pauses. In written form, it’s usually represented by dots, dashes, and spaces.

Morse code has been used by radio operators, ships, planes, and people in distress (think “SOS”). Even today, many warships still use signal lamps to communicate in Morse code while maintaining radio silence. Messages can be sent by keying a radio, flashing a mirror, toggling a flashlight, and other methods.

Puzzle creators might disguise this code by replacing dots, dashes, and spaces with letters or other symbols. For example:

XYZYZYZXYZYXYXZYXYZZYXZYYYZXYY

would mean “attack now,” if X=dot, Y=dash, and Z=space.

Of course, there are online tools to assist you in translating.

Braille Alphabet

If you encounter a pattern of symbols grouped in sets of three (or four) rows and two columns, then it could be a visual depiction of Braille letters.

In 1819, Capt. Charles Barbier, a French army officer, invented a system of raised dots in specific positions that could be read in the dark. Six years later, Louis Braille, a blind Frenchman, revised this method, allowing blind people to read text by feeling the presence or absence of dots.

Today, geocache puzzle makers can try to stump you with their versions of this alphabet.

.. .  .  .. .   . ..
..  .  .     . .   .      (Braille)
      .     .     . 

g  e  o  c  o  i  n       (plaintext)

There are online translators available.

Dvorak Keyboard

The QWERTY keyboard layout was created in 1873, back when manual typewriters jammed if typists pressed keys too quickly. Scattering the frequently used letters across the keyboard slowed keystrokes and reduced problems.

In 1936, Dr. August Dvorak modified the layout so the most frequently typed letters were easier to reach. Less finger motion meant faster typing speeds and fewer errors.

Today, most computers allow you to change a setting and toggle your keyboard layout between QWERTY and Dvorak. Once you do that, pressing the keys labeled “flash” will cause the characters “unaod” to be substituted. Or you can use an online converter.

Barcodes

First used to track railroad cars, barcodes became familiar to most of us when they reached supermarket checkout scanners in the form of Universal Product Codes (UPCs). For UPCs, different widths of black and white stripes represent different decimal digits. (Printing the digits is optional.)

There are dozens of linear barcode variations that, like UPCs, basically are one dimensional. Some versions have fixed-width stripes, and some ignore the white stripes.

Later, dozens of two-dimensional “barcode” types arrived on the scene, taking the shapes of rectangles, dots, hexagons, and other geometric patterns. They can represent much more data. Optar, for example, can display over 200,000 characters on a sheet of A4 paper.

Online, you can find free barcode readers. Reading the above-right QR Code will display “http://www.calgarycachers.ca/”.

Alternate Alphabets

There are some relatively obscure alphabets that replace classical Latin (English) letters with alternative symbols.

If you’ve never seen them before, then you can treat these as mixed alphabet ciphers (see above) and use the techniques described below to decrypt them. If you do recognize them, then translation is straightforward.

The above images spell the word “hello” in American Sign Language, Betamaze, Bionicle/Matoran, Maritime Signal Flags, Semaphore, and Theban.

Basic Code Breaking

So, you’re reading a puzzle cache’s description page and encounter a jumbled set of letters or symbols (i.e., ciphertext). How should you proceed?

Identify the Code

If you recognize the code, then you can take specific steps to decipher it. This lesson and the next one explain how to decrypt certain known codes.

Obviously, a series of dots, dashes, and spaces is a strong indication that you have Morse code. Indeed, if the ciphertext contains only three unique letters (e.g., X, Y, and Z), then it might be a disguised version of Morse code.

Text with five or six unique letters could be an ADGVX or ADFGVX cipher. If you see pictures of people waving flags or in contorted positions, then it’s a good bet that you’re dealing with a semaphore or dancing men code. Become familiar with the various kinds of ciphers.

The puzzle’s name, author, description, or hints can give clues about its type. Lesson 05 explains how the Incidence of Coincidence can narrow the possibilities.

If you suspect you’re dealing with a simple substitution cipher but don’t know which one, then begin by converting any non-letter symbols into letters, since they’re easier to manipulate (and insert into online tools). For example, assign “A” to represent the white-and-red flags, “B” for the blue-and-red flags, “C” for the yellow-and-black flags, etc.

Perhaps the message was created using Atbash or Caesar. Give them a try, since they are easy to solve.

Brute Force

If you’re facing a mixed alphabet cipher or an unknown encryption that you believe involves simple substitution, then you’ll usually need at least 50 letters to have a reasonable chance of cracking it by brute force.

Words provide valuable context for letters. So, if you’re lucky, the ciphertext might have spaces between the words, like the following:

VMZPZ KC EQ YDU VPEIIZP VEDZ VMEV CEFC VMZ AZCV HEF VY UZGZQU FYNPCZDG EREKQCV E IYDEP AZEP EVVEXJ KC VY CMYYV FYNP ANUUF EQU PNQ DKJZ MZDD.

Copy-and-paste the ciphertext into an online tool. This allows you to test possible letter replacements and back off if they don’t work well.

Look for one-letter words, which normally will be either “a” or (less often) “i.” Three-letter words might be “the” (especially at the start of sentences) or “and.” Double-letters can be helpful, since some letters don’t appear in pairs.

Perform a letter frequency analysis on the ciphertext. The letter “e” is the most commonly used letter in English text, followed by “t,” “a,” and “o.” Try replacing the popular letters in the ciphertext with these common letters.

Once you think you’ve identified the plaintext “e,” then try to find its companion, “h.” The letter “h” often appears immediately in front of “e” but rarely follows immediately after. Get a sense for which letters are likely vowels and which are consonants.

As you replace cipher letters with their actual letters, you’ll start to recognize certain words. With geocaching puzzles, look for spelled numbers (zero, one, two, fifty), directions (north, west), and other key words (degrees, point, minutes, coordinates, latitude, longitude).

If you want to take all the fun out of breaking codes, then there are online programs that will attempt to do all this work for you automatically.

Geocache Examples

Here are a dozen geocaches that employ simple substitution ciphers. All were created by One Bad Ant and will provide you with plenty of fun practice.

GC1EJT2 GC1EKV7 GC1EM1F GC1EMTP
GC1EMVR GC1EMWB GC1ENQW GC1ENQZ
GC1EW1M GC1EW4F GC1EW57 GC1F4YQ

Puzzle 04: An Unusual Cryptogram

Your job is to turn chaos into clarity. Transform obscurity into obvious. Modify silly into straightforward. Try confronting it solo. Mano-a-mano. Your wits against a random mixing.

A particular kind of analysis might aid your work, but you should know that not all paragraphs conform to standards. Without giving away too much, I will say that you’ll spot four notably short words.

Good luck with your task.

RKMVFSX FC SNA PKM KIKZ, KSE ZNT CQNTUE PFSE IQKA ZNT IKSA KA SNMAQFSX PFPAZ OUKSV PFPAZ CFY RUTC AIN RNFSA (INS KSE PNTM) INS CFY. SNA SNMAQ INS ANN WFSTC INS PNM OUKSV SFU MNWKS GFF ENA AN CFY RUTC INS PFSKUUZ PNTM WTUAFRUZ OZ AIN.

FP KUU FC XNNE, ZNT IFUU CRNA K CWKUU, OMNIS, INNE ONY. FA FC SNA QKME AN RFSRNFSA, OTA ZNT WTCA CFXS K UNXONNV IFAQFS AN LUKFW ZNTM PFSE. QNI IFUU ZNT EN AQFC? IFAQNTA ANNUC NM MTFSFSX NTM INMV, AQKSVC.

ZNT WFXQA IFCQ AN CFA KSE CKGNTM K LKRAFGKAFSX GFCAK. WKSZ PNUVC IFUU BNX KSE IKUV NS RKMV RKAQIKZC. OFLZLUFCAC IFUU HFR RKCA, ANN. NS IFSEZ EKZC, CKFUONKAC IFUU PMNUFL FS PMNSA NP ZNT.

OZ SNI, AQFC LNWWTSFLKAFNS FC CKAFCPKLANMFUZ UNSX, KUUNIFSX ZNT K PKFM NRRNMATSFAZ AN TSUNLV FAC XFCA. XNNE UTLV IFAQ ZNTM QTSA.

Verify your coordinates by clicking on the image below:

The cache is inside another container. Accessing that container is a field puzzle, but it shouldn’t be too hard. Please don’t damage the container trying to force it open. No key is required; use your head instead.

Warning: Beware of nearby ants during the non-winter months.

Congratulations to Bearberry and The Cub for being the first-to-find.

Additional Hints (Decrypt)

[Cryptogram:] Fbhtug jbeqf zvffvat n cbchyne flzoby. Qvggb sbe vafgehpgvbaf naq guvf uvag. . . . . . [Cache:] Ybj.

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)