Cryptography from the Greek hidden writing, is the art of converting information into a cypher or a quantity of no apparent value called a cryptogram.
Cryptoanalysis is the technique for recovering the original information by penetrating the cryptogram using other than legitimate means (breaking the code).
The art of coding began with simple techniques.
In ancient Greece a Spartan soldier would wind his belt in a spiral around a stick.
A message written across the turns of the belt appeared meaningless when the belt was removed from the stick, however once the message arrived at its destination, the belt could be rewound on a similar stick and eaisly read.
Julius Caesar also used a simple ciper to protect messages from falling into enemy hands.
For instance, each letter of the message was replaced with the letter three positions to the right in the alphabet.
These examples of early ciphering represent the basic techniques of modern code or cipher systems.
The belt on a stick rearranges the sequence of characters in the message.
Such reordering usually geometrically, is known as a transposition ciper.
Caesar's system, however, left the character sequence of the ciper unchanged but represented each by a substitute character.
This is known as a substitution ciper.
A ciper system using combinations of both is known as a product ciper.
To be useful, a modern encryption process must be uniquely and unambiguously defined in a cryptographic alogorithm which contains an element - called a key - that can be varied.
With different keys, the same basic algorithm may be used without producing identical results.
Key variables in the historical examples consist of the stick diameter in the spartan ciper and the size of the alphabetic shift in the Roman.
Each encryption process defines how sequences of the original message, called Plaintext Pt are changed into sequences of ciper, called cipertext Ct.

Therefore Ct is a function f of Pt and the key variable K: i.e. Ct = f (Pt, K).

For the system to be practical there must be a companion algorithm which is the inverse, or decryption, such that
Pt = f -1 (Ct, K) so that the authorised receiver of the cipertext message may deciper the apparently meaningless message and restore cipertext back into plaintext.
A modern version of the Spartan belt transposition ciper uses a matrix of columns into which the plaintext is written row by row.
The cipertext is derived column by column.

For example.

A key word may be included in the algorithm for reordering the columns, changing the number of columns or order of rows in a column.
For example, the alphabetical order of characters in the key could indicate column order, as in the word faster applied to the above 6 column matrix
(F=2, A=1, S=5, T=6, E=3, R=4).
The second column would be placed first , the first column would be second, the fifth would be third etc.
Thousands of different code variations may result by varying the key to change the number or order of columns, to interleave columns, to indicate multiple transpositions, etc.
All of these variations complicate the decipering of the message without access to the algorithm and key.
Substitution a cipers offer an even larger variety.
A simple example places the numerals 1 through 26 in one circle, adjacent to a concentric circle containing the letters of the alphabet.
An alphanumeric key defines the number-letter alignment. Such as "6-M"
The cipertext is the series of numbers aligned with the letters of the plaintext.
A french version from the 1500's contains the alphabet in each of two rows.
A key letter defines a simple alignment or a key word may be used in which each letter of the key defines a different alignment of plaintext alphabet to cipertext alphabet for consecutive characters of the message.
The cycle of alignments repeats based on the length of the keyword.
Other versions of substitution cipers use a matrix of letters.
The cipertext is composed of the row-column coordinates for the characters of the plaintext matrix, where the keywords those headings.

For example.

Cryptanalysis of this type of ciper may fairly eaisly relate the frequency distribution characteristics of cipertext letter pairs to the plaintext letters by employing commonly available letter frequency information.
If a matrix of more than 36 positions is used to provide multiple codes of common letters and combinations the cipertext frequency distribution is distorted and complicates the task of the cryptoanalyst.

From Fairchild 9414 encryption chip design brief c1978