Cryptology Home Page
Secret decoder rings, pig Latin, writing with lemon juice, messages in code to a buddy, WW2 espionage films -- ah the fun of being young and having time to play.
But concealing the existence or the meaning of a message from others can also be a very serious business. From medieval times when diplomats had to communicate with their rulers by courier, through wartime when orders from headquarters had to be broadcast to the line officers to the present where corporate deals must be kept secret until completed, confidentiality of messages remains a very high priority.
This site is an exploration into the fundamentals of cryptology - the science of secure communication. It covers some of the basic history, techniques and strategies of code making and code breaking for pencil and paper codes. It does not delve into mathematical proofs or recent mechanical or computer based encryption schemes. Comments are always welcome.
Steganography is the art of hiding the existence of a message rather than its meaning. It is currently a very HOT topic as one subdivision of steganography is digital watermarking, a technique used to copyright and to protect digital images, music and software. Although steganography is a very interesting topic in itself, the following short sections will be all that I say on it. Sorry!
Low Tech Steganography
A scytale (rhymes with Italy) was a cloth wound around a staff or baton with a message written vertically on the cloth. When unwound, the characters appeared as random decorations. A servant wearing the cloth as a sash or belt would then deliver the message as required. The receiver of the message would read it by wrapping the cloth around a staff of similar diameter.
Another ancient form of message hiding was to carve the message into the base of a wax slate, then prepare the slate as usual. An apparently blank slate had a message if you knew enough to remove the wax. A variation on this is writing on a canvas, then painting a scene or portrait over it. A more extreme example was shaving a slave's head and tattooing a message into his scalp. Once the hair grew back the slave was sent on his not so time dependent mission.
In medieval times simple embossing such as needle pricks under letters indicated characters to be used to recreate the plaintext message.
Another low tech solution involves writing an 'innocent' message with the 'real' message hidden at specific locations such as the first letter of each sentence or line. Grills are cutout templates that reveal the characters to be used in reconstructing a 'hidden' message from text.
High Tech Steganography
Invisible inks are examples of developing sciences. A simple example is lemon juice but there are others that react to a single reagent.
Microdot photographic techniques exist where a simple period at the end of the sentence often contained more meaning than the sentence itself.
Cryptography is the science of concealing a message's meaning rather than its existence. It can be subdivided into codes and ciphers. Codes are based on linguistic entities of variable character length such as syllables, words and phrases. Ciphers are based on fixed length elements (most often characters or letters) without regard to meaning. The original message is known as plaintext and can be either encoded to codetext or enciphered to ciphertext. To read the message afterwards it must be either decoded or deciphered.
Codes normally involve external resources such as one-time pads which are random lists of letters that are meshed with the plaintext or code books which are lists of words or phrases and their replacement codes. If the replacement codes are in the same alphabetic order so that the same list can be used for decoding, it is known as a one-part code. If a second list is needed to sort the codes alphabetically, then the encoding scheme is known as a two-part code. The difficulty of codes is that the code itself must be distributed to all authorized readers and if the code book gets into insecure hands, the code is compromised and a new code needs to be distributed.
Ciphers on the other hand rely on a systematic algorithm or procedure without the need of a 'code book'. Sometimes this system also uses a keyword. This allows the cipher to continue in use even when its system is known and even when a single keyword is known. Changing the keyword in current use once again conceals the meaning.
The most interesting aspects of cryptology for me are the methods of enciphering/deciphering and those of cryptanalysis or 'cracking' the ciphertext messages. This site will focus on ciphers rather than codes.
Ciphers are based on algorithms that transform the plaintext into ciphertext. These algorithms may also require the application of a keyword that introduces another level of security and flexibility to the overall system. All systems of ciphers can be classified as transposition, substitution or a combination of both.
Transposition methods involve moving the plaintext characters into new positions in the ciphertext based on an algorithm or procedure. For example, each pair of characters (known as digraphs) can be swapped so that 'AN' becomes 'NA'. Obviously, the algorithm can become much more involved if needed. One example of a transposition method is the Caesar square or rail-fence cipher. To encode for a four rail cipher, the first four letters are written on separate lines, the next four reuses the four lines (rails), and so on until the text is complete. This is the same as swapping rows and columns. Other examples of transposition methods are magic squares, knights tour and text inversion. Magic squares have each row or column summing to the same number. The numbers are the order in which the plaintext is repositioned in the ciphertext.
Substitution methods use mapping techniques that replace characters, symbols or digraphs (pairs of characters) with other characters, etc. The mapping technique can be very simple alphabet inversion or folding such as Atbash which replaces 'A' with 'Z', 'B' with 'Y', etc. or displacement or shift such as Caesar which replaces 'A' with 'D' and 'B' with 'E' etc. But it can also be much more complex such as keyword or Playfair. With the introduction of mechanical devices such as teletypes and electronic ones like computers, characters can now be encoded using binary techniques. These binary representations are then manipulated with boolean operations for encipherment.
Error Detecting/Correcting Codes
A different type of code that is extremely useful is one that can detect data entry or transmission errors and possibly correct them. A single mistyped character or a dyslexic swap can cause the failure of a financial transaction. This type of error spotting is a study in itself.
One method uses an algorithm to verify a valid transaction. All other transaction numbers are not issued and considered invalid. Examples of this are ISBN book numbers and VISA account numbers.
A second format adds a check digit to the number so that a simple algorithm can spot errors.
Error correction such as Hamming codes add redundancy to the message. This allows recovery of content without resending the message which is crucial in deep space communications. ACK/NAK schemes such as Internet packets use automate resending of lost info.
Large text documents that are archived or not frequently used can be compressed for storage. The same techniques can be used for transmission to save time. Huffman and pkzip are examples. However technology has made most compression utilities unnecessary.