Session 14 – The Vigenère cipher European section – Season 03
Session 14 – The Vigenère cipher
A cipher text EBGIQ LSVRY ENJON CIUZC NNQPZ PCPQF LHIOB THVRC XITXG YAEYL NYPDP LNGCY XUPCK THFGM YXGBD FFNIS YZQBR FHCDC WSYRY ENJOK THFSL PPKDY MFAMM YWGXR CUVOQ ZHKCR SUVSL EBGWM CHKXE TNYSJ WVGSL LVQNW EBCDG DAQSL RNQLC SUPQC ONJOK LHIYG YAVYZ PBCXE PXJKB MYGXL LGGNK ZCUDT ZHNSN HCILW OIVSL RCHEL HCUON LLGXR DVWDF PQCCL ZNIYG YAVYC XVCBP LMUDF PHCWC THUYD LLCCR SUVGY DMVSJ WJQCQ TVNOZ JVGSL RBWXE FHFOP TNVYR SYYYP WXKXE PHGBY WUPNN LLVSA FFCBJ JIPDF LNDSR ZZKDI YIYXY DNJOB PUVRU LLTKL EBGGY DUNPP PXUZY YANOP LHFRC EIQUY XITON ZMKDG GYCZN CICMF EIVRC DCVEY ECQXY YXJKB NIPMC YNTKR PXJSQ XCPNM YNJON CIUZC NNQPL ZNDOG YAJKL RYFSL EBGWM CHKXE LHFWM DNRKP ECEEJ LLNIM YNJON CIUZC NNQPP PGQFG YACVJ EBGMP FGDVG YAOYP EUTPP ZGCBM FHFKQ EIPOG YBKCA PFNGY WFYSR SUUZM ZHUYD LLVRC HITUF LXVKI PHJSK QCXOU PYMCY YXTOB FWGNR SYUZM ZHVYQ ZGGDF THIVG VYCXY TFHSJ PZQBR FHCDC WSPYM YYGFC CWCWC EIERY YAGDF PVGNB THIRC CYQBC WMGDF PSYYS WXJKT PXKCA ZPGBC ONJOU ZLNNQ SYCFG PMVWY ENTOQ DCVGY DUNKP RYCXB SYCFW DNQXC EBCDU LMEEP CYPDJ JNJOM MDGMR ZZJSQ LNVOL ECQXQ LHFKR DIOON ZCPDY SOIOQ EURVC SUFLC PHJKK XYTOB THVYG EUUKL LHERM CZQBK LHCMJ PMOYG DNUKR OIYXD LWKXE EBGGY WFIBG AJGNR SYKBM YLKXE THDYR SBCXB DVTKA PXJSQ WYICY RUKXQ ENJOQ EIPOQ ZHGSR SYTCG OYCXB SYCFC OBKCQ SIWVB PLUMY FAJDD TLGKL OUTOB XCUDD TFNOB SCUFG DCQXZ FNVRC MFQMI DFKNM FNYSR SUHKG YNCXB THCZN CIRBG LNGDG YENSL RHQSQ PGQSQ EGCXY RYFDM PUUOG EUYKW QLQWR SYJYJ PUPNN PYTOB THUSB PUVDF PZCBC YXYKQ LHQDF PLDVM NECXB EBGWM CNCBY CIWXB TNNYM VYFCS DJKMG ZOUVW DNTYL RUPND CYURH FMVSL QLQXR ZZKDU LMCXC HMRYM YCVGY DMJSL JUURC DNWNG PXKDF PBGKP ONJOA WURZG YADOF THFRG XBGDS CHGNF TMJOY ONGXB ZHUDU LHISL RUNSR EFGBG QZQPY RIPIY YXUKU DYXOP LFQPR SYYKP OYPCU LNERG YAJSK EBTYS RBVRC MUTC
Session 14 – The Vigenère cipher
Standard frequencis in English
14 12 10 8 6 4 2 0
a b c d e f g h i j k l mn o p q r s t u v w x y z
Session 14 – The Vigenère cipher
Frequencies in the cipher
14 12 10 8 6 4 2 0 A B C D E F G H I J K L M N O P Q R S T U V WX Y Z
Session 14 – The Vigenère cipher
What we notice
Session 14 – The Vigenère cipher
What we notice
No frequency less than 1.3%.
Session 14 – The Vigenère cipher
What we notice
No frequency less than 1.3%. No frequency more than 10%.
Session 14 – The Vigenère cipher
What we notice
No frequency less than 1.3%. No frequency more than 10%. C and Y could stand for e, but just as well for a, h, i, m, o, r, s, t.
Session 14 – The Vigenère cipher
What we notice
No frequency less than 1.3%. No frequency more than 10%. C and Y could stand for e, but just as well for a, h, i, m, o, r, s, t. The global shape of the histogram.
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But,
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But, we know it’s in English ;
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But, we know it’s in English ; no language has such standard letter frequency histogram.
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But, we know it’s in English ; no language has such standard letter frequency histogram. Not a simple Caesar Cipher.
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But, we know it’s in English ; no language has such standard letter frequency histogram. Not a simple Caesar Cipher. Not a monoalphabetic substitution cipher.
Session 14 – The Vigenère cipher
What we can conclude
Not in English ? But, we know it’s in English ; no language has such standard letter frequency histogram. Not a simple Caesar Cipher. Not a monoalphabetic substitution cipher. Frequency analysis is not enough.
Session 14 – The Vigenère cipher
Blaise de Vigenère (1523 – 1596)
Session 14 – The Vigenère cipher
La cifra del Sig. Giovan Battista Belaso – Venetia 1553
Session 14 – The Vigenère cipher
The tabula recta
Session 14 – The Vigenère cipher
How to encipher a message
t h e w o r l d i s R A D I O R A D I O . . . . . . . . . . a f l a t d i s c R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to encipher a message
t h e w o r l d i s R A D I O R A D I O K . . . . . . . . . a f l a t d i s c R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to encipher a message
t h e w o r l d i s R A D I O R A D I O K H . . . . . . . . a f l a t d i s c R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to encipher a message
t h e w o r l d i s R A D I O R A D I O K H H E C I L G Q G a f l a t d i s c R A D I O R A D I R F O I H U I V S Session 14 – The Vigenère cipher
How to decipher a message
K H H E C I L G Q G R A D I O R A D I O . . . . . . . . . . R F O I H U I V S R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to decipher a message
K H H E C I L G Q G R A D I O R A D I O t . . . . . . . . . R F O I H U I V S R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to decipher a message
K H H E C I L G Q G R A D I O R A D I O t h . . . . . . . . R F O I H U I V S R A D I O R A D I . . . . . . . . . Session 14 – The Vigenère cipher
How to decipher a message
K H H E C I L G Q G R A D I O R A D I O t h e w o r l d i s R F O I H U I V S R A D I O R A D I a f l a t d i s c Session 14 – The Vigenère cipher
Your task
Encode and decode a quote about mathematics
Session 14 – The Vigenère cipher
Modular arithmetic
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26]
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡ 21 [26]
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡ 21 [26] 260 ≡
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡ 21 [26] 260 ≡ 0 [26]
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡ 21 [26] 260 ≡ 0 [26] 12 ≡
Session 14 – The Vigenère cipher
Modular arithmetic
Definition Two numbers a and b are congruent modulo n if their difference is a multiple of n. Then, we write a ≡ b[n]. 35 ≡ 9 [26] 47 ≡ 21 [26] 260 ≡ 0 [26] 12 ≡ 12 [26]
Session 14 – The Vigenère cipher
Modular arithmetic in cryptography
Each letter is associated to a two-digit number : 00 to A, 01 to B and so on until 25 to Z, This correspondance lets us transform any message into a string of two-digit numbers. t 19
h 07
e 04
w 22
o 14
r 17
l 11
d 03
i 08
s 18
f 05
Session 14 – The Vigenère cipher
l 11
a 00
t 19
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as
Session 14 – The Vigenère cipher
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as addition by 4 : L = l + 4.
Session 14 – The Vigenère cipher
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as addition by 4 : L = l + 4. t 19
h 07
e 04
w 22
o 14
r 17
l 11
d 03
i 08
s 18
f 05
Session 14 – The Vigenère cipher
l 11
a 00
t 19
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as addition by 4 : L = l + 4. t 19 23
h 07 11
e 04 08
w 22 26
o 14 18
r 17 21
l 11 15
d 03 07
i 08 12
s 18 22
f 05 09
Session 14 – The Vigenère cipher
l 11 15
a 00 04
t 19 23
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as addition by 4 : L = l + 4. t 19 23 23
h 07 11 11
e 04 08 08
w 22 26 00
o 14 18 18
r 17 21 21
l 11 15 15
d 03 07 07
i 08 12 12
s 18 22 22
f 05 09 09
Session 14 – The Vigenère cipher
l 11 15 15
a 00 04 04
t 19 23 23
Modular arithmetic in cryptography
The Caesar cipher A shift of 4 is modelized as addition by 4 : L = l + 4. t 19 23 23 X
h 07 11 11 L
e 04 08 08 I
w 22 26 00 A
o 14 18 18 S
r 17 21 21 V
l 11 15 15 P
d 03 07 07 H
i 08 12 12 M
s 18 22 22 W
f 05 09 09 J
Session 14 – The Vigenère cipher
l 11 15 15 P
a 00 04 04 E
t 19 23 23 X
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters.
Session 14 – The Vigenère cipher
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters. Code a message with the formula L = 3l + 12. t 19
h 07
e 04
w 22
o 14
r 17
l 11
d 03
i 08
s 18
f 05
Session 14 – The Vigenère cipher
l 11
a 00
t 19
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters. Code a message with the formula L = 3l + 12. t 19 57
h 07 21
e 04 12
w 22 66
o 14 42
r 17 51
l 11 33
d 03 09
i 08 24
s 18 54
f 05 15
Session 14 – The Vigenère cipher
l 11 33
a 00 00
t 19 57
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters. Code a message with the formula L = 3l + 12. t 19 57 69
h 07 21 33
e 04 12 24
w 22 66 78
o 14 42 54
r 17 51 63
l 11 33 45
d 03 09 21
i 08 24 36
s 18 54 66
f 05 15 27
Session 14 – The Vigenère cipher
l 11 33 45
a 00 00 12
t 19 57 69
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters. Code a message with the formula L = 3l + 12. t 19 57 69 17
h 07 21 33 07
e 04 12 24 24
w 22 66 78 00
o 14 42 54 02
r 17 51 63 11
l 11 33 45 19
d 03 09 21 21
i 08 24 36 10
s 18 54 66 14
f 05 15 27 01
Session 14 – The Vigenère cipher
l 11 33 45 19
a 00 00 12 12
t 19 57 69 17
Modular arithmetic in cryptography Affine ciphers Choose two numbers a, b and apply the transformation : L = al + b. Make sure that two different letters will be coded by two different letters. Code a message with the formula L = 3l + 12. t 19 57 69 17 R
h 07 21 33 07 H
e 04 12 24 24 Y
w 22 66 78 00 A
o 14 42 54 02 C
r 17 51 63 11 L
l 11 33 45 19 T
d 03 09 21 21 V
i 08 24 36 10 K
s 18 54 66 14 O
f 05 15 27 01 B
Session 14 – The Vigenère cipher
l 11 33 45 19 T
a 00 00 12 12 M
t 19 57 69 17 R
The Vigenère cipher in modular arithmetic
Session 14 – The Vigenère cipher
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together.
Session 14 – The Vigenère cipher
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R
h A
e D
w I
o O
r R
l A
d D
i I
s O
f R
Session 14 – The Vigenère cipher
l A
a D
t I
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19
h A 07
e D 04
w I 22
o O 14
r R 17
l A 11
d D 03
i I 08
s O 18
f R 05
Session 14 – The Vigenère cipher
l A 11
a D 00
t I 19
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19 17
h A 07 00
e D 04 03
w I 22 08
o O 14 14
r R 17 17
l A 11 00
d D 03 03
i I 08 08
s O 18 14
f R 05 17
Session 14 – The Vigenère cipher
l A 11 00
a D 00 03
t I 19 08
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19 17 36
h A 07 00 14
e D 04 03 07
w I 22 08 30
o O 14 14 28
r R 17 17 34
l A 11 00 11
d D 03 03 06
i I 08 08 16
s O 18 14 32
f R 05 17 22
Session 14 – The Vigenère cipher
l A 11 00 11
a D 00 03 03
t I 19 08 27
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19 17 36 10
h A 07 00 14 14
e D 04 03 07 07
w I 22 08 30 04
o O 14 14 28 02
r R 17 17 34 08
l A 11 00 11 11
d D 03 03 06 06
i I 08 08 16 16
s O 18 14 32 06
f R 05 17 22 22
Session 14 – The Vigenère cipher
l A 11 00 11 11
a D 00 03 03 03
t I 19 08 27 01
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19 17 36 10 K
h A 07 00 14 14 O
e D 04 03 07 07 H
w I 22 08 30 04 E
o O 14 14 28 02 C
r R 17 17 34 08 I
l A 11 00 11 11 L
d D 03 03 06 06 G
i I 08 08 16 16 Q
s O 18 14 32 06 G
f R 05 17 22 22 W
Session 14 – The Vigenère cipher
l A 11 00 11 11 L
a D 00 03 03 03 D
t I 19 08 27 01 B
The Vigenère cipher in modular arithmetic
To apply the key to a message, just add the two numbers together. t R 19 17 36 10 K
h A 07 00 14 14 O
e D 04 03 07 07 H
w I 22 08 30 04 E
o O 14 14 28 02 C
r R 17 17 34 08 I
l A 11 00 11 11 L
d D 03 03 06 06 G
i I 08 08 16 16 Q
s O 18 14 32 06 G
f R 05 17 22 22 W
Session 14 – The Vigenère cipher
l A 11 00 11 11 L
a D 00 03 03 03 D
t I 19 08 27 01 B
The true Vigenère cipher
t h e w o r l d i s R A D I O T H E W O K H H E C K S H E G a f l a t d i s c R L D I S A F L A R O O I L D N D C Session 14 – The Vigenère cipher