Slide 1

Slide 1 text

Crypto: 500 BC - Present

Slide 2

Slide 2 text

WWII
 Crypto: 500 BC - Present Without much math

Slide 3

Slide 3 text

Math I don’t like it It’s too easy to get wrong DO NOT TRY TO MAKE YOUR OWN CRYPTO BE EXTRA CAREFUL WITH HOW YOU USE CRYPTO

Slide 4

Slide 4 text

The Code Book Simon Singh

Slide 5

Slide 5 text

Journey into Cryptography Khan Academy

Slide 6

Slide 6 text

Cryptography Wikipedia

Slide 7

Slide 7 text

Steganography Hiding messages

Slide 8

Slide 8 text

499 BCE Histiaeus of Miletus shaves head of messengers to write to Aristagoras re: revolt against Persians

Slide 9

Slide 9 text

480 BCE Demaratus writes into wood covered with wax re: Xerxes’ pending attack

Slide 10

Slide 10 text

??? Chinese writings on silk in balls of wax ingested by couriers

Slide 11

Slide 11 text

First “Invisible Ink”, 1st c. AD Pliny the Elder Milk of tithymalus plant Heat-activated

Slide 12

Slide 12 text

Cryptography Encrypting messages

Slide 13

Slide 13 text

T ranspositional Cipher Anagrams: move letters around

Slide 14

Slide 14 text

Strength of a transpositional cipher For example, consider this short sentence 35 letters 50,000,000,000,000,000,000,000,000,000,000
 distint arrangements 1 check/second =
 1,500,000,000,000,000,000,000,000 years
 (1 trillion billion years)

Slide 15

Slide 15 text

Drawbacks of random transpositional cipher Impossible for intended recipient too False positives: which anagram is right?

Slide 16

Slide 16 text

Algorithms & Keys

Slide 17

Slide 17 text

Rail fence cipher Algorithm:
 Message written diagonally Key:
 Across N rows http://crypto.interactive-maths.com/rail-fence-cipher.html

Slide 18

Slide 18 text

Rail fence cipher http://crypto.interactive-maths.com/rail-fence-cipher.html They are attacking from the north TEKOOHRACIRMNREATANFTETYTGHH

Slide 19

Slide 19 text

Cryptanalysis Breaking encrypted messages

Slide 20

Slide 20 text

Breaking rail fence cipher http://crypto.interactive-maths.com/rail-fence-cipher.html Key Search/“Brute Force”
 T ry a bunch of numbers of rows by hand

Slide 21

Slide 21 text

Scytale, ~700 BCE - 120 AD Cylinder with parchment wound around it T ranspositional cipher
 or
 Partial/Hidden writing

Slide 22

Slide 22 text

Scytale http://cryptiana.web.fc2.com/code/scytale.htm

Slide 23

Slide 23 text

Scytale http://cryptiana.web.fc2.com/code/scytale.htm

Slide 24

Slide 24 text

Scytale, ~700 BCE - 120 AD Algorithm Wrap message around a cylinder Key Diameter of cylinder

Slide 25

Slide 25 text

Breaking a Scytale Key Search/“Brute Force”
 T ry a bunch of cylinders
 Re-arrange lines

Slide 26

Slide 26 text

Substitutional Cipher Change letters into other letters

Slide 27

Slide 27 text

Hebrew “Atbash” Cipher Plain alphabet: תשרקצפעסנמלכיטחזוהדגבא Cipher alphabet: אבגדהוזחטיכלמנסעפצקרשת Aleph (first) T av (last) Beth (second) Shin (second-to-last)

Slide 28

Slide 28 text

Atbash Cipher “and the king of Sheshach shall drink after them” –Jeremiah 25:26 “Behold, I will raise up against Babylon…” –Jeremiah 51:1 “How Sheshach is taken…” –Jeremiah 51:41

Slide 29

Slide 29 text

“Breaking” Atbash Cipher Context Literary delight & mystery, not secrecy

Slide 30

Slide 30 text

Caesar Cipher, 49 - 44 BC Algorithm Replace each letter with another letter K positions down the alphabet K Julius = 3 Augustus = 1

Slide 31

Slide 31 text

Caesar (Shift) Cipher Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: DEFGHIJKLMNOPQRSTUVWXZYABC

Slide 32

Slide 32 text

Breaking a Caesar Cipher Key Search/“Brute Force”
 25 possible shifts

Slide 33

Slide 33 text

Non-shifted/Random Caesar Cipher Algorithm Replace each letter with another letter K Any Cipher Alphabet

Slide 34

Slide 34 text

Non-shifted Substitutional Cipher 26 letters to re-arrange 400,000,000,000,000,000,000,000,000
 possible re-arrangements 120,000,000,000,000,000,000
 years at 1 check/s Key = easy to implement; hard to break

Slide 35

Slide 35 text

Easy to memorize key Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: JULISCAERTVWXYZBDFGHKMNOPQ Key phrase
 JULIUS CAESAR
 JULISCAER Note: slightly fewer possible keys

Slide 36

Slide 36 text

Non-shifted Substitution Cipher considered un-breakable for ~800 years, until …

Slide 37

Slide 37 text

ةامعملا بتكلا جارختسا يف ةلاسر (On Decrypting Encrypted Correspondence) يدنكلا حاّبصلا قاحسإ نب بوقعي فسوي وبأ
 (Abu Yūsuf Yaʻqūb ibn ʼIsḥāq aṣ-Ṣabbāḥ al-Kindī)
 Al-Kindi 801-873 AD

Slide 38

Slide 38 text

Frequency Analysis

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Frequency Analysis Example

Slide 41

Slide 41 text

“Rqh zdb wr vroyh dq hqfubswhg phvvdjhv, li zh nqrz lwv odqjxdjh, lv wr ilqg d gliihuhqw sodlqwhaw ri wkh vdph odqjxdjh orqj hqrxjk wr iloo rqh vkhhw ru vr, dqg wkhq zh frxqw wkh rffxuuhqfhv ri hdfk oetteu. Zh fdoo wkh prvw iuhtxhqwob rffxuulqj oetteu wkh ‘iluvw’, wkh qhaw prvw rffxuulqj oetteu wkh ‘vhfrqg’, wkh iroorzlqj prvw rffxuulqj oetteu wkh ‘wklug’, dqg vr rq, xqwlo zh dffrxqw iru doo wkh gliihuhqw oetteuv lq wkh sodlqwhaw vdpsoh. Wkhq zh orrn dw wkh flskhu whaw zh zdqw wr vroyh dqg zh dovr fodvvlib lwv vbperov. Zh ilqg wkh prvw rffxuulqj vbpero dqg fkdqjh lw wr wkh irup ri wkh ‘iluvw’ oetteu ri wkh sodlqwhaw vdpsoh, wkh qhaw prvw frpprq vbpero lv fkdqjhg wr wkh irup ri wkh ‘vhfrqg’ oetteu, dqg wkh iroorzlqj prvw frpprq vbpero lv fkdqjhg wr wkh irup ri wkh ‘wklug’ oetteu, dqg vr rq, xqwlo zh dffrxqw iru doo vbperov ri wkh fubswrjudp zh zdqw wr vroyh.”

Slide 42

Slide 42 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ??????????????????????????

Slide 43

Slide 43 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ????H??????????????W??????

Slide 44

Slide 44 text

