Sophia McIntosh


Jump to: navigation, search


Keyword Cipher

Cipher Alphabet

A keyword cipher requires a keyword and a key letter.

keyword: hello

key letter: s

First, remove any duplicate letters from the keyword such that only the first instance of a letter (starting from the beginning of the keyword) remains.

updated keyword: helo

The first letter of the keyword corresponds to the key letter in the alphabet. The remaining letters of the keyword follow. (In the example below letters that have not yet been represented in the cipher alphabet are represented by "x")

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

x x x x x x x x x x x x x x x x x x h e l o x x x x

The ciphertext alphabet is completed by filling in the letters of the alphabet, beginning at "a", after the keyword. Letters that appear in the keyword are excluded. Extra letters circle back to fill in before the keyword.

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

f g i j k m n p q r s t u v w x y z h e l o a b c d

Keyword Cipher Encryption

Once the cipher alphabet has been created, each letter of the plaintext message can be replaced with the corresponding letter in the cipher alphabet.

plaintext: Today is Friday

ciphertext: ewjfc qh mzqjfc

Keyword Cipher Decryption

Decryption follows the same process as encryption but replaces each letter in the ciphertext with the corresponding letter in the plaintext alphabet.

ciphertext: ewuwzzwa qh hfelzjfc

plaintext: tomorrow is saturday

My Software

My software code can be viewed and downloaded at

You can try out the software at

The software has two features. On the main page a user can input a plaintext or ciphertext message along with a keyword and key letter. There are buttons to encipher or decipher the user's input and display the output. On the "cryptanalysis" page, the user can input ciphertext without knowing the keyword or key letter. The user can then fill in letter guesses in the cipher alphabet and the software makes the letter substitutions in the output. This allows users to determine the keyword and key letter used to encipher the ciphertext.

Personal tools