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 the 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.
Python Cipher Solver[edit | edit source]
Another way to solve Ceaser ciphers is by brute-forcing them, i.e. to try every possible decryption. This is hard to do by hand, but easy with programming. The following program will print all 26 possibilites, of which only one of them will decrypt to a meaningful phrase.
def caesar(text, shift): alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" shifted_alphabet = alphabet[shift:] + alphabet[:shift] translation_map = str.maketrans(alphabet, shifted_alphabet) return text.translate(translation_map) encrypted_phrase = "BMJ UIF LFCBC TFMMFS" for shift in range(26): print(shift, caesar(encrypted_phrase, shift))
This prints the following table:
0 BMJ UIF LFCBC TFMMFS 1 CNK VJG MGDCD UGNNGT 2 DOL WKH NHEDE VHOOHU 3 EPM XLI OIFEF WIPPIV 4 FQN YMJ PJGFG XJQQJW 5 GRO ZNK QKHGH YKRRKX 6 HSP AOL RLIHI ZLSSLY 7 ITQ BPM SMJIJ AMTTMZ 8 JUR CQN TNKJK BNUUNA 9 KVS DRO UOLKL COVVOB 10 LWT ESP VPMLM DPWWPC 11 MXU FTQ WQNMN EQXXQD 12 NYV GUR XRONO FRYYRE 13 OZW HVS YSPOP GSZZSF 14 PAX IWT ZTQPQ HTAATG 15 QBY JXU AURQR IUBBUH 16 RCZ KYV BVSRS JVCCVI 17 SDA LZW CWTST KWDDWJ 18 TEB MAX DXUTU LXEEXK 19 UFC NBY EYVUV MYFFYL 20 VGD OCZ FZWVW NZGGZM 21 WHE PDA GAXWX OAHHAN 22 XIF QEB HBYXY PBIIBO 23 YJG RFC ICZYZ QCJJCP 24 ZKH SGD JDAZA RDKKDQ 25 ALI THE KEBAB SELLER
where the last decrypted text is the one we want.
Medium Ciphers[edit | edit source]
|HQNM LZM STSNQ||Iron Man tutor||Lumbridge||666|
|BMJ UIF LFCBC TFMMFS||Ali the Kebab seller||Pollnivneach||399|
|ECRVCKP MJCNGF||Captain Khaled||Large eastern building in Port Piscarilius||5|
|GUHCHO||Drezel||Paterdomus temple; Drezel can be found in the cave north of the Paterdomus temple, which lies next to Canifis. Drezel is also an NPC for several quests (fairy code CKS and then go north-west to the end of the bridge, where you can climb down the trapdoor to find Drezel)||7|
|QSPGFTTPS HSBDLMFCPOF||Professor Gracklebone||Arceuus Library, ground floor (fairy ring code CIS, if 80,000 coins paid)||9|
|USBJCPSO||Traiborn||Wizards' Tower, 1st floor[UK]2nd floor[US] (fairy ring code DIS)||3150|
Hard Ciphers[edit | edit source]
|GBJSZ RVFFO||Fairy Queen||Fairy Resistance Hideout (requires Fairytale II - Cure a Queen quest to be finished, use a fairy ring with the codes AIR, DLR, DJQ and AJS in that order)||Puzzle box|
|HCKTA IQFHCVJGT||Fairy Godfather||Zanaris throne room (requires you to have started Fairytale I - Growing Pains)||64|
|OVEXON||Eluned||Outside Lletya or north-east of the Tyras Camp; requires you to have started Regicide quest (after talking to the Elf Tracker). After completion of Song of the Elves, she can be found in the city of Prifddinas north of the dye trader.||53,000|
|UZZU MUJHRKYYKJ||Otto Godblessed||Otto's Grotto||3|
|VTYR APCNTGLW||King Percival||Fisher Realm - requires Holy Grail quest (fairy ring code BJR, then run south)||5|
|ZHLUG ROG PDQ||Weird Old Man||150|
|ZSBKDO ZODO||Pirate Pete||On the dock north-east of the Ectofunctus||Puzzle box|
|IWPPLQTP||Gunnjorn||Barbarian Outpost Agility course||Puzzle box|
|BSOPME MZETQPS||Arnold Lydspor||Piscatoris Fishing Colony general store/bank (requires completion of Swan Song)(North of fairy ring AKQ)||Puzzle box|