“Rqh zdb wr vroyh dq hqfubswhg phvvdjhv, li zh nqrz lwv odqjxdjh, lv wr ilqg d gliihuhqw sodlqwhaw ri wkh vdph odqjxdjh orqj hqrxjk wr iloo rqh vkeet ru vr, dqg wkhq zh frxqw wkh rffxuuhqfhv ri hdfk oetteu. Zh fdoo wkh prvw iuhtxhqwob rffxuulqj oetteu wkh ‘iluvw’, wkh qhaw prvw rffxuulqj oetteu wkh ‘vhfrqg’, wkh iroorzlqj prvw rffxuulqj oetteu wkh ‘wklug’, dqg vr rq, xqwlo zh dffrxqw iru doo wkh gliihuhqw oetteuv lq wkh sodlqwhaw vdpsoh. Wkhq zh orrn dw wkh flskhu whaw zh zdqw wr vroyh dqg zh dovr fodvvlib lwv vbperov. Zh ilqg wkh prvw rffxuulqj vbpero dqg fkdqjh lw wr wkh irup ri wkh ‘iluvw’ oetteu ri wkh sodlqwhaw vdpsoh, wkh qhaw prvw frpprq vbpero lv fkdqjhg wr wkh irup ri wkh ‘vhfrqg’ oetteu, dqg wkh iroorzlqj prvw frpprq vbpero lv fkdqjhg wr wkh irup ri wkh ‘wklug’ oetteu, dqg vr rq, xqwlo zh dffrxqw iru doo vbperov ri wkh fubswrjudp zh zdqw wr vroyh.”

Slide 45

Slide 45 text

“oetteu” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ????H??????O?????U?W?????? “letter”

Slide 46

Slide 46 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ????H??????O?????U?W??????

Slide 47

Slide 47 text

“Rqe zdb tr vrlye dq eqfrbsteg pevvdjev, li ze nqrz ltv ldqjxdje, lv tr ilqg d gliiereqt sldlqteat ri tke vdpe ldqjxdje lrqj eqrxjk tr illl rqe vkeet rr vr, dqg tkeq ze frxqt tke rffxrreqfev ri edfk letter. Ze fdll tke prvt iretxeqtlb rffxrrlqj letter tke ‘ilrvt’, tke qeat prvt rffxrrlqj letter tke ‘vefrqg’, tke irllrzlqj prvt rffxrrlqj letter tke ‘tklrg’, dqg vr rq, xqtll ze dffrxqt irr dll tke gliiereqt letterv lq tke sldlqteat vdpsle. Wkeq ze lrrn dt tke flsker teat ze zdqt tr vrlye dqg ze dlvr fldvvlib ltv vbperlv. Ze ilqg tke prvt rffxrrlqj vbperl dqg fkdqje lt tr tke irrp ri tke ‘ilrvt’ letter ri tke sldlqteat vdpsle, tke qeat prvt frpprq vbperl lv fkdqjeg tr tke irrp ri tke ‘vefrqg’ letter, dqg tke irllrzlqj prvt frpprq vbperl lv fkdqjeg tr tke irrp ri tke ‘tklrg’ letter, dqg vr rq, xqtll ze dffrxqt irr dll vbperlv ri tke frbstrjrdp ze zdqt tr vrlye.”

Slide 48

Slide 48 text

“letterv” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ????H??????O?????UVW?????? “letters”

Slide 49

Slide 49 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: ????H??????O?????UVW??????

Slide 50

Slide 50 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: DEFGHIJKLMNOPQRSTUVWXYZABC

Slide 51

Slide 51 text

“One way to solve an encrypted messages, if we know its language, is to find a different plaintext of the same language long enough to fill one sheet or so, and then we count the occurrences of each letter. We call the most frequently occurring letter the ‘first’, the next most occurring letter the ‘second’, the following most occurring letter the ‘third’, and so on, until we account for all the different letters in the plaintext sample. Then we look at the cipher text we want to solve and we also classify its symbols. We find the most occurring symbol and change it to the form of the ‘first’ letter of the plaintext sample, the next most common symbol is changed to the form of the ‘second’ letter, and the following most common symbol is changed to the form of the ‘third’ letter, and so on, until we account for all symbols of the cryptogram we want to solve.” –يدنكلا حاّبصلا قاحسإ نب بوقعي فسوي وبأ (Al-Kindi)

Slide 52

Slide 52 text

Frequency Analysis Example 2

Slide 53

Slide 53 text

The Code Book Simon Singh

Slide 54

Slide 54 text

“PCQ VMJYPD LBYK LYSO KBXBJXWXV BXV ZCJPO EYPD KBXBJYUXJ LBJOO KCPK. CP LBO LBCMKXPV XPV IYJKL PYDBL, QBOP KBO BXV OPVOV LBO LXRO CI SX’XJMI, KBO JCKO XPV EYKKOV LBO DJCMPV ZOICJO BYS, KXUYPD: “DJOXL EYPD, ICJ X LBCMKXPV XPV CPO PYDBLK Y BXNO ZOOP JOACMPLYPD LC UCM LBO IXZROK CI FXKL XDOK XPV LBO RODOPVK CI XPAYOPL EYPDK. SXU Y SXEO KC ZCRV XK LC AJXNO X IXNCMJ CI UCMJ SXGOKLU?” –OFYRCDMO, LXROK IJCS LBO LBCMKXPV XPV CPO PYDBLK

Slide 55

Slide 55 text

Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: P???O??YK????LC??VJX?Q????

Slide 56

Slide 56 text

“PCQ” “XPV” “CPO” “aov” “tar” “oae” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: P???O??YK????LC??VJX?Q????

Slide 57

Slide 57 text

WTF?

Slide 58

Slide 58 text

Focus

Slide 59

Slide 59 text

Focus O = e, t, or a X = e, t, or a P = e, t, or a

Slide 60

Slide 60 text

More English frequency rules Vowels appear before and after most other letters Consonants avoid many letters E.g., ‘e’ appears before/after virtually every other letter; while ’t’ is rarely seen before or after ‘b’, ‘d’, ‘g’, ‘j’, ‘k’, ‘m’, ‘q’, ‘v’

Slide 61

Slide 61 text

1 9 0 3 1 1 1 0 1 4 6 0 1 2 2 8 0 4 1 0 0 3 0 1 1 2 0 7 0 1 1 1 1 0 2 4 6 3 0 3 1 9 0 2 4 0 3 3 2 0 0 1 1 0 5 6 0 0 0 0 0 1 1 2 2 0 8 0 0 0 0 0 0 11 0 9 9 0 A B CDE F G H I J K LMNOPQR S TU V W X Y Z O X P “Neighbor” Frequency

Slide 62

Slide 62 text

1 9 0 3 1 1 1 0 1 4 6 0 1 2 2 8 0 4 1 0 0 3 0 1 1 2 0 7 0 1 1 1 1 0 2 4 6 3 0 3 1 9 0 2 4 0 3 3 2 0 0 1 1 0 5 6 0 0 0 0 0 1 1 2 2 0 8 0 0 0 0 0 0 11 0 9 9 0 A B CDE F G H I J K LMNOPQR S TU V W X Y Z O X P Neighbor “Avoidance” i.e., Anti-Frequency so …

Slide 63

Slide 63 text

O avoids 7 other letters completely X avoids 8 completely P avoids 15 completely Neighbor “Avoidance” i.e., Anti-Frequency

Slide 64

Slide 64 text

Cipher O = e or a X = e or a P = t ?

Slide 65

Slide 65 text

“PCQ VMJYPD LBYK LYSO KBXBJXWXV BXV ZCJPO EYPD KBXBJYUXJ LBJOO KCPK. CP LBO LBCMKXPV XPV IYJKL PYDBL, QBOP KBO BXV OPVOV LBO LXRO CI SX’XJMI, KBO JCKO XPV EYKKOV LBO DJCMPV ZOICJO BYS, KXUYPD: “DJOXL EYPD, ICJ X LBCMKXPV XPV CPO PYDBLK Y BXNO ZOOP JOACMPLYPD LC UCM LBO IXZROK CI FXKL XDOK XPV LBO RODOPVK CI XPAYOPL EYPDK. SXU Y SXEO KC ZCRV XK LC AJXNO X IXNCMJ CI UCMJ SXGOKLU?” “OO” twice; “XX” never

