Fleissner Grille Cipher
A Fleissner grille cipher is an interesting form of transposition cipher that uses a grille. The grille is a square piece of paper divided into squares (like a chess board, or graph paper). Some of the squares are cut out of the grille.
The secret key for a Fleissner grille is simply the locations of the holes that have been cut. See the example grid below.
To encrypt a message, you lay your grille over a second piece of paper and write your message in the spaces revealed by the holes in the grille.
When you have filled in every space, rotate the grille 90 degrees clockwise and continue writing your message in the new gaps that are revealed. Keep rotating until you've finished your message.
Now lift the grille off the paper to reveal a square filled with the letters of your message in a garbled order. If there are empty spaces left over, fill them in with Xs.
If you haven't finished your message by the time you rotate the grille back to where it started, then you'll have to continue on a fresh piece of paper. You'll have two (or more) squares of letters when you're done.
Finally, write out your cipher text by reading off of the squares from left to right.
To decrypt a message, write out the cipher text, left to right, so it fills a square of the same dimensions as your grille.
Place your grille over the square in the correct orientation. The grille will reveal only some of the letters, read them out in this order. Then rotate the grille and keep reading.
Making Your Own Key
To make your own grille, the holes must be cut in such a way that you never overlap letters when rotating it. The key section below lets you click on squares to mark them as cut out or not. You will not be able to cut out squares that overlap.
Here's a grille that you can edit. When you change the holes in the grille the key will update and the example plaintext will be encrypted for you. Can you see how it all works?