Chapter IV: Codes and Keywords
Other schemes used a word lookup in some standard text (such as the Declaration of Independence). Thus 647 would code for the first letter of the 647th word. This had the advantage that many different numbers could be used for common words like THE and AND, thereby thwarting frequency analysis.
Another approach is to substitute pairs of letters using a keyword. First construct a square using a keyword thus:
In the keyword, MANCHESTER the second E is omitted. The square is then filled with letters that were not used. When coding substitute I for J. |
M A N C H |
If the two letters in a pair are in the same row or column, swap them. E.g. SO becomes OS and AN becomes NA.
Otherwise form a rectangle and swap letters at the opposite corners. E.g. AT becomes NS or GO becomes FP.
Now "Attack at Dawn" becomes AT TA CK AT DA WN and then NSSNH INSFM XA (divided into groups of 5).
By using a different keyword the cipher is completely changed. This can be done as often as necessary using some pre-arranged scheme.
Otherwise form a rectangle and swap letters at the opposite corners. E.g. AT becomes NS or GO becomes FP.
Now "Attack at Dawn" becomes AT TA CK AT DA WN and then NSSNH INSFM XA (divided into groups of 5).
By using a different keyword the cipher is completely changed. This can be done as often as necessary using some pre-arranged scheme.