Skip to content
Cipherloom密码织机

CIPHER/TOOLS/CARDAN GRILLE

Cardan Grille — Bench tool

Published 11 Oct 2026 ·

Girolamo Cardano's grille is a sheet of stiff paper with holes cut in it. Lay it over a blank page, write the message through the holes, then fill the rest of the page with innocuous text. The receiver lays an identical grille on the same page and reads only what shows through. It is a transposition cipher with a physical key, and it is still one of the most intuitive demonstrations of what a key actually does.

Era
Renaissance
Type
Transposition
Key space
grille patterns
Level
Field

IWhat this tool does

The bench writes grilles as a 5 x 5 grid with six openings, using the same layout every time so the example is reproducible:

HoleRowColumn
112
215
323
431
544
653

Writing SECRET through the holes fills cells (1,2), (1,5), (2,3), (3,1), (4,4) and (5,3). Everything else is filler. An interceptor holding the page sees a 5 x 5 block of letters and no obvious order to them.

The grille's real subtlety is that a good mask is designed so that rotation covers the page. A 4 x 4 grid rotated in four orientations visits every cell exactly once, which means a well-made grille can fill an entire page with no filler at all. Cardano's own designs were simpler and did use filler; the rotational refinement came later.

Note what has not changed: the frequencies. The page contains exactly the letters of the plaintext plus filler, and the filler can be chosen to look like ordinary prose. Frequency analysis on the visible page tells the analyst almost nothing, because most of what they can see is a decoy.

IIThe key

The key is the hole pattern. For an n x n grid the number of distinct masks grows combinatorially, and for a 6 x 6 grid it is already in the millions — a genuinely large space by the standards of the period.

Two details make it workable in practice. First, a mask and its rotations are equivalent keys, which cuts the count by the symmetry factor. Second, a mask that does not cover the page evenly wastes capacity, so usable masks are a small fraction of all masks.

The Cardan grille's contribution to this collection is the idea of a key that is not a number, not an alphabet and not a book, but a shape.

The modern descendant is the permutation table: in a block cipher, the order in which bits are rearranged is exactly a grille, expressed as arithmetic instead of paper.

IIIWhat it will not protect

Historical ciphers are for study and recreation and are not suitable for protecting real information. The full analysis is in the cipher entry.

Read the full entry, with deciphering steps and weakness analysis →