Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Includes 'real teacher' use videos.

Pigpen Cipher

Interesting facts: The cipher is believed to be an ancient cipher and is said to have originated with the Hebrew rabbis. Thompson writes that, “there is evidence that suggests that the Knights Templar utilized a pig-pen cipher” during the Christian Crusades.

The pigpen cipher (alternatively referred to as the masonic cipher, Freemason's cipher, Napoleon cipher, and tic-tac-toe cipher) is a geometric simple substitution cipher, which exchanges letters for symbols which are fragments of a grid. The example key shows one way the letters can be assigned to the grid.

The pigpen cipher uses graphical symbols assigned according to a key similar to the above diagram.

Try it yourself - encrypt and decrypt

Check out the code