Slide 66

Slide 66 text

“ee” far more often than “aa” so …

Slide 67

Slide 67 text

Cipher O = e X = a ? P = t ?

Slide 68

Slide 68 text

“… ICJ X LBCMKXPV …” “X” on its own

Slide 69

Slide 69 text

“a” on its own very often so …

Slide 70

Slide 70 text

Cipher O = e X = a P = t ?

Slide 71

Slide 71 text

“… PYDBLK Y BXNO …” “Y” on its own too

Slide 72

Slide 72 text

“I” on its own too so …

Slide 73

Slide 73 text

Cipher O = e X = a Y = i P = t ?

Slide 74

Slide 74 text

More English frequency rules ‘h’ frequently goes before ‘e’ but rarely after ‘e’

Slide 75

Slide 75 text

1 0 0 1 0 1 0 0 1 0 4 0 0 0 2 5 0 0 0 0 0 2 0 1 0 0 0 9 0 2 1 0 1 0 0 4 2 0 1 2 2 3 0 4 1 0 0 1 0 0 1 2 a b c d e f g h i j k l m n o p q r s t u v w x y z after O/e before O/e “Neighbor” Frequency so …

Slide 76

Slide 76 text

Cipher O = e X = a Y = i B = h P = t ?

Slide 77

Slide 77 text

“PCQ VMJiPD LhiK LiSe KhahJaWaV haV ZCJPe EiPD KhahJiUaJ LhJee KCPK. CP Lhe LhCMKaPV aPV IiJKL PiDhL, QheP Khe haV ePVeV Lhe LaRe CI Sa’aJMI, Khe JCKe aPV EiKKeV Lhe DJCMPV ZeICJe hiS, KaUiPD: “DJeaL EiPD, ICJ a LhCMKaPV aPV CPe PiDhLK i haNe ZeeP JeACMPLiPD LC UCM Lhe IaZReK CI FaKL aDeK aPV Lhe ReDePVK CI aPAiePL EiPDK. SaU i SaEe KC ZCRV aK LC AJaNe a IaNCMJ CI UCMJ SaGeKLU?” –eFiRCDMe, LaReK IJCS Lhe LhCMKaPV aPV CPe PiDhLK

Slide 78

Slide 78 text

“PCQ VMJiPD LhiK LiSe KhahJaWaV haV ZCJPe EiPD KhahJiUaJ LhJee KCPK. CP Lhe LhCMKaPV aPV IiJKL PiDhL, QheP Khe haV ePVeV Lhe LaRe CI Sa’aJMI, Khe JCKe aPV EiKKeV Lhe DJCMPV ZeICJe hiS, KaUiPD: “DJeaL EiPD, ICJ a LhCMKaPV aPV CPe PiDhLK i haNe ZeeP JeACMPLiPD LC UCM Lhe IaZReK CI FaKL aDeK aPV Lhe ReDePVK CI aPAiePL EiPDK. SaU i SaEe KC ZCRV aK LC AJaNe a IaNCMJ CI UCMJ SaGeKLU?” –eFiRCDMe, LaReK IJCS Lhe LhCMKaPV aPV CPe PiDhLK “Lhe” 6 times

Slide 79

Slide 79 text

“Lhe” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: X???O??BY??????????L?????? “the”

Slide 80

Slide 80 text

“PCQ VMJiPD thiK tiSe KhahJaWaV haV ZCJPe EiPD KhahJiUaJ thJee KCPK. CP the thCMKaPV aPV IiJKt PiDht, QheP Khe haV ePVeV the taRe CI Sa’aJMI, Khe JCKe aPV EiKKeV the DJCMPV ZeICJe hiS, KaUiPD: “DJeat EiPD, ICJ a thCMKaPV aPV CPe PiDhtK i haNe ZeeP JeACMPtiPD tC UCM the IaZReK CI FaKt aDeK aPV the ReDePVK CI aPAiePt EiPDK. SaU i SaEe KC ZCRV aK tC AJaNe a IaNCMJ CI UCMJ SaGeKtU?” –eFiRCDMe, taReK IJCS the thCMKaPV aPV CPe PiDhtK “aPV” 5 times

Slide 81

Slide 81 text

“aPV” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: X??VO??BY????P?????L?????? “and”

Slide 82

Slide 82 text

“nCQ dMJinD thiK tiSe KhahJaWad had ZCJne EinD KhahJiUaJ thJee KCnK. Cn the thCMKand and IiJKt niDht, Qhen Khe had ended the taRe CI Sa’aJMI, Khe JCKe and EiKKed the DJCMnd ZeICJe hiS, KaUinD: “DJeat EinD, ICJ a thCMKand and Cne niDhtK i haNe Zeen JeACMntinD tC UCM the IaZReK CI FaKt aDeK and the ReDendK CI anAient EinDK. SaU i SaEe KC ZCRd aK tC AJaNe a IaNCMJ CI UCMJ SaGeKtU?” –eFiRCDMe, taReK IJCS the thCMKand and Cne niDhtK “Cn” word needs vowel: ‘u’ or ‘o’ left

Slide 83

Slide 83 text

“Cn” “Cne” “tC" Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: X??VO??BY????PC????L?????? “on” “one” “to”

Slide 84

Slide 84 text

“noQ dMJinD thiK tiSe KhahJaWad had ZoJne EinD KhahJiUaJ thJee KonK. on the thoMKand and IiJKt niDht, Qhen Khe had ended the taRe oI Sa’aJMI, Khe JoKe and EiKKed the DJoMnd ZeIoJe hiS, KaUinD: “DJeat EinD, IoJ a thoMKand and one niDhtK i haNe Zeen JeAoMntinD to UoM the IaZReK oI FaKt aDeK and the ReDendK oI anAient EinDK. SaU i SaEe Ko ZoRd aK to AJaNe a IaNoMJ oI UoMJ SaGeKtU?” –eFiRoDMe, taReK IJoS the thoMKand and one niDhtK “Khe”; ’t’ already used

Slide 85

Slide 85 text

“Khe" Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: X??VO??BY????PC???KL?????? “she”

Slide 86

Slide 86 text

“noQ dMJinD this tiSe shahJaWad had ZoJne EinD shahJiUaJ thJee sons. on the thoMsand and IiJst niDht, Qhen she had ended the taRe oI Sa’aJMI, she Jose and Eissed the DJoMnd ZeIoJe hiS, saUinD: “DJeat EinD, IoJ a thoMsand and one niDhts i haNe Zeen JeAoMntinD to UoM the IaZRes oI Fast aDes and the ReDends oI anAient EinDs. SaU i SaEe so ZoRd as to AJaNe a IaNoMJ oI UoMJ SaGestU?” –eFiRoDMe, taRes IJoS the thoMsand and one niDhts “thoMsand and one niDhts”

Slide 87

Slide 87 text

“thoMsand and one niDhts" Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: X??VO?DBY????PC???KLM????? “thousand and one nights”

Slide 88

Slide 88 text

“noQ duJing this tiSe shahJaWad had ZoJne Eing shahJiUaJ thJee sons. on the thousand and IiJst night, Qhen she had ended the taRe oI Sa’aJuI, she Jose and Eissed the gJound ZeIoJe hiS, saUing: “gJeat Eing, IoJ a thousand and one nights i haNe Zeen JeAounting to Uou the IaZRes oI Fast ages and the Regends oI anAient Eings. SaU i SaEe so ZoRd as to AJaNe a IaNouJ oI UouJ SaGestU?” –eFiRogue, taRes IJoS the thousand and one nights Rapid progress now …

Slide 89

Slide 89 text

“duJing” “Qhen” “haNe” “Zeen” “anAient” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: XZAVO?DBY????PC??JKLMNQ??? “during” “when” “have” “been” “ancient”

Slide 90

Slide 90 text

“now during this tiSe shahraWad had borne Eing shahriUar three sons. on the thousand and Iirst night, when she had ended the taRe oI Sa’aruI, she rose and Eissed the ground beIore hiS, saUing: “great Eing, Ior a thousand and one nights i have been recounting to Uou the IabRes oI Fast ages and the Regends oI ancient Eings. SaU i SaEe so boRd as to crave a Iavour oI Uour SaGestU?” –eFiRogue, taRes IroS the thousand and one nights

Slide 91

Slide 91 text

“tiSe” “Iirst” “Eissed” “beIore” “saUing” “Fast” “Regends” Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: XZAVOIDBY?ERSPCF?JKLMNQ?U? “time” “first” “kissed” “before” “saying” “past” “legends”

Slide 92

Slide 92 text

“now during this time shahraWad had borne king shahriyar three sons. on the thousand and first night, when she had ended the tale of ma’aruf, she rose and kissed the ground before him, saying: “great king, for a thousand and one nights i have been recounting to you the fables of past ages and the legends of ancient kings. may i make so bold as to crave a favour of your maGesty?” –epilogue, tales from the thousand and one nights

Slide 93

Slide 93 text

“now during this time shahra[qxzj]ad had borne king shahriyar three sons. on the thousand and first night, when she had ended the tale of ma’aruf, she rose and kissed the ground before him, saying: “great king, for a thousand and one nights i have been recounting to you the fables of past ages and the legends of ancient kings. may i make so bold as to crave a favour of your ma[qxzj]esty?” –epilogue, tales from the thousand and one nights Plain alphabet: abcdefghijklmnopqrstuvwxyz Cipher alphabet: XZAVOIDBY?ERSPCF?JKLMNQ?U?

Slide 94

Slide 94 text

Frequency Analysis considered un-beatable for ~800 years …

Slide 95

Slide 95 text

Homophonic Substitution Cipher 1401 - Present (?) Multiple cipher symbols per plaintext letter

Slide 96

Slide 96 text

Homophonic Substitution Cipher http://thebluegiraffeknowsaboutthis.blogspot.com/2015/10/code-decryption.html

Slide 97

Slide 97 text

Homophonic Substitution Cipher Each cipher letter makes up ~1% of the text Still vulnerable to some frequency analysis E.g., ’q’ is 1 letter usually followed by ‘u’ which is 3 letters Still more secure than mono-alphabetic substitution Key hard to memorize

Slide 98

Slide 98 text

Leon Battista Alberti 1404-1472 Proposed 2 or more cipher alphabets

Slide 99

Slide 99 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z Polyalphabetic Substitution Cipher

Slide 100

Slide 100 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” “R?????” Polyalphabetic Substitution Cipher

Slide 101

Slide 101 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” “RA????” Polyalphabetic Substitution Cipher

Slide 102

Slide 102 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” “RAB???” Polyalphabetic Substitution Cipher

Slide 103

Slide 103 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E “RABH??” a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” Polyalphabetic Substitution Cipher

Slide 104

Slide 104 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E “RABHK?” a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” Polyalphabetic Substitution Cipher

Slide 105

Slide 105 text

D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z “secret” “RABHKK” Polyalphabetic Substitution Cipher

Slide 106

Slide 106 text

False frequencies ‘e’ is enciphered as both ‘A’ and ‘K’ ‘K’ is deciphered as both ‘e’ and ‘t’ “secret” “RABHKK”

Slide 107

Slide 107 text

Polyalphabetic beats frequency analysis but …

Slide 108

Slide 108 text

Polyalphabetic ciphers are complex D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E

Slide 109

Slide 109 text

Machines to the rescue! Alberti Cipher Disk Outer disk stationary Inner disk rotates Ciphertext contains key letters to control rotation

Slide 110

Slide 110 text

Machines to the rescue! Index: g Plaintext: La guerra si farà

Slide 111

Slide 111 text

Movable: ABCDEFGILMNOPQRSTVXZ1234 Ciphertext: Azgthpmamg Plaintext: _LAGVER2RA_ Stationary: gklnprtuz&xysomqihfdbace

Slide 112

Slide 112 text

Movable: QRSTVXZ1234ABCDEFGILMNOP Ciphertext: Qlfiyky Plaintext:_SIFARÀ Stationary: gklnprtuz&xysomqihfdbace

Slide 113

Slide 113 text

Ciphertext: AzgthpmamgQlfiyky Plaintext: _LAGVER2RA_SIFARÀ

Slide 114

Slide 114 text

Machine-Implemented Polyalphabetic Substitution Positives Unbreakable by (human) frequency analysis Easy Negatives “Tricks”: e.g., ‘R2R’ needed to defend against double-letter frequencies expose those frequencies Switching logic contained in ciphertext

Slide 115

Slide 115 text

How to apply an easy-to-memorize keyword to polyalphabetic cipher? Keyword
 SECRET D M B X K I V A S Z N P L Y F C J O R T E Q H WG U Z J D P A I Q H T WL F B G O X N H U K R C Y V S E a b c d e f g h i j k l m n o p q r s t u v w x y z

Slide 116

Slide 116 text

Le Chiffre Indéchiffrable created by Blaise de Vigenère 1523 - 1596 Created new polyalphabetic encryption system

Slide 117

Slide 117 text

Vigenère Square

Slide 118

Slide 118 text

a b c d e f g h i j k l m n o p q r s t u v w x y z 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y 26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Slide 119

Slide 119 text

Repeat keyword for all of text Plaintext: AttackFromTheSouthAtDawn Ciphertext: ???????????????????????? Keyword: SECRETSECRETSECRETSECRET

Slide 120

Slide 120 text

Start with cipher at 1st letter of keyword Encrypt first letter of plaintext Move to cipher at 2nd letter of keyword Encrypt second letter of plaintext etc.

Slide 121

Slide 121 text

a b c d e f g h i j k l m n o p q r s t u v w x y z 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y 26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext: S??????????????????????? Plaintext: AttackFromTheSouthAtDawn Keyword: SECRETSECRETSECRETSECRET

Slide 122

Slide 122 text

a b c d e f g h i j k l m n o p q r s t u v w x y z 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y 26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext: SX?????????????????????? Plaintext: AttackFromTheSouthAtDawn Keyword: SECRETSECRETSECRETSECRET

Slide 123

Slide 123 text

a b c d e f g h i j k l m n o p q r s t u v w x y z 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y 26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Ciphertext: SXV????????????????????? Plaintext: AttackFromTheSouthAtDawn Keyword: SECRETSECRETSECRETSECRET

Slide 124

Slide 124 text

Plaintext: AttackFromTheSouthAtDawn Ciphertext: SXVRGDXVQDXAWWQLXASXFRAG Keyword: SECRETSECRETSECRETSECRET

Slide 125

Slide 125 text

Vigenère Square un-used for ~100 years; considered too complicated

Slide 126

Slide 126 text

Other Enhanced Mono-substitutional Ciphers

Slide 127

Slide 127 text

The Great Cipher of Louis XIV created by Rossignol family Antoine Rossignol (1600–1682) Bonaventure Rossignol Antoine-Bonaventure Rossignol After deaths, became un-used, and indecipherable

Slide 128

Slide 128 text

The Great Cipher of Louis XIV Each number represents a syllable 587 distinct numbers

Slide 129

Slide 129 text

Example Plaintext: les-en-ne-mi-s “les ennemis” Ciphertext: 124-22-125-46-345

Slide 130

Slide 130 text

Great Cipher went un-broken for 200 years

Slide 131

Slide 131 text

Who was the Man in the Iron Mask? 1890: Étienne Bazeries deciphered a Great Cipher letter from Louis XIV’s Minister of War naming General Bulonde “to be conducted to the fortress of Pignerole, where he will be locked in a cell under guard at night, and permitted to walk the battlements during the day with a mask.”

Slide 132

Slide 132 text

Industrial Revolution ~1760 - 1840

Slide 133

Slide 133 text

“Black Chambers” • 1700s • “Assembly-line” Cryptanalysis • Each European power had one • Breaking all mono-alphabetic ciphers • Encouraged adoption of Vigenère Square for polyalphabetic ciphers

Slide 134

Slide 134 text

Electric Telegraphs • 1800s • 29km b/w West Drayton & Paddington railway stations • 60km b/w Baltimore & Washington DC

Slide 135

Slide 135 text

Operators read “plaintext” messages

Slide 136

Slide 136 text

Charles Babbage • 1791 - 1871 • 1854: Broke Vigenère Cipher • Without machinery

Slide 137

Slide 137 text

REPEATING KEYWORD Plaintext: AttackFromTheSouthAtDawn Ciphertext: SXVRGDXVQDXAWWQLXASXFRAG Keyword: SECRETSECRETSECRETSECRET

Slide 138

Slide 138 text

False SYMBOL frequencies • ‘e’ is enciphered as both ‘A’ and ‘K’ • ‘K’ is deciphered as both ‘e’ and ‘t’ “secret” “RABHKK”

Slide 139

Slide 139 text

THE CODE BOOK Simon Singh

Slide 140

Slide 140 text

Plaintext: thesunandthemaninthemoon Ciphertext: DPRYEVNTNBUKWIAOXBUKWWBT Keyword: KINGKINGKINGKINGKINGKING

Slide 141

Slide 141 text

WORD FREQUENCIES • ‘the’ is enciphered as: • ‘DPR’ first • ‘BUK’ next • ‘BUK’ next • i.e., repeated when word is displaced by a multiple of the key length

Slide 142

Slide 142 text

Deciphering Vigenère • Look for repeated sequences of letters • 4 or more letters to filter out coincidences • Measure spacing between repetitions • Identify most likely length of key: L • Divide the cipher text into L individual sets of cipher text • Break each set by frequency analysis to find keyword

Slide 143

Slide 143 text

Cipher text WUBEFIQLZURMVOFEHMYMWTIXCQTMPIFKRZUPMVOIRQMM WOZMPULMBNYVQQQMVMVJLEYMHFEFNZPSDLPPSDLPEVQM WCXYMDAVQEEFIQCAYTQOWCXYMWMSEMEFCFWYEYQETRLI QYCGMTWCWFBSMYFPLRXTQYEEXMRULUKSGWFPTLRQAERL UVPMVYQYCXTWFQLMTELSFJPQEHMOZCIWCIWFPZSLMAEZ IQVLQMZVPPXAWCSMZMORVGVVQSZETRLQZPBJAZVQIYXE WWOICCGDWHQMMVOWSGNTJPFPPAYBIYBJUTWRLQKLLLMD PYVACDCFQNZPIFPPKSDVPTIDGXMQQVEBMQALKEZMGCVK UZKIZBZLIUAMMVZ

Slide 144

Slide 144 text

REPETITIONS EFIQ, PSDLP, WCXYM, ETRL WUBEFIQLZURMVOFEHMYMWTIXCQTMPIFKRZUPMVOIRQMM WOZMPULMBNYVQQQMVMVJLEYMHFEFNZPSDLPPSDLPEVQM WCXYMDAVQEEFIQCAYTQOWCXYMWMSEMEFCFWYEYQETRLI QYCGMTWCWFBSMYFPLRXTQYEEXMRULUKSGWFPTLRQAERL UVPMVYQYCXTWFQLMTELSFJPQEHMOZCIWCIWFPZSLMAEZ IQVLQMZVPPXAWCSMZMORVGVVQSZETRLQZPBJAZVQIYXE WWOICCGDWHQMMVOWSGNTJPFPPAYBIYBJUTWRLQKLLLMD PYVACDCFQNZPIFPPKSDVPTIDGXMQQVEBMQALKEZMGCVK UZKIZBZLIUAMMVZ

Slide 145

Slide 145 text

spacing between repetitions Repetition Spacing Possible Length of Key 2 3 4 5 6 7 8 9 10 11 121314 15 1617181920 EFIQ 95 ✓ ✓ PSDLP 5 ✓ WCXYM 20 ✓ ✓ ✓ ✓ ✓ ETRL 120 ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓

Slide 146

Slide 146 text

5 separate cipher texts WIREWQFPROLVVEESSV XVITXSCYLGWYXELWRL VXLSECWLQPSRQRBQCH OTPYWLCNPVGVAMZUZ WIREWQFPROLVVEESSV XVITXSCYLGWYXELWRL VXLSECWLQPSRQRBQCH OTPYWLCNPVGVAMZUZ WIREWQFPROLVVEESSV XVITXSCYLGWYXELWRL VXLSECWLQPSRQRBQCH OTPYWLCNPVGVAMZUZ WIREWQFPROLVVEESSV XVITXSCYLGWYXELWRL VXLSECWLQPSRQRBQCH OTPYWLCNPVGVAMZUZ WIREWQFPROLVVEESSV XVITXSCYLGWYXELWRL VXLSECWLQPSRQRBQCH OTPYWLCNPVGVAMZUZ Break each with frequency analysis

Slide 147

Slide 147 text

More Encryption Systems No real “breakthru” methods

Slide 148

Slide 148 text

Beale Ciphers • Pamphlet published in 1885 • Treasure buried 1819-1821

Slide 149

Slide 149 text

Beale Paper #2

Slide 150

Slide 150 text

Beale Paper #2 Key

Slide 151

Slide 151 text

To decrypt it, one finds the word corresponding to the number (e.g., the first number is 115, and the 115th word in the Declaration of Independence is "instituted"), and takes the first letter of that word (in the case of the example, "I").

Slide 152

Slide 152 text

-Beale Paper #2 “I have deposited in the county of Bedford, about four miles from Buford's, in an excavation or vault, six feet below the surface of the ground, the following articles, belonging jointly to the parties whose names are given in number three, herewith: The first deposit consisted of ten hundred and fourteen pounds of gold, and thirty-eight hundred and twelve pounds of silver, deposited Nov. eighteen nineteen. The second was made Dec. eighteen twenty-one, and consisted of nineteen hundred and seven pounds of gold, and twelve hundred and eighty-eight of silver; also jewels, obtained in St. Louis in exchange to save transportation, and valued at thirteen thousand dollars. The above is securely packed in iron pots, with iron covers. The vault is roughly lined with stone, and the vessels rest on solid stone, and are covered with others. Paper number one describes the exact locality of the vault, so that no difficulty will be had in finding it.”

Slide 153

Slide 153 text

Beale Paper #1

Slide 154

Slide 154 text

Beale Paper #3

Slide 155

Slide 155 text

Beale Ciphers • Papers 1 & 3 have never been deciphered • Or have they been? • NSA? • Or can they be? • Hoax?

Slide 156

Slide 156 text

Pin-Prick “Steganography” • Tiny prick/dots under words/letters in other text to spell a message • 19th century British letters • Letters cost 1 shilling/100 miles • Newspapers post for free

Slide 157

Slide 157 text

Radio, 1899-1901 • 3,000 km from Cornwall to to Newfoundland • Trans-atlantic communication • Instant military commands • All messages reach enemy too

Slide 158

Slide 158 text

ADFVGX Cipher, WWI

Slide 159

Slide 159 text

Georges Painvin • Lieutenant with French Bureau de Chiffre • June 2, 1918
 Broke ADFGVX message indicating location of German offensive against Paris • Lost 15kg

Slide 160

Slide 160 text

Encryption with ABSOLUTE Security?

Slide 161

Slide 161 text

One-time Pad Ciphers • Major General Joseph Mauborgne & Gilbert Vernam of Bell Labs • Generate key: • same length as message • random

Slide 162

Slide 162 text

Vigenère Keyword Length • 1,000 letters of plain text • 5 = 5 sets of 200 letters • Easy to break • 20 = 20 sets of 50 letters • Hard to break • 1,000 = 1,000 sets of 1 letter • Impossible to break

Slide 163

Slide 163 text

THE CODE BOOK Simon Singh

Slide 164

Slide 164 text

Keyphrase Length of message Plaintext: ????????????????????? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: ?????????????????????

Slide 165

Slide 165 text

Guesses for “the” Plaintext: the???the?????the???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CAN???BSJ?????YPT???? ‘CAN’ too common, ‘BSJ’ not in any words ‘YPT’ uncommon, but possible

Slide 166

Slide 166 text

“APOCALYPTIC” ? Plaintext: the?????nqcbeothexg?? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CAN?????APOCALYPTIC??

Slide 167

Slide 167 text

“CRYPT” ? Plaintext: the?????????cithe???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CAN?????????CRYPT????

Slide 168

Slide 168 text

“EGYPT” ? Plaintext: the?????????atthe???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CAN?????????EGYPT???? Country starting with ‘CAN’?

Slide 169

Slide 169 text

“CANADA” ? Plaintext: themee??????atthe???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CANADA??????EGYPT???? “meeting” ?

Slide 170

Slide 170 text

“meeting” Plaintext: themeeting??atthe???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CANADABRAZ??EGYPT???? Country starting with “BRAZ”?

Slide 171

Slide 171 text

“BRAZIL” Plaintext: themeetingisatthe???? Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CANADABRAZILEGYPT???? 4-letter country ?

Slide 172

Slide 172 text

“CUBA” Plaintext: themeetingisatthedock Ciphertext: VHRMHEUZNFQDEZRWXFIDK Keyphrase: CANADABRAZILEGYPTCUBA The meeting is at the dock

Slide 173

Slide 173 text

So, Need Random Key • Natural, non-deterministic sources • Radioactive decay • Geiger counter • Electron tunneling • Zener Diodes

Slide 174

Slide 174 text

If the key is • truly random • at least as long as the plaintext • never reused in whole or in part • kept completely secret then the resulting ciphertext will be impossible to break.* * Assuming a sane cryptographic algorithm (e.g., XOR)

Slide 175

Slide 175 text

But one-time pads are logistical nightmare • How to make large quantities of random keys? • messages * characters per day • How to distribute the keys/books securely? • Hardest problem of 20th-century crypto Un-used, because …

Slide 176

Slide 176 text

Remember this machine?

Slide 177

Slide 177 text

Breakthrough in
 Mechanical Encryption

Slide 178

Slide 178 text

26 Cipher Alphabets a b c d e f g h i j k l m n o p q r s t u v w x y z 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C D E F G H I J K L M N O P Q R S T U V W X Y Z A B 3 D E F G H I J K L M N O P Q R S T U V W X Y Z A B C 4 E F G H I J K L M N O P Q R S T U V W X Y Z A B C D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S T U V W X Y 26 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Slide 179

Slide 179 text

Enigma: Electrical Encryption • Arthur Scherbius, 1918 • Mass Production in 1925 • Keyboard for plaintext • “Magic” • Rotors + Reflector • Plugboard • Lamp-board for ciphertext CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=497329

Slide 180

Slide 180 text

By User:RadioFan, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=30719651

Slide 181

Slide 181 text

By MesserWoland - Own work based on Image:Enigma-action.pnj by Jeanot; original diagram by Matt Crypto, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1794494 Enigma's security came from using several rotors in series (usually three or four) and the regular stepping movement of the rotors, thus implementing a polyalphabetic substitution cipher.

Slide 182

Slide 182 text

3 rotors of 26 wirings 26 x 26 x 26 = 17,576 Cipher Alphabets
 KEY = Starting Position of each

Slide 183

Slide 183 text

17,576 is crack-able • A new key was used every day • Assume 1 orientation check per minute • Simply type ciphertext and look at plaintext • 1 enigma machine = 12 days to crack • 12 enigma machines = 1 day to crack • 24 enigma machines = .5 day to crack

Slide 184

Slide 184 text

Rotors could be Re-arranged 26 x 26 x 26 = 17,576 orientations x 6 arrangements = 105,456 Cipher Alphabets

Slide 185

Slide 185 text

105,456 is really hard • Assume 1 check per minute • 1 enigma machine = 73 days to crack • 12 enigma machines = 6 days to crack • 24 enigma machines = 3 days to crack • 48 enigma machines = 1.5 days to crack • 96 enigma machines = .75 days to crack

Slide 186

Slide 186 text

Plugboard By Bob Lord - German Enigma Machine, uploaded in english wikipedia on 16. Feb. 2005 by en:User:Matt Crypto, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=258976 Swap up to 6 of 26 letters

Slide 187

Slide 187 text

6 letter switches out of 26 possible = 100,391,791,500 Plugboard Settings

Slide 188

Slide 188 text

Total Possible Keys 17,576 orientations x 6 arrangements x 100,391,791,500 Swaps = 10,586,916,711,696

Slide 189

Slide 189 text

10,586,916,711,696 • Assume 1 check per minute • 1 enigma machine = 20,142,535 years to crack • 12 enigma machines = 1,678,544 years • 24 enigma machines = 839,272 years • 48 enigma machines = 419,636 years • 96 enigma machines = 209,818 years • 38,291,799 enigma machines = 1 day to crack

Slide 190

Slide 190 text

By MesserWoland - own work by user:HandigeHarry based on previous version based on Image:Enigma wiring kleur.png by Matt Crypto originally nl:Afbeelding:Enigma_wiring_kleur.png by nl:User:Drdefcom, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1790479 The current flows from the battery [1] through the depressed bi-directional letter- switch [2] to the plugboard [3]. 
 The plugboard allows rewiring the connections between keyboard [2] and fixed entry wheel [4].
 Next, the current proceeds through the - unused, and therefore closed - socket [3] via the entry wheel [4] through the cross-wirings of the three (Wehrmacht Enigma) or four (Kriegmarine M4) rotors [5] and enters the reflector [6]. The reflector returns the current, via a different path, back through the rotors [5] and entry wheel [4], and proceeds through the plugboard again and through the plug 'S' connected with a cable [8] to plug 'D', and another bi-directional switch [9] to light-up the lamp. https://en.wikipedia.org/wiki/Enigma_machine#Electrical_pathway

Slide 191

Slide 191 text

Enigma Codebooks (Key Distribution) • Monthly books with a key for each day; e.g., • Plugboard: Q/W, E/R, T/Y, U/I, O/P, A/S • Rotor Arrangement: III, I, II • Initial Rotor Orientations: Q, C, W

Slide 192

Slide 192 text

Per-Message Keys • Using day key, send a message rotor orientation first. E.g., A, S, D • Send it at the beginning, twice for integrity. E.g., ‘asdasd’ = QWERTY • Receiver types QWERTY, sees ‘asdasd’ • Re-orients their rotors to A, S, D for the rest of the message • Minimizes amount of ciphertext created by day key

Slide 193

Slide 193 text

Is cracking Enigma possible? • New key used every message • Assume 1 check per minute • 38,291,799 enigma machines =1 day
 to crack 1 message

Slide 194

Slide 194 text

Cracking Enigma

Slide 195

Slide 195 text

Polish Biuro Szyfrów • Established after WWI to protect Poland from Russian & Germany • Received photographs of Enigma instruction manual from French espionage • Deduced rotor wirings • Explained usage of codebook A. Jankowski "Warszawa" Publisher:Wydawnictwo Polskie, Poznań, 
 Public Domain, https://commons.wikimedia.org/w/index.php?curid=1514113

Slide 196

Slide 196 text

Marian Rejewski • Focused on repeated message keys By Unknown - Rejewski's daughter's private archive, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=216461

Slide 197

Slide 197 text

THE CODE BOOK Simon Singh

Slide 198

Slide 198 text

Message Keys reveal Letter Relationships • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • (L,R) • (M,X) • (J,M) • (D,P)

Slide 199

Slide 199 text

Start building table 4th Letter: P M RX 1st Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ

Slide 200

Slide 200 text

Intercept tons of messages • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX… • LOKRGM… • MVTXZE… • JKTMPE… • DVYPZX…

Slide 201

Slide 201 text

After enough messages per day 4th Letter: FQHPLWOGBMVRXUYCZITNJEASDK 1st Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ 5th Letter: XUYCZITNJEASDKFQHPLWOGBMVR 2nd Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ 6th Letter: GBMVRXFQHPLWOUYCEASDKZITNJ 3rd Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ

Slide 202

Slide 202 text

Found “chain” loops 4th Letter: FQHPLWOGBMVRXUYCZITNJEASDK 1st Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 links: A-F-W-A

Slide 203

Slide 203 text

Found “chain” loops 4th Letter: FQHPLWOGBMVRXUYCZITNJEASDK 1st Letter: ABCDEFGHIJKLMNOPQRSTUVWXYZ 7 links: C-H-G-O-Y-D-P-C

Slide 204

Slide 204 text

After looking at enough days … • Day 1 Chains: • AD: 13 • BE: 10 3 • CF: 10 2 1 • Day 2 Chains: • AD: 9 • BE: 6 3 • CF: 6 2 1 • Day 1 Chains: • AD: 11 • BE: 9 2 • CF: 5 3 2 1

Slide 205

Slide 205 text

Marian Rejewski • Realized the # links in the chain were only caused by the rotor settings • Could try to break the 105,456 possible rotor settings, not all 10,000,000,000,000,000 possible day keys • 100,000,000,000 times easier By Unknown - Rejewski's daughter's private archive, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=216461

Slide 206

Slide 206 text

After looking at enough days … • Rotor Setting 1 Chains: • AD: 13 • BE: 10 3 • CF: 10 2 1 • Rotor Setting 2 Chains: • AD: 9 • BE: 6 3 • CF: 6 2 1 • Rotor Setting 3 Chains: • AD: 11 • BE: 9 2 • CF: 5 3 2 1

Slide 207

Slide 207 text

Cyclometer • Team checked each of 105,456 possible settings on replica Enigma machines and recorded what chains were generated by each • Took 1 year to complete • Could look up rotor settings by # of links in chains found in ciphertext http://www.cryptomuseum.com/crypto/cyclometer/index.htm

Slide 208

Slide 208 text

How to find the plugboard settings out of 100,391,791,500? • Plugboard: Un-plug all • Rotor Arrangement: III, I, II • Initial Rotor Orientations: Q, C, W • Type in ciphertext, see: • “Hlie Hitelr” • Swap E/L = Heil Hitler • “rettew” • Swap R/W = Wetter (weather)

Slide 209

Slide 209 text

1938 Enigma Updates • Germans changed the method for enciphering message keys • Existing catalog became useless • In new repeated message keys, sometimes the same plaintext letter enciphered to the same ciphertext letter 3 positions later • “females”

Slide 210

Slide 210 text

Polish Cryptographic Bombs • 6 machines for the 6 possible rotor arrangements • Each with 6 full Enigma rotor sets at top for the 6 characters of the repeated message key • Given a number of “females” to find, Bomba could recover settings in less than 2 hours

Slide 211

Slide 211 text

1939 Enigma Updates • Added 2 rotors = 60 (25) possible arrangements • Added 10 plugboard cables • 159,000,000,000,000,000,000 (267) possible keys • Up from 242 • Poland did not have resources to build enough bombs • Aug 16: Poland smuggled an Enigma & their research to the Allies • 2 weeks later, Hitler invaded Poland

Slide 212

Slide 212 text

Bletchley Park • More staff & resources than Biuro Szyfrów • New techniques • Try short-cuts like “cillies” - i.e., message keys commonly re-used by bad German Enigma operators • Rotors never used in same position 2 days in a row; eliminates half of rotor arrangements • Plugboard letters never swapped with neighbors By Draco2008 from UK - Bletchley Park, CC BY 2.0 https://commons.wikimedia.org/w/index.php?curid=19410523

Slide 213

Slide 213 text

Alan Turing • Mathematician & Professor & King’s College, Cambridge • Joined Bletchley Park Sep 4, 1939 - the day after Chamberlain declared war on Germany • Focused on what would happen if Germans stopped repeating day keys

Slide 214

Slide 214 text

“Cribs” • E.g., same weather report every day at 6am always contains “wetter” in the same position • See ciphertext of “ETJWPX” where “wetter” is • Try Engima settings to find which settings match

Slide 215

Slide 215 text

British Bombes • 36 rotors arrange in 3 banks of 12 • 210 bombes by the end of the war • Operated by 2,000 members of Women’s Royal Navy Service

Slide 216

Slide 216 text

US Bombes • 16 4-rotor Enigma equivalents • Spun 34x faster • 20 minutes running time for 4-rotor mode • 50 seconds running time for 3-rotor mode

Slide 217

Slide 217 text

• Multiple Enigmas • Air Force, Intelligence, Army, Navy • Broken Enigma kept quiet for 50 years • 九七式欧⽂印字機 “Purple” Cipher used by Japanese foreign office • Lorenz Cipher used by German High Command More WWII Crypto

Slide 218

Slide 218 text

Colossus • Inspired by Turings ideas and his bombe • 1,500 electronic valves - faster than electromechanical relay switches • Programmable

Slide 219

Slide 219 text

Computer Crypto

Slide 220

Slide 220 text

Computer Crypto Machines have to be built; software can be written Electronics faster than mechanics Binary numbers; not alphabets

Slide 221

Slide 221 text

ASCII Encoding,
 not encryption
 (like Morse code) E.g., A: 1000001 B: 1000010

Slide 222

Slide 222 text

Binary transposition For example, consider this short sentence. 01000110011011110111001000100000011001010111100001100001011011010111000001101100011001010010110000100000011000110 11011110110111001110011011010010110010001100101011100100010000001110100011010000110100101110011001000000111001101 101000011011110111001001110100001000000111001101100101011011100111010001100101011011100110001101100101 328 bits, 328! = 2.6 x 10684 possible bit re- arrangements Rail fence cipher with 2 rails 00010111010101000100011001000110010001100100011001000101011101110101011001000100010101000100011001100101010001010 11001110101010001000101010001110100010001110101010010101011110000001011110010011011110010101011001000001001101110 101101100110101011110000001110100010011101000011011000101111001110000011011011101011101011101010011011

Slide 223

Slide 223 text

Binary substitution (XOR) The XOR operator outputs a 1 whenever the inputs do not match, which occurs when one of the two inputs is exclusively true 0 XOR 0 = 0 0 XOR 1 = 1 1 XOR 0 = 1 1 XOR 1 = 0

Slide 224

Slide 224 text

Binary substitution (XOR) For example, consider this short sentence. 01000110011011110111001000100000011001010111100001100001011011010111000001101100011001010010110000100000011000110 11011110110111001110011011010010110010001100101011100100010000001110100011010000110100101110011001000000111001101 101000011011110111001001110100001000000111001101100101011011100111010001100101011011100110001101100101 Key: “Julius Caesar” 01001010011101010110110001101001011101010111001100100000010000110110000101100101011100110110000101110010 Output 10001100110111101110010001000000110010101111000011000010110110101110000011011000110010100101100001000000110001101 10111101101110011100110110100101100100011001010111001000100000011101000110100001101001011100110010000001110011001 00010000110100001111000011101010101010000000001000101001011010001010100000000000111010000001000010111

Slide 225

Slide 225 text

Binary substitution (XOR) For example, consider this short sentence. 010001100110111101110010001000000110010101111000011000010110110101110000011011000110010100101100001000000110001101 101111011011100111001101101001011001000110010101110010001000000111010001101000011010010111001100100000011100110110 1000011011110111001001110100001000000111001101100101011011100111010001100101011011100110001101100101 Key: “random” 1|0’s length of plaintext 000000111010001101000011010010111001100100000011100110110100001101111011100100111010000100000011100110110010101101 110011101000110010101101110011000110110010101000110011011110111001000100000011001010111100001100001011011010111000 0011011000110010100101100001000000110001101101111011011100111001101101001011001000110010101110010001 Output 100011001101111011100100010000001100101011110000110000101101101011100000110110001100101001011000010000001100011011 011110110111001110011011010010110010001100101011100100010000001110100011010000110100101110011001000000111001100100 010000110100001111000011101010101010000000001000101001011010001010100000000000111010000001000010111

Slide 226

Slide 226 text

Horst Feistel Immigrated from Germany in 1934 Placed under house arrest until 1944 during the war Invented “Lucifer” cipher for computer encryption Harassed by NSA to block his research until he went to IBM research lab

Slide 227

Slide 227 text

Lucifer Cipher Break message into 128-bit blocks 128-bit key In each of 16 rounds Break block in half the f-function is calculated using that round's subkey and the left half of the block. The result is then XORed to the right half of the block, which is the only part of the block altered for that round. After every round except the last one, the right and left halves of the block are swapped.

Slide 228

Slide 228 text

256 bit message (in ASCII) 01010100011010000110010100100000010101010101001101000001001000000100111001010011 01000001001000000111001101110100011011110111001001100101011100110010000001111001 01101111011101010111001000100000011101000111011101100101011001010111010001110011 0010000100100001

Slide 229

Slide 229 text

Break into 128-bit blocks 01010100011010000110010100100000010101010101001101000001001000000100111001010011010000010010000001110011011101000110111101110010 01100101011100110010000001111001011011110111010101110010001000000111010001110111011001010110010101110100011100110010000100100001 The USA NSA stor es your tweets!!

Slide 230

Slide 230 text

Generate 128-bit key awesomepassword! 01100001011101110110010101110011011011110110110101100101011100000110000101110011011100110111011101101111011100100110010000100001

Slide 231

Slide 231 text

Break block in half 01010100011010000110010100100000010101010101001101000001 The USA NSA stor 0100111001010011010000010010000001110011011101000110111101110010

Slide 232

Slide 232 text

Generate 72-bit sub-key awesomepassword! 01100001011101110110010101110011011011110110110101100101011100000110000101110011011100110111011101101111011100100110010000100001 a a 01100001 01100001 wesomep 01110111011001010111001101101111011011010110010101110000

Slide 233

Slide 233 text

Rotate key left 7 bytes password!awesome 01110000011000010111001101110011011101110110111101110010011001000010000101100001011101110110010101110011011011110110110101100101 7 bytes

Slide 234

Slide 234 text

XOR right half of block with last 8 bytes of subkey NSA stor 0100111001010011010000010010000001110011011101000110111101110010 awesomep 0110000101110111011001010111001101101111011011010110010101110000 0010111100100100001001000101001100011100000110010000101000000010

Slide 235

Slide 235 text

DES: 56-bit Lucifer* Possible key space limited to
 72,000,000,000,000,000 (256)
 so the NSA could break it if they needed to First standard for commercial computer cryptography The biggest issue remains: key distribution

Slide 236

Slide 236 text

Key distribution

Slide 237

Slide 237 text

Banks literally flew people around with code-books of keys

Slide 238

Slide 238 text

Whitfield Diffie MIT 1965 1965 - 1974:
 MITRE,
 Stanford AI Lab 1974: met with Martin Hellman

Slide 239

Slide 239 text

Martin Hellman NYU 1966 Stanford 1967-1969 IBM Watson Research Center 1968-1969 Encountered Horst Feistel

Slide 240

Slide 240 text

Alice, Bob, and Eve Alice and Bob need to communicate securely They need to share a secret They only have public channels between them “Eve is always listening” How can they share a secret without sharing it with Eve?

Slide 241

Slide 241 text

Mailing lock-boxes Alice locks a box with a pad-lock, keeps the key, sends box to Bob Bob adds his own pad-lock to the box, keeps the key, sends box back to Alice Alice removes her pad-lock, sends box back to Bob Bob removes his pad-lock Lock & unlock order is un-important, but for encryption & decryption, order is important

Slide 242

Slide 242 text

New Directions in Cryptography Published 1976

Slide 243

Slide 243 text

No content

Slide 244

Slide 244 text

Diffie-Hellman keys Used to generate a shared secret in public for later symmetric ("private-key") encryption Key identity: (gens1)s2 = (gens2)s1 = shared secret (mod prime) gen is an integer whose powers generate all integer in [1, prime) (mod prime) s1 and s2 are the individuals' "secrets", only used to generate the symmetric key Discrete logs are hard https://crypto.stackexchange.com/questions/2867/whats-the-fundamental-difference-between-diffie-hellman-and-rsa#2868

Slide 245

Slide 245 text

RSA Used to come up with a public/private key pair for asymmetric ("public-key") encryption Key identity: (m e ) d = m (mod n)
 (lets you recover the encrypted message) n = prime1 × prime2 (n is publicly used for encryption) φ = (prime1 - 1) × (prime2 - 1) e is such that 1 < e < φ, and (e, φ) are coprime
 (e is publicly used for encryption) d × e = 1 (mod φ) (the modular inverse d is privately used for decryption) Prime factorization is hard https://crypto.stackexchange.com/questions/2867/whats-the-fundamental-difference-between-diffie-hellman-and-rsa#2868

Slide 246

Slide 246 text

Elliptic Curve

Slide 247

Slide 247 text

Quantum

Slide 248

Slide 248 text

Quantum Analogy By !KrzysiekBu! - Own work, CC BY-SA 4.0 https://commons.wikimedia.org/w/index.php?curid=36293346

Slide 249

Slide 249 text

Math I don’t like it It’s too easy to get wrong DO NOT TRY TO MAKE YOUR OWN CRYPTO BE EXTRA CAREFUL WITH HOW YOU USE CRYPTO

Slide 250

Slide 250 text

No content