Tool to decrypt/encrypt using Gronsfeld. Gronsfeld Cipher is a variant of the Vigenère cipher, the difference being that the key is a number.
Gronsfeld Cipher - dCode
Tag(s) : Poly-Alphabetic 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!
Gronsfeld encryption uses the Vigenere method, the difference being that the key is directly numeric, no need to calculate the rank of the letters of the key in the alphabet. However, the corresponding shifts have to be applied, so the Gronsfeld method approaches a multi-shift encryption.
Example: The message to be encrypted GRONSFELD with the key 1234. Add 1 to G to get H (the letter 1 rank after G is H in the alphabet), then add 2 to C or E (the letter 2 ranks after C is E), and so on.
Plain letter | G | R | O | N | S | F | E | L | D |
Key (repeated) | 1 | 2 | 3 | 4 | 1 | 2 | 3 | 4 | 1 |
Cipher Letter | H | T | R | R | T | H | H | P | E |
Example: The encrypted message is HTRRTHHPE.
Decryption requires to know the decryption key (and the alphabet used if necessary). The decryption is identical to Vigenere, but with a numeric key.
Example: The encrypted message EEREG with the key 123
Ciphertext Letter | E | E | R | E | G |
Key (Repeated) | 1 | 2 | 3 | 1 | 2 |
Decrypted Letter | D | C | O | D | E |
The plain message is then DCODE.
The message has an index of coincidence of about 0.04 to 0.05 (similar to Vigenere).
Cryptanalysis techniques used for Vigenere are also applicable to Gronsfeld. These techniques also accelerated since the use of a numeric key limits the number of combinations (each character of the key has only 10 possibilities against 26 with Vigenere).
Gronsfeld variants are the same as Vigenere variants.
dCode retains ownership of the online 'Gronsfeld Cipher' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Gronsfeld Cipher' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Gronsfeld Cipher' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Gronsfeld Cipher' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.
Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!
Thanks to your feedback and relevant comments, dCode has developed the best 'Gronsfeld Cipher' tool, so feel free to write! Thank you!