|
|
The Autokey Cipher or Self-synchronizing Stream Cipher, is a paper and
pencil system that appends plaintext to a key to generate an extended
key whose length increases with each new decrypted character. Two
variations of the Autokey Cipher have been used. The first
is a key-autokey cipher that incorporates previous members of the key
to determine the appended key sequence. The second method,
a text-autokey cipher, uses characters of the plaintext to determine the
appended key sequence. Blaise de Vigenère, primarily
known for his Vigenère Cipher in cryptography, reworked Girolamo
Cardano's Autokey Cipher by designing the text-autokey system, an improvement
on the weaker key-autokey cipher.
Vigenère starts with a tabula recta, a square with 26 sets of the
alphabet each shifted forward by one character with each successive line:
|
A
B C D E F G H I J K L M N O P Q R S T U V W X Y Z |
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z |
A
B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E F G H I J K L M N O P Q R S T U V W X Y Z A B C
D
F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z A B C D E F G H I J K L M N O P Q R S T U V W X Y |
|
To encrypt plaintext, find the first character in the left row-header and
the intersecting character of the key from the top column-header, continuing
this method for each correlating plaintext/key character.
For example, if the plaintext is MEET ME FOR LUNCH and the key is RESTAURANT,
the first letter of the ciphertext is D, because the M and R intersect at
D. The second ciphertext character is I, where the E from MEET
and the E from RESTAURANT intersect in the table.
| Plaintext: |
MEETMEFORLUNCH |
| Key: |
RESTAURANT |
| Ciphertext: |
DIWMMYWOEE |
We've run out of characters in the key. The weaker encryption
method is to repeat the key until the character count satisfies the plaintext
length:
| Plaintext: |
MEETMEFORLUNCH |
| Key: |
RESTAURANTREST |
| Ciphertext: |
DIWMMYWOEELRUA |
A more secure way to generate the key is to append the plaintext to it. This
method makes frequency counting more difficult, as the key does not follow
a simple repeating pattern:
| Plaintext: |
MEETMEFORLUNCH |
| Key: |
RESTAURANTMEET |
| Ciphertext: |
DIWMMYWOEEGRGA |
Decryption of the Autokey Cipher follows the reverse process. With
a key of RESTAURANT and ciphertext DIWMMYWOEEGRGA, find the key characters
in the top-column header and the ciphertext characters in the table. The
plaintext character is found in the left row-header.
| Key: |
RESTAURANT |
| Ciphertext: |
DIWMMYWOEEGRGA |
| Plaintext: |
MEETMEFORL |
Continue by appending the plaintext to the key:
| Key: |
RESTAURANTMEET |
| Ciphertext: |
DIWMMYWOEEGRGA |
| Plaintext: |
MEETMEFORLUNCH |
That's all there is to the Autokey Cipher. I wrote a VB.NET application
that demonstrates this cipher by resolving the plaintext when a key and
ciphertext are known. If you are uncomfortable downloading executables,
don't hesitate to contact me for the
source code. NOTE: THE SOURCE CODE IS NO LONGER AVAILABLE. (AUG. 2007)
Download 44KB: Autokey_Cipher.exe
E-Paranoids:
Autokey cipher Details, Meaning Autokey cipher Article and Explanation Guide
http://www.e-paranoids.com/a/au/autokey_cipher.html
|