by Ron Miller, April 2001
E-cipher is an Efficient,
Easy to use, cipher algorithm for Everyone and Everywhere.
The
idea is to be able to encrypt/decrypt a message easily and conveniently while
still achieving a high level of security.
The
goal which this E-cipher aims at, and I believe comes closest to thus far, is to
have the highest efficiency value as defined by the ease of implementation times
the security level achieved, with as little as just pencil and paper at one’s
disposal. As described here, done with poly-alphabets and spaces removed,
encrypted messages will have greater security than those encrypted with the
Enigma code machine.
The Key:
The key is any word, phrase or group of alphabetic characters.
From
the key an encryption substitution alphabet (the ‘cipher-alphabet’) is
formed.
This is done by using the letters in the key
to produce a rearranged alphabet, by referring to the letters of the alphabets
arranged as in figure 1 and following simple rules. Note that in figure 1 we
have an alphabet shifted 12 places so as to start with ‘M’ over our A to Z
alphabet.
This is done as follows:
1.
Write
down the key (without spaces)
2.
Select
associated letters from fig. 1 by:
for a each letter, from left to right, find the letter in the lower row of
figure 1 which is below where that letter exists in the upper row.
For the ‘b’ in bluesause we get a ‘P’.
If this letter has already been selected then take the next letter to its right,
continuing right as needed until a remaining previously unselected letter is
found. Note that the second ‘u’ in bluesauce results in a ‘J’.
If you go all the way to the right without finding an available letter then you
continue the search with the first letter in the lower row at the far left.
3.
Write the
selected letter below the original one. Strike out the selected letter from your
working copy of figure 1, indicating it has already been selected. See fig. 2
4.
Once you
have written down a set of letters, selected as just described, below the key,
do like wise for those letters as you did for the letters of the key; and so on
until all of the letters in the alphabet have all been selected for use.
See fig. 3
5.
Form the
whole ‘Cipher Alphabet’ by writing down the selected rows of letters next to
each other, one row after the other, starting with the last row first. See
figure 4.
+-----------------------------------+
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
|
| Figure
1.
|
|-----------------------------------|
|
|
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| ABCDEF/H//KLMN///R//UVWXY/
|
|
|
| key:
bluesauce
|
|
---------
|
|
PZISGOJQT
|
|
|
| Figure
2.
|
|-----------------------------------|
|
|
| key:
bluesauce
|
|
---------
|
|
PZISGOJQT
|
|
DNWHUCXEK
|
|
RBLVMYAF
|
|
|
| Figure
3.
|
|-----------------------------------|
|
|
| Cipher-Alphabet:
|
|
RBLVMYAFDNWHUCXEKPZISGOJQT |
|
|
| Figure
4.
|
+-----------------------------------+
Encrypting
a message (with
an overly simplified method):
First write down the alphabet a-z then below it write
down the cipher-alphabet. See figure 5.
Then write the message down.
For each character in the message write below it the associated cipher-alphabet character, that is, find the letter in figure 5, which is below the same letter that you are encrypting from the source message. See figure 6.
For
Decryption:
First you take the key and produce the
cipher-alphabet as was done above prior to encryption.
Then you do the reverse of the Encryption character substitution. You
find a letter, which is in the encrypted message in the bottom row of your
version of figure 5, and take the letter above it as that of the original
message.
+-----------------------------------+
|
|
| abcdefghijklmnopqrstuvwxyz
|
| RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
|
| Figure
5.
|
|-----------------------------------|
|
|
| remove
the hat
|
| PMUXGM
IFM FRI
|
|
|
| hello
|
| FMHHX
|
|
|
| Figure
6. |
|
|
+-----------------------------------+
The algorithm as described so far is that of a
mono-alphabetic substitution, which is not terribly difficult for a cryptanalyst
to decipher, given sufficient encrypted text, due to the fact that each letter
of the message is encrypted using the same cipher-alphabet for substitution.
Note how ‘e’ is always encrypted as ‘M’
So we then vary the cipher-alphabet as we encrypt.
Performing
Poly-Alphabetic Encryption:
Now all we need to do is shift the relationship of
the a-z alphabet and the cipher-alphabet we have in fig. 5 after each time
encrypting a message character, and perform the identical shifting operation
while decrypting. (A very simple
consistent shift of one character position would be yet too weak.)
As part of the E-Cipher algorithm these shifts are
performed by sequentially aligning the beginning of the cipher-alphabet under
letters in the a-z alphabet in the order they appear in the cipher-alphabet.
To start you would note the first letter of our
cipher-alphabet and align the beginning of your cipher-alphabet underneath that
letter in the a-z alphabet. To do subsequent alignments you note the letter
above the start of the cipher-alphabet and then find the letter to the right of
it in the cipher-alphabet; this then becomes the new letter under which you then
place the beginning of your cipher-alphabet, readying you for the next character
encryption. This process is repeated after each single character encryption. See
figure 7 for an example of sequential alignments of an a-z and cipher-alphabet.
Note how the first ‘l’ is encrypted as an ‘R’ and the second as a
‘K’.
This alphabet shifting process can be easily
performed by one of three aids.
-
By
writing down the alphabet a-z twice, end to end. Write the cipher-alphabet on
another piece of paper (with the same spacing; if needed use a spacing guide of
26 ‘X’s written along the edge of a piece of paper). Then slide the
cipher-alphabet along underneath the a-z alphabet according to the process
described in the previous paragraph.
-
Doing the
same but with aid of a text editor, like notepad. This makes it easier to
duplicate a-z (via cut and paste) and much better for shifting the
cipher-alphabet to and fro.
-
Using a
code wheel. Have a fixed code wheel, with a-z on it. Then pin it to a piece of
paper or card board and write the cipher-alphabet around the outside. Place a
mark between the first and last letters for reference while shifting. The
mechanics of shifting amounts to turning your a-z wheel, which is pinned at its
center.
+---------------------------------------------------------+
|
|
|
Figure 7. encrypting
"hello":
|
|
|
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
|
RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
h->K
|
|
|
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
|
RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
|
|
e->V
|
|
|
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
| RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
l->R
|
|
|
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
|
RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
l->K
|
|
|
|
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
|
|
RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
o->L
|
|
|
|
hello
|
|
KVRKL
|
|
|
+---------------------------------------------------------+
Now the algorithm would use a different alphabetic
substitution for each character position, for messages up to 26 characters long.
If we were to repeat cycling through the 26 different alphabetic substitution
arrangements, then every 26th character would be encrypted using the same
alphabetic substitution. So with a message length of 260, we could have 26
groups of characters each having 10 other characters encrypted using the same
alphabetic substitution. This is not so bad. It would be very hard to break
(with frequency analysis) such a complex encryption with such small sets of
similarly encoded characters widely spread through the message, even with the
added help of a couple of letter patterns repeating 26 characters apart due to an
associated repeat within the original text (e.g. two ‘the’s 26 letters
apart). I venture to say, given the use of a strong key in the first place (8 or
more characters, preferably not simply a dictionary word or two), that here,
with pencil and paper, we have already obtained a security level on par with the
Enigma cryptograph machines of the past. But with today’s super computers our
security would still be less than safe from professionals.
So we then ‘rekey’ the cipher-alphabet after each
block of 25 characters that we encrypt (or after each line from the source
message).
Rekeying
the Cipher Alphabet :
To rekey a cipher-alphabet we do something similar to
what we did when we created the first cipher-alphabet, only this time we put the
current cipher-alphabet in place of the A-Z alphabet on the bottom (see figure
8). We then use the key as before (refer to the steps 1-5 above used to produce
the first cipher-alphabet with the key). If we rekey the cipher-alphabet we have
been using again with the key ‘bluesauce’ we get the cipher-alphabet in
figure 10, and this is the cipher-alphabet we would use for the second block of
25 characters. We then repeat this process after each subsequent block of 25
characters.
+-----------------------------------+
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| RBLVMYAFDNWHUCXEKPZISGOJQT
|
|
|
| Figure
8.
|
|-----------------------------------|
|
|
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| RBLVMYAFDNWHUCXEKPZISGOJQT
|
| RBLVMY/F//WHUC///P//SGOJQ/
|
| R/LVMY////W/U//////////J//
|
|
|
| key:
bluesauce
|
|
---------
|
|
ETDZAXNKI
|
|
SFPCGHBQO
|
|
WJVRLMYU
|
|
|
| Figure
9.
|
|-----------------------------------|
|
|
| Cipher-Alphabet:
|
|
WJVRLMYUSFPCGHBQOETDZAXNKI |
|
|
| Figure
10.
|
+-----------------------------------+
Pre-Keying
is a must for Truly Strong security:
As strong as this algorithm is so far, the key now is
considered the weakest link. The effective amount of uniqueness and randomness
in the key (and the first cipher alphabet to be used) is crucial. To achieve
better results than simply using a longer key could achieve, a second ‘pre’
key is used. Hence for application of the full E-Cipher, first you use the
pre-key to produce a cipher alphabet from the A-Z alphabet and then you use the
regular key on it to produce the first cipher alphabet to be used to encrypt.
Subsequent rekey operations are done using the regular key. See figure 11 for an
example of using the two keys to produce the initial cipher alphabet to be used
for doing encryption. Note that if you have the keys, you can generate the
cipher alphabet(s) to be used ahead of time, provided you can safeguard them
from discovery.
+-----------------------------------+
|
|
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| ABC/E//HIJKLMN/PQR/TUVWX//
|
| ...
|
|
|
| Pre-Key: sparkle
|
|
-------
|
|
GDOFYZS
|
|
...
|
| WXELPIJQKABVURCTMNHGDOFYZS
|
|
|
|
|
| MNOPQRSTUVWXYZABCDEFGHIJKL
|
| WXELPI/Q//BVUR///N//DOFYZ/
|
|
|
| Key:
bluesauce
|
|
---------
|
|
TSKHJCAMG
|
|
...
|
| PXREULIVQBZOYNDWFTSKHJCAMG
|
|
|
| Figure
11.
|
+-----------------------------------+
That
completes the description of the E-Cipher. Anything
less than implementing everything described herein would be an ‘Abridged
E-Cipher’.
A sample encrypted message, and the keys used to do
the encryption, for you to practice on by decrypting the original message, are
in figure 12 below.
+-----------------------------------+
|
|
| Pre-Key: rondesc
|
|
|
|
Key: groklings
|
|
|
|
Encrypted message:
|
|
|
| HDMUM
STDSR PDAXA LHSQV UQCQY |
| UYWUZ
TAQBZ PQLWD TIVUH GJRAI |
| OYGDX
NUSAI SFMUE QOW
|
|
|
| Figure
12.
|
+-----------------------------------+
Download
E-Cipher Test VB program to verify results and general
testing.
| E-Cipher Overview | The E-Cipher | Beyond E-Cipher |
| Site Home | email: Site Administrator | RonMiller ©1999-2013