Atbash Cipher - Ancient Encryption Tool
Free Online Tool

Gronsfeld Cipher Tool

Encrypt and decrypt classical Gronsfeld messages with a repeating numeric key.

TL;DR

  • A Gronsfeld cipher is a polyalphabetic substitution cipher.
  • Its key is a sequence of digits, usually repeated across the message.
  • Each digit shifts the next alphabetic character by 0-9 positions.
  • This browser tool preserves formatting by default and stores no text.

How to Use the Gronsfeld Cipher Tool

  1. Choose encrypt or decrypt.
  2. Enter a numeric key such as 31415 or 271828.
  3. Paste plaintext or ciphertext into the text box.
  4. Copy the result, download it, or swap it back for a round trip.

How Gronsfeld Ciphers Work

A Gronsfeld cipher is a polyalphabetic substitution cipher that works like a numeric-key version of the Vigenere cipher. Instead of converting keyword letters to shifts from 0 through 25, it uses key digits from 0 through 9.

A numeric key is the digit stream that controls the shift pattern. With key 31415, the first alphabetic character shifts by 3, the second by 1, the third by 4, and so on. When the key runs out, it repeats from the beginning.

A classical cipher is a hand-solvable encryption method from the pre-computer era. Gronsfeld belongs to that family: it is useful for teaching, puzzles, and historical comparison, but it is not a substitute for modern cryptography.

History and Use Cases

The Gronsfeld cipher is commonly described as a simplified Vigenere variant associated with Count Gronsfeld. The smaller digit alphabet made the key easy to write as a number, which also made the cipher easier to teach and operate by hand. Helen Fouche Gaines' public-domain cryptanalysis manual on Project Gutenberg includes a dedicated section on Gronsfeld encipherment and decryption.

Its weakness is the same pattern that makes it convenient: repeated shifts leak structure. Frequency analysis is a cryptanalysis method that studies letter counts and patterns, and it can help break many repeated-key classical systems; see this frequency analysis reference.

Today, use a Gronsfeld cipher for classroom demonstrations, escape-room clues, puzzle hunts, and comparisons with Caesar, Vigenere, Beaufort, and autokey ciphers. Do not use it to protect passwords, private messages, API keys, or sensitive files.

Worked Example

Plaintext: ATTACK AT DAWN
Key: 31415
Repeated key: 314153 14 1531
Ciphertext: DUXBHN BX EFZO

The first letter encrypts as A + 3 = D. The second encrypts as T + 1 = U. The same digits must be applied in the same order to decrypt.