The term 'cryptology' covers cryptography, the art of writing ciphers, and cryptanalysis, the science of solving them. A cipher is different from a code; but since the word 'code' is often used by laymen (including some of the anti-Shakespeareans) in contexts where they clearly mean 'cipher', it is worth drawing the technical distinction between the two, so as to avoid confusion. The difference is a simple one, and can be put quite briefly. In code systems, the units or symbols to be translated can be of different lengths: a letter, a syllable, a word, a sentence, or just a string of letters or numbers is agreed to stand for a particular word or a whole phrase in the message. In contrast, the units in cipher systems are of uniform length and bear a uniform relationship to the units of the plain text. Usually one letter in the cipher corresponds to one letter in the message, though in some systems groups of two or even three letters are used in a cipher to stand for one letter in the message. (Alexander D. Agapeyeff, 1939)
The principles of cryptology are based on common sense, but this is no guarantee that they will be observed; the most obvious things are often the easiest to overlook. Ciphers are basically of two types: transposition, in which the letters of the original or plain text message are rearranged; and substitution, in which they are replaced by other letters, by numbers, or symbols. In transposition the letters retain their identities but their relative positions are changed; in substitution the letters retain their relative positions but their identities are changed. In both types the operations are usually controlled by what is called the key, an element concerning which more must be said later.......