猪圈密码是一种以格子为基础的简单替代式密码。即使使用符号,也不会影响密码分析,亦可用在其它替代式的方法。右边的例子,是把字母填进格子的模样。
The core elements of this system are the grid and dots. Some systems use the X’s, but even these can be rearranged. One commonly used method orders the symbols as shown in the above image: grid, grid, X, X. Another commonly used system orders the symbols as grid, X, grid, X. Another is grid, grid, grid, with each cell having a letter of the alphabet, and the last one having an “&” character. Letters from the first grid have no dot, letters from the second each have one dot, and letters from the third each have two dots. Another variation of this last one is called the Newark Cipher, which instead of dots uses one to three short lines which may be projecting in any length or orientation. This gives the illusion of a larger number of different characters than actually exist.
Another system, used by the Rosicrucians, used a single grid of nine cells, and 1 to 3 dots in each cell or “pen”. So ABC would be in the top left pen, followed by DEF and GHI on the first line, then groups of JKL MNO PQR on the second, and STU VWX YZ on the third. When enciphered, the location of the dot in each symbol (left, center, or right), would indicate which letter in that pen was represented. More difficult systems use a non-standard form of the alphabet, such as writing it backwards in the grid, up and down in the columns, or a completely randomized set of letters.
The Templar cipher is a method claimed to have been used by the Knights Templar. It uses a variant of a Maltese Cross.
Example
Using the Pigpen cipher key above, the message “X MARKS THE SPOT” is rendered in ciphertext as: