How the Gronsfeld cipher works
Each digit of the key says how far to shift one letter of the message forward along the alphabet. When the digits run out, the key starts again.
- Write the digits of the key under the message's letters, repeating them as needed. Spaces and punctuation are kept and don't use up digits.
- Shift each letter forward by its digit: with a 3, A becomes D and Y becomes B (the alphabet wraps round).
- To decrypt, shift each letter back by the same digit.
A Gronsfeld key is the same as a Vigenère key that only uses the letters A to J (A = 0 … J = 9). The key 31415 is the Vigenère key DBEBF.
Example
With the key 31415, the digits of π, HELLO WORLD becomes KFPMT ZPVMI: H + 3 = K, E + 1 = F, L + 4 = P, and so on.
How to break it
- Find the key length with Kasiski examination or the index of coincidence.
- Try 10 shifts per column. For each position in the key, try shifts 0 to 9 and keep the one whose letter counts look most like English.
- Try known numbers. Dates, years, π and phone-style numbers are worth a guess first.
History
The cipher is named after a 17th-century Count of Gronsfeld. It stayed popular for a long time because a number is easy to carry in your head, even though cutting the alphabets from 26 to 10 makes it weaker than Vigenère.
Related tools
- Vigenère cipher: the 26-letter version
- Caesar cipher: a single shift for every letter
- Porta cipher: 13 alphabets, encrypt = decrypt