Free Hosting  

Quick Overview

Name:              Quagmire IV / Type IV Quagmire
Type:              Substitution
Ease of use:       Easy / Intermediate / Difficult
Breaking the code: Easy / Intermediate / Difficult

Background

The Quagmire IV cipher is a polyalphabetic substitution cipher using a keyword and an indicator key to create a cipher table used for encoding and decoding information. Quagmire I, II and III also exist and are mentioned on their respective pages.

The encoding and decoding is similar to the Vigenère cipher, but the table used is not a fixed one. The table is created by a keyed alphabet using a keyword, another keyed alphabet defined by a keyword and an indicator key that defines the shifts of the rows. It is easiest to demonstrate this by use of an example. Let's use the keywords 'SPEARHEAD', 'DRUMROLL' and indicator key 'SHARP' to construct the table:

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

The table is constructed by placing the first keyed alphabet on top. Below the first column the indicator key is written vertically. This defines the cipher alphabets to be used. They are all Caesar's Shifts of the second keyed alphabet.

Method

The encoding is done by looking up the plaintext letter in the top row and going down one more step each letter. I.e. the first letter is the letter in the table one letter below the plaintext letter, the second letter is in row two below the top row, and so on.

Example

Using the table we defined above I'll show you how to encode the message 'Retreat north now'. Look up the first letter of the plaintext, the 'R' in the top row. Find the letter one row below it, in this case the 'X'. The second letter of our plaintext is the 'E'. Look it up and go down two rows to find the ciphertext letter, in this case the 'J'. Continue to do so for all plaintext letters, returning to row one after the bottom row is used. The resulting ciphertext will be:

Plaintext:  RETREAT NORTH NOW
Keywords:   SPEARHEAD / DRUMROLL
Indicator:  SHARP
Ciphertext: XJZLSWL WQVHP WQI
Formatted:  XJZLS WLWQV HPWQI

Continue to the tool for this cipher or go back to the list of ciphers.