The Gronsfeld Cipher is a variation of the Vigenère Cipher but is simpler because it uses only digits (0-9) as the key. Each digit in the key indicates a shift for the corresponding letter in the plaintext.
Step 1: Understand the Key
The key for the Gronsfeld Cipher is a sequence of digits. Each digit represents a shift in the alphabet.
Example Key: 314
Step 2: Prepare the Plaintext
Write down the message you want to encrypt.
Example Plaintext: HELLO
Step 3: Repeat the Key
If the key is shorter than the plaintext, repeat the key to match the length of the plaintext.
Extended Key for "HELLO":
Key: 31431
Step 4: Encrypt the Message
Shift each letter in the plaintext by the number of positions specified by the corresponding digit in the key.
Encryption Table:
A=0, B=1, C=2, ..., Z=25
If a digit is 3, you shift the letter three places forward in the alphabet.
Example Calculation:
H with a shift of 3: H → I → J → K
E with a shift of 1: E → F
L with a shift of 4: L → M → N → O → P
L with a shift of 3: L → M → N → O
O with a shift of 1: O → P
Encrypted Message: KFPOP
Step 5: Decrypt the Message
To decrypt, reverse the shift using the same key.
Decryption Calculation:
K with a shift of 3: K → J → I → H
F with a shift of 1: F → E
P with a shift of 4: P → O → N → M → L
O with a shift of 3: O → N → M → L
P with a shift of 1: P → O
Decrypted Message: HELLO
Summary of Example:
Plaintext: HELLO
Key: 314
Extended Key: 31431
Encrypted Text: KFPOP
Decrypted Text: HELLO
This step-by-step guide provides a basic overview of the Gronsfeld Cipher, allowing you to encrypt and decrypt messages using this technique.