Introuction to Cryptography

The cores of cryptography are:

Beyond the basic:

History of Cryptography

Code Breakers by David Kahn.

Histroical ciphers:

Substitution Cipher

The key space in substitution cipher is 26!26!, roughly 2882^{88}.

We can use the frequency of English letters to map to the occurance of cipher texts:

Then we can use frequency of pair of letters, aka digrams, then trigram etc.

Vigener cipher

Repeat the key, c = (k + m) % 26.

Suppose we know the length of the key, l, we can break down the ciphertext to block with the lenght l, the most common letter MUST be the encrypted e! So we can recover the first letter of key, we can repeat this process to recover the key.

We can use error-n-trail to test different key lenght until the message makes sense.