Cryptography (Mini-Game)

:For the skill called "Cryptography", see Cryptography (Skill)
Cryptography is one of the four Mini-Games playable during a game of Covert Action. It is played whenever Max is attempting to Decode Messages sent between Participants during the course of the plot.
Cryptography may be performed at the Crypto Branch of any CIA Office. It requires Max to have intercepted at least one message, either automatically through CIA surveillance, or through Wiretaps and Bugs installed at a relevant Hideout.
The mini-game itself involves switching letters of the English Alphabet to decipher the contents of a scrambled message.
Successful Cryptography is very rewarding, as it reveals both the content of the message and practically all details about the sender and the recipient - including their location, affiliation, and even their Role. 
The downside is that Cryptography only reveals information after-the-fact; It requires Max to wait until after the message has been sent. Furthermore, while there is no time-limit to decipher a message, time passes rather quickly while playing this mini-game. Nevertheless, it is generally considered one of the easiest Mini-Games to play, and the reward is usually worth the effort and time spent.
==Detecting Messages==
:Main article: Message Traffic
To be able to decode a message, Max must first have become aware of its existence. Otherwise, there would be nothing to decode.
Interception of Message Traffic may occur in several ways:
#Automatically, by CIA surveillance.
#Through Wiretaps and Bugs installed at either the Sender or Recipient's Hideout.
#By collecting a specific piece of Evidence about either the Sender or Recipient.
Automatic detection has a chance to trigger each time Message Traffic occurs. The base chance is based on the current Difficulty setting, with a higher detection chance at lower Difficulty. Whenever the CIA detects Message Traffic, a Bulletin notifies the player that a message has been detected. The bulletin may occasionally also reveal the location of either the sender or recipient.
Wiretaps and Bugs installed at the Sender's or Recipient's Hideout increase the Surveillance Quality at that Hideout. This increases the chance of detecting Message Traffic to or from that Hideout. The Surveillance Quality at each Hideouts can be reviewed in the Active Wiretaps menu, which is available at any CIA Office's Intelligence Section. Increasing Surveillance Quality at a hideout also increases the chance of automatically decoding any message sent to or from that hideout.
Finally, it is possible to become aware of past Message Traffic that was not detected in real-time, by collecting Evidence about the Sender or Recipient. When Max becomes aware of Message Traffic this way, a note about the existence of the message is automatically added to the agent's Suspect File. It is then possible to collect four different pieces of information about the message: The recipient's Name, their Location, their Affiliation, and the date on which the message was sent. Each of these counts as a separate piece of Evidence. Occasionally, multiple pieces of Evidence about a message will be collected at the same time.
==The Decoding Mini-Game==
To play the Cryptography Mini-Game, visit any CIA Office and head for the Crypto Branch on the third floor. One of the two options available on this floor is "Coded Messages".
On selecting this option, you'll be shown a list of all coded messages currently known to Max. Select one of these to begin decoding it.
The Mini-Game screen is divided into two parts. In the main (larger) part, the coded message appears. It shows up as a senseless mess of English letters. Depending on the current Difficulty setting and Max's Skills, the letters may be interspersed with spaces and/or punctuation marks.
On the left side of the screen is a list of all 26 letters in the English language, shown in bright green. As Max works to decodes the message, cyan-colored letters will appear next to each of these, to denote that Max has chosen to replace the original letter with a new one. In addition, a number is shown next to each letter to indicate how many times it appears in the message - this can be very useful as will be explained below.
A clock is also visible at the top-right corner of the screen. This keeps track of the amount of time that has elapsed since Max began decoding the message. There is no hard time limit to complete the decoding process, but any time spent on decoding is added to the game clock once the mini-game is completed or prematurely abandoned.
===The Code Algorithm===
The enemy uses a very simple type of code in its transmissions - a Substitution Cipher. In this form of encryption, each letter of the alphabet has been substituted for another letter.
For example, let's take the word "NEEDED". We replace every "E" with a "D", every "D" with a "Y", and every "N" with an "X". The result is "XDDYDY".
The same cipher is used throughout the entire message. Therefore, the words "NED NEEDED ENDED" would read "XDY XDDYDY DXYDY".
===Playing the Mini-Game===
When the mini-game begins, the game displays the entire coded message on-screen.
The contents of the original message are in plain English, and make up intelligible sentences like "We of the Red Brotherhood salute you" and so forth. However, since the letters are scrambled, the message is not going to be readable until it's decoded.
The idea is to replace each letter of the coded alphabet with the correct letter, to make sense of the message. To replace a letter, simply press the key corresponding to the original letter in the coded message, then press the key for the letter you want to replace it with.
Once a replacement has been made, the game will place the "New" letter - in cyan - Below the original letter. It will automatically do so for the entire message.
Example:
1. We see the word "XDDYDY" in the code. We press "D" to select the letter D, and then press "E" to replace it with the letter E. The game will now place the letter "E" in cyan below each instance of the letter D in the code.	
2. Next we press "Y" and then "D". The game now shows the letter D in cyan below each instance of the letter "Y". 	
3. Finally, we press "X" and then "N". The game will place the cyan letter N below each instance of the letter "X" throughout the entire code. 	
4. We've solved a word! And hopefully, we've also made some other words more intelligible and easier to decode. 	
We repeat the process, switching each letter in the alphabet with the correct one in order to reconstruct the original message.
Once the majority of letters have been correctly solved, the game will fill in the rest of the letters itself, and the decoding process is completed.
You may pause the game clock at any time by pressing the F12 key; this is preferred over Alt+P as this doesn't remove the message from the screen. You may also press F10 to clean all your guesses.
===The Wrong Letter===
It is quite possible to put a replacement letter in the wrong place. Naturally, to avoid making the mini-game too easy, it will not tell you which (if any) letters have been placed wrongly.
If the decoded message isn't making any sense, you can redo any letter freely. Just replace the same coded letter with a new letter.
You can also undo a letter placement - select the original letter and press "SPACE". This will erase your guess for that letter, and thus avoid cluttering the message.
==The Result==
Once the Mini-Game has been successfully completed, you'll be treated to a screen showing the entire deciphered message, as well as very important details about both the Sender and the Recipient.
The personal details are, by far, the most valuable reward. They include each person's Name, Location, Affiliation and most importantly - their Role. The screen also shows the person's Rank, but only if you already know it (it's not revealed by the message).
This information is recorded directly into the Suspect Files for both these Participants! If either one of the two did not previously have a Suspect File, one is created for him and filled with the above data immediately.
This is very useful, as with one Mini-Game you've managed to discover the identity and location of two Participants in the plot, and have enough evidence to Arrest both of them (thanks to knowing their Roles).
This is why Cryptography is such a useful method of acquiring information. Of course, part of the reason you can't simply rely on decoding messages to complete your investigation is that you have to detect a message in order to decode it - and that is unlikely to happen until you perform a Wiretap or Break-In at the hideout of either the Sender or Recipient. Also, waiting for a message to be sent can cost you a great deal of time - assuming you're not waiting in vain!
==Difficulty==
As with all other Mini-Games, the actual difficulty of Decoding a message is based on the Difficulty setting of the game, as well as Max's Cryptography skill. One counteracts the other.
 	Local Disturbance	National Threat	Regional Conflict	Global Crisis
Average 	1 	3 	4 	4
Good 	1 	3 	3 	4
Excellent	1 	1 	3 	3
Awesome 	1 	1 	2 	3
Key:
#Spaces and punctuation marks appear. One or two of the most frequent letters appearing in the message (usually 'E' or 'T') are already solved for you.
#Spaces and punctuation marks appear. No letters are solved for you.
#Spaces appear, punctuation marks do not. No letters are solved for you.
#The message is devoid of spaces, but has punctuation marks. No letters are solved for you.
Level 4 is specifically designed to be virtually impossible. In other words, unless you invest enough skill levels to bring the difficulty down to level 3, you're likely to have to avoid Decoding entirely. This is especially true because at higher difficulty levels, you're bound to want at least a few levels in Combat skill, as that is practically required for the game to be playable.
==Letter Hint==
It is possible to have the game decode a letter for you by pressing the F1 key. However, 1 hour will be added to the clock every time you press F1. This can be done as many times as you like if you feel you can spare the time.
== Javascript cracking tool ==
This tool will make cracking easier: 
☀https://jsfiddle.net/xL32mkyc/
It will only work for fixed messages (messages that do not contain information which changes, such as organisation names). Enter the code without any spaces, and the tool will show potential matching messages until there is only one possibility.Category:Mini-Games