Treasure Trails/Guide/Ciphers

Ciphers
Ciphers in Old School RuneScape use a Caesar Shift in order to cipher the NPC's name. A caesar shift is a simple cipher that, with the know how, can be easily decrypted.

In order to decrypt a caesar shifted message we must first count the number of times a letter appears within the cipher. For this example, the clue "BMJ UIF LFCBC TFMMFS" will be used. Make a list of the letters and how many times they appear:


 * B = 2
 * M = 3
 * J = 1
 * U = 1
 * I = 1
 * F = 4
 * L = 1
 * C = 2
 * T = 1
 * S = 1

As we can see, "F" is the most common letter within the cipher. Now, the letter "e" is the most common letter in the English language - so we always presume the most common letter in the cipher is "e" as our starting letter. It may turn out to not be the case, but it's a good place to start. So, because "F" is our most common letter in the cipher - we can presume "F" = "E". Once this presumption is made, we write out the entire alphabet in the correct order.

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

Next, under the letter "E" we write "F" because we think that letter "F" in the cipher is equal to "E" in the alphabet, and then fill out the rest of the alphabet starting from "F" and then looping back to the start once we reach "Z" to give us all letters like such:

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

So we now have a table of sorts where the ciphered letters are on the bottom row and the corresponding alphabet letter is on the top. So if our cipher had the letter "Z" in it, for example, we could look for "Z" on the bottom row - look up and see that Z = Y. Now we have this table, we can see if we are correct in our presumption that "e" was indeed "f" in the cipher. Remember - to decipher you look at the ciphered message letter on the bottom and then read whatever the top letter is to read what it actually means. If you are enciphering a message, it would be the opposite way round. In our example and using the above table, our "BMJ UIF LFCBC TFMMFS" clue becomes "ALI THE KEBAB SELLER".

Now, in this example - our presumption that "e" is equal to "f" on the grounds the "f" is the most common letter in the cipher and that "e" is the most common letter in English was true - and "e" became our key to the cipher. However, in others it may not be so easy. For example - in the clue "ZCZL", "e" is not the key as that returns the answer "EHEQ". While it is possible it is doubly encrypted, we should explore other alternate keys instead. The next port of call if "e" is not the key is to use vowels, namely "A, E, I, O, U and Y" - as every word in English contains at least one of those letters. If we try using "A" as they key to the cipher, we get "Adam" - which is correct. However, if this was not the case - you should work your way through all vowels. If one of these is not the key, then go through the rest of the letters periodically until you find your solution.