# Introduction
History developed along with the evolution of secret codes.
Evolution is an apt metaphor for the race between new codes and codebreakers.
Today's dilemma between privacy and effective police-force.
`Code` is a misused word. Original meaning is replacing words and phrases with code words. Cipher is a more precise term for symbol substitutions.
Our current knowledge of ciphers might very well be behind GCHQ and NSA.
# Mary Queen of Scotts
## The evolution of secret writing
steganography - simply hiding the messge
transposition - symbols keep identity, but change position
"rail fence" transposition - separating letters by their positions into different lines
scytale (rod and a wrapped stripe of parchment)
substitution - symbols keep positions but not identity
first mentioned in Kama-Sutra - but named after Caesar
Kerckhoffs' principle: the strength of the cipher should only depend on the secret key, the encryption algorithm should assumed to be known
the number of keys: shift-cipher low, arbitrary substitution high
keyphrase can be a good compromise
for a millenium substitution ciphers were considered to be unbreakable, completely stopping innovation
## The Arab Cryptanalysts
rich Islamic culture after 750
studying Koran - trying to establish chronology of chapters - the use of statistics
word frequency calculations led to cryptanalysis breakthrough
## Cryptanalyzing a Ciphertext
start with the frequencies, make some guesses for the most frequent words, then use the language to figure out the rest
Appnedix B has tips
## Renaissance in the West
nulls
nomenclator - code words + monoalphabetic substitutions
Fig.7. nice classification
## The Babington Plot
Detailed story of Mary queen of Scots.
# Le Chiffre IndÃ©chiffrable
monoalphabetic vs polyalphabetic ciphers
first idea around 1460, Vigenere published his treatise in 1586, but remained neglected for two centuries
why? it is more difficult to use, the monoalphabetic was tweaked instead
## From shunning Vigenere to the Man in the Iron Mask
e.g. homophonic substitution cipher - encoding a symbol with a set of symbols, randomly choosing one for each occurence; still, this will have reqularities that certain letters tend to follow others
Great Cipher - encoding syllables and phonemes, plus tricky symbols that erase the previous symbol - holding the secret of the man in the iron mask - maybe meant to be deciphered
## Black Chambers
deciphering on large scale in Vienna + the appearance of telegraph required better encryption, thus switching to polyalphabetic ciphers happened
## Mr. Babbage versus the Vigenere cipher
Steps for breaking the cipher:
1. figuring out the length of the keyword: look for repeated symbol sequences, count the distances between those, then look for the most likely common factor of these distance values
2. for a keyword of length n we have n Caesar-shifts, frequency analysis could help to find those shifts
## From Agony columns to Buried Treasure
Professional cryptography in disarray, but ciphers became entertainment for the general public
pinprick - little dots on public text (e.g. newspaper article) to pick the letters of the message - easy to decrypt
literature
legendary treasures (Beale cipher - keytext gives strong encryption)
# The Mechanization of Secrecy
Marconi invents the radio - fast but entirely public form communication -> new ciphers needed
the military uses ciphers that are convoluted mixtures of substitution and transposition (e.g. German ADFGVX)
military intelligence: using the 'fist' of the Morse coder and locating the source by using the strength of the radio signal can reveal troop movements, even before succesful cryptanalysis
The Zimmermann telegram (in WW1 Germans plotting Mexico to attack the US) was intercepted, decrypted and brought the US into the war.
## The Holy Grail of Cryptography
onetime pad cipher using random keys - unbreakable
if the key is not random, then it is easy to break: assuming 'the' is in the text, we can place it randomly on the unknown plaintext, and see we can get some meaningful triplet in the keyphrase
so, there is a need for generating (mechanically) random keyphrases
## The Development of Cipher Machines - from Cipher Disks to the Enigma
the rotating scrambler is the key idea
# Cracking the Enigma
only weak countries invest time in breaking ciphers (strong ones become overconfident) -> Poland advances Enigma knowledge
separating scrambler arrangements and their orientations, and plugboard settings
the daily key was sent twice -> repetition allowed to find cycles -> precomputing a cycle database
adding more rotors made the approach less practical
## The Geese that never Cackled
Bletchley Park
cillies - predictable message keys
bad ideas: rotors cannot stay at the same slot, neighbouring letters cannot be swapped by the plugboard -> reducec number of keys
crib - known piece of plaintext (e.g. weather reports)
loops (in letter mappings) can be found by cribs -> machine can check which key produces that loop
## Kidnapping Codebooks
## The anonymous cryptanalists
# The Language Barrier
electromechanical encryption when used properly is paractically unbreakable, but too slow -> Navajo code talkers
## Deciphering Lost Languages and Ancient Scripts
## The Mystery of Linear B
## A Frivolous Digression
# 6 Alice and Bob Go Public
Using a computer to encipher a message is similar to traditional methods. But there are some differences:
* computer is not limited by physical constraints, the encryption process can be more complex
* computer is faster
* computer works with numbers instead of letters
the issue of standardization
Lucifer (later DES) "a bit like kneading a slab of dough."
major issue: key distribution
## God Rewards Fools
key distribution is logistically impossible for the public
seemingly paradoxical: in order to send a secret message, a secret should be shared (sending secret) beforehand
padlock example - for math the problem is the order of encryption decryption "last on, first off"
functions in modular arithmetic have "erratic" behaviour, we don't have a sense of getting closer to a solution
Diffie-Hellman key exchange - both parties have to be present, there is toing and froing
## The Birth of Public Key Cryptography
asymmetric - the distinction between encryption and decryption keys
another padlock analogy: Alice gives away 'clicking it to shut' padlocks but only she has the key for that.
## Prime Suspects
## The Alternative History of Public Key Cryptography
"... had proved that apparently impossible was possible, but nobody could find a way of making the possible critical."
# 7 Pretty Good Privacy
"As we enter the twenty-first century, the fundamental dilemma for cryptography is to find a way of allowing the public and business to use encryption in order to exploit the benefits of the Information Age without allowing criminals to abuse encryption and evade arrest."
PGP uses RSA (slow) with a symmetric key (fast) cipher
privacy and authorship: Alice can encrypt the message with her own private key, then with Bob's public key.
## Encryption for the masses... or not?
Policy may keep changing depending of who we fear most, criminals or the government.
## The reahbilitation of Zimmermann
# 8 Quantum Leap into the Future
## The Futurue of Cryptanalysis
attacks: traffic analysis, tempest attacks (spying with radio and electrical signals), viruses
## Quantum Cryptography
polarized photons - analogy: like sending a playing card - we can only measure the suit or the value, bot not both
this allows Alice and Bob to come up with a secret key by sending a random sequence of bits, then discuss over a public channel what polarization was measured, and what was sent
The protocol promises physically unbreakable encryption.