The Gronsfeld cipher is a classical polyalphabetic cipher that works like a sequence of Caesar shifts. Instead of using one fixed shift for the whole message, it uses a numeric key where each digit defines a different shift.
For example, with the key 314159, the first letter is shifted by 3 positions, the second by 1, the third by 4, and so on. When the end of the key is reached, the digits repeat from the beginning until the full message is processed.
During decryption, the same numeric key is used in reverse: each encrypted letter is shifted back by the corresponding digit. Spaces, punctuation, digits, and symbols that are not part of the selected alphabet are usually preserved unchanged.