Keyword Substitution Cipher

Description

A keyword substitution cipher is a simple substitution cipher. It uses a keyword to create a replacement alphabet. The replacement alphabet begins with the letters in the keyword and finishes with the remaining letters of the normal alphabet in sequence.

Example

Suppose that you wanted to encipher the text

the moment echo saw narcissus she was in love. she followed him like a starving wolf following a stag too strong to be tackled.

The first step is to choose a keyword:

SUBSTITUTION

You need to remove from the keyword any letter that has already been used. So here it is necessary to remove the second 'S', 'T', 'U', and 'I', and the third 'T':

SUBTION

The letters in the keyword are used to begin a replacement alphabet:

abcdefghijklmnopqrstuvwxyz
SUBTION

The replacement alphabet is then completed with those letters of the normal alphabet that have not already been used. One method is to use the letters in sequence, starting from the beginning of the alphabet:

abcdefghijklmnopqrstuvwxyz
SUBTIONACDEFGHJKLMPQRVWXYZ

Another method is to use the letters in sequence, starting with the first available letter after the final letter of the keyword:

abcdefghijklmnopqrstuvwxyz
SUBTIONPQRVWXYZACDEFGHJKLM

Note what happens when you get to the end of the normal alphabet: you go back to the beginning.

Once you have a substitution table, then you can encipher the plaintext. Using the second substitution table, you get

FPI XZXIYF IBPZ ESJ YSDBQEEGE EPI JSE QY WZHI. EPI OZWWZJIT PQX WQVI S EFSDHQYN JZWO OZWWZJQYN S EFSN FZZ EFDZYN FZ UI FSBVWIT.

If you remove the punctuation and place the letters in blocks of 5, then this becomes

FPIXZ XIYFI BPZES JYSDB QEEGE EPIJS EQYWZ HIEPI OZWWZ JITPQ XWQVI SEFSD HQYNJ ZWOOZ WWZJQ YNSEF SNFZZ EFDZY NFZUI FSBVW IT

Recognition

This section is under construction.