Tool for encryption and decryption of messages using the rotating grid (Fleissner) technique. Find out how to secure your communications with this historic cryptographic method.
Turning Grille - dCode
Tag(s) : Transposition Cipher, GRID_CIPHER
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The turning grille cipher (also known as the Fleissner grille) is a transposition cipher technique which consists of hiding a message by arranging its letters in a grid on which arotating removable cover allows the selection of the letters to be read/written.
To encode a message with a rotating grid, the user places a perforated grid or sheet with holes on top of a blank grid.
Example: Encrypt the message FLEISSNERGRILLE with the grid
▮ | ▮ | ▮ | ▮ |
▮ | ▮ | ▯ | ▯ |
▮ | ▮ | ▮ | ▯ |
▯ | ▮ | ▮ | ▮ |
The locations visible through the holes are then filled with the letters of the plain message.
Example:
▮ | ▮ | ▮ | ▮ |
▮ | ▮ | F | L |
▮ | ▮ | ▮ | E |
I | ▮ | ▮ | ▮ |
Once filled, the perforated grid is then turned a quarter turn (clockwise or counterclockwise), revealing new free spaces, which are in turn filled with the letters of the plain message.
Example:
1⟳ |
| 2⟳ |
| 3⟳ |
|
After 4 rotations, the grid is supposed to be full.
Reading the letter grid online constitutes the encrypted message.
Example: The message is encrypted SLLRGEFLRISEINEG from the grid obtained:
S | L | L | R |
G | E | F | L |
R | I | S | E |
I | N | E | G |
If the message contains more letters, then repeat the steps with the following letters and a new blank grid (but keeping the same perforated grid).
If the grid is not completely filled, insert random/neutral letters to fill in the holes.
The grid must respect certain rules so that the holes do not end up on the same letters after rotation.
To decode a message encrypted with a spinning grid, the player places the perforated grid over the encoded text, aligning the holes with the characters.
The characters visible through the perforation holes reveal the letters of the original message.
After 4 clockwise rotations (or counterclockwise), the original message is completely reconstituted.
If the message contains more letters, then repeat the steps with the following letters.
The grid must have 1/4 holes for every 3/4 non-holes. Since the holes successively occupy 4 positions, only one of these positions can contain a hole.
An easy way to avoid having duplicate holes is to separate the grid into 4 quadrants, then number the boxes as follows:
Make holes for each value, but limiting yourself to 1 hole per value (at any random location among the 4).
For odd-sized grids, ignore the central box.
The rotating grid method was detailed by the Austrian Colonel Edouard Fleissner von Wostrowitz, who detailed it in his work entitled Handbuch der Kryptographie. Although it cannot be said with certainty that he was the inventor, because encryption techniques using grids had existed for a long time, Fleissner's name remained associated with this method.
Jules Verne, in 1885, incorporated this cryptographic technique into his novel Mathias Sandorf, crediting it to Fleissner.
This type of grilles was used during the First World War by the German army. Each grid size had a code name: Anna 5x5, Berta 6x6, Clara 7x7, Dora 8x8, Emil 9x9, Franz 10x10.
The encrypted message is a transposition of the letters, the coincidence index is similar to that of the plain text.
The presence of a punched card (or any other similar object) should bring to mind this method or the Cardan cipher.
Any reference to Mathias Sandorf or Jules Verne is a clue.
Deciphering a message without having the corresponding grid is difficult.
Potential attacks include searching for recurring patterns in the ciphertext, statistical analysis of letters, but especially brute force methods. The number of permutations of the grid is relatively limited if its size is small.
There are several variations of the rotating grille, including different sized racks or methods of rotating the grille clockwise or counterclockwise.
dCode retains ownership of the "Turning Grille" source code. Any algorithm for the "Turning Grille" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Turning Grille" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Turning Grille" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Turning Grille" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Turning Grille on dCode.fr [online website], retrieved on 2025-04-16,