Introduction     Sitemap

[Home][FAQ Details]

[Computer Stuff]

Encryption - Jumbling the Letters (Randomisation)

A simple way to randomise the letters is to use a password. Remember. the authorised reader of the message needs to jumble the letters in exactly the same way, so any old randomisation will not work.

Suppose we think of a password, say "messup" and use this to jumble up the text. What we do is to write the coded alphabet starting with the password, and omitting any repeated letters. So we get:

"mesupabcdfghijklnoqrtvwxyz"

If this isn't jumbled enough for you, you can write:

m e s u p
a b c d f
g h i j k
l n o q r
t v w x y
z        

And read the new alphabet down the columns (so instead of reading "mesup", you read "magltz") to get our new alphabet:

magltzebhnvsciowudjqxpfkry

Plain A B C D E F G H I J K L M
Cipher M A G L T Z E B H N V S C
Plain N O P Q R S T U V W X Y Z
Cipher I O W U D J Q X P F K R Y

So, we encode the letter e with the letter t, and because this is random, if someone finds our e, they won't automatically find our other letters.

The following JavaScript program uses this principle of randomising the letters, but it doesn't do exactly the same thing because it jumbles the 95 printable characters in Windows (including the space). The encryption won't be the same as the above, because many more characters are used.

 

Scramble Characters

Text to Encode (or Decoded Text)


Password Length

Password

Text to Encode (or Decoded Text)




We can check out this style of encryption, using the same text as before, and the password "messup". From the encoded text, I get the following frequencies:

Character 109 (m) occurs 184 times.

Character 90 (Z) occurs 79 times.

Character 46 (.) occurs 74 times.

Character 71 (G) occurs 70 times.

Character 70 (F) occurs 56 times.

Character 76 (L) occurs 47 times.

A guess makes character 109 in the cipher (letter m) a space (character 32). The letter e is probably character 90 (Z). If this is true, it does not help us with any other letters. Below is a list of all the 5 letter combinations that repeat in the cipher text:

Descrambling the Other Letters Using Repeating Word Patterns

Different languages have different patterns. In English, e is often the most frequent letter used. In other languages, including computer languages, such as Visual Basic, Delphi, Java, etc, similar patterns may be observed. The unauthorised decoder uses this, along with other information, to decode the cipher.

For example, "and" and "the" are common English words. We use trial and error and statistical information to gradually extract the plain text in the message.

We have guessed that "m" is the cipher for the plain text space " ", and cipher Z is the plain text "e". The letter t is frequent in English so we find a common three letter word in the text.

Cipher mGjZm occurs quite frequently. G is a frequent character, so we can guess that this is t. And j will be h. (The short word mGjZm is a three letter word in between two spaces, which we guess as the). So we guess:

  • Cipher G is plain t
  • Cipher j is plain h

We also note a common combination, LmG.m, This is a two letter word beginning with "t". We guess that "." is an "o", to make the word "to".

The cipher F occurs quite frequently, and in the pattern mFmP., it stands alone. At first, I thought of the letter, I, but as it occurs in FmGFK, it would not be a capital in the middle of a word. Perhaps it is the letter, a.

  • Cipher F is plain "a"

The last of the frequent letters to find, is the letter L. The frequent letters are often vowels in English. L occurs in mu.Lm, where m is a space, "." is the letter o, and cipher "u" is unknown. Perhaps this word is "You", and the cipher L is the plain letter "u". In which case, cipher u is the letter y or Y.

The three letter word, mF)Um, begins with a, and we can guess "and". In this case, "U" is plain letter d, and ")" is plain letter n.

Some people are extremely good at this guessing and checking, and we can all become better at it with experience.

Summary

Even when the words are jumbled, we can find words through word frequencies and discover others through a knowledge of word patterns in the language. Jumbling does make it harder to decode, but the letter frequencies give too much away.

If we could get rid of the patterns in language, then we would make the code harder to unravel. One way to do this is to use more than one alphabet to cipher and decipher the message.