• Aucun résultat trouvé

The Vigenère cipher

N/A
N/A
Protected

Academic year: 2022

Partager "The Vigenère cipher"

Copied!
11
0
0

Texte intégral

(1)

The Vigenère cipher

Season 03

Episode 14

Time frame 1 period

Prerequisites :

Whatisamonoalphabetiipherandhowtodeipherit.

Objectives :

Introdue astronger, polyalphabeti,ipher.

See the problem itinvolvesfor deryption.

Materials :

Text iphered with a Vigenère square, alongwith its frequeny analysis.

Lesson.

Tabula reta.

Sentenes toenipher.

Beamer.

1 – A new cipher text 20 min

A ipher textis shown tothe lass, along with itsfrequeny analysis.The problems that

thisipherpresentsarehighlighted,mainlythefatthatfrequenyanalysisisnotworking.

2 – The Vigenère cipher 20 mins

The Vigenère square is desribed and aexample is shown.

3 – Enciphering and deciphering 20 mins

Eah student piks up a sentene and hoses a key word toenipher it. It isthen sent to

someone else inthe lass, along withthe key, tobedeiphered.

4 – Can you break it ? 15 mins

Brainstormingsession : howto break the Vigenère ipher?

(2)

The Vigenère cipher

Season 03

Episode 14

Document Cipher

The ipher

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

(3)

Letter frequenies

Standard frequenies inEnglish

0 2 4 6 8 10 12 14

a b de f g

hi j

kl m no pq

r s t uv wx y

z

Frequenies inthe ipher

0 2 4 6 8 10 12 14

ABCDEFGHI J KLMNOP Q

RSTUVWXYZ

Analysis

What we notie

Noletterhasafrequenylessthan1.3%,whihisinonsistantwiththeletterfrequenies in English.

Noletterhasafrequeny morethan10%,sothere'snoobviousandidatefore.Itould

be C' or Y, but these two letters ould justas wellbea, h,i, m,o, r,s, t.

The histogramdoesn't lookat alllikethe standard histogram.

What we an onlude

The languageused ould be something else then English, but

we knowthat the originaltext wasin English;

nolanguagehas suh standard letter frequeny histogram.

It's obviously not asimple Caesar Cipher.

It doesn't seem to be amonoalphabetisubstitution ipher.

A simple frequeny analysis is not enough tobreak it.

(4)

The Vigenère cipher

Season 03

Episode 14

Document Lesson

History and onept

TheVigenèreipherwasrstdesribedbyGiovanBattistaBellasoinabookpublished

in1553.It isalsoknown asLeChire Indéhirable,asitseemedforalongtime thatit

wasunbreakable.In the 19thentury, itwas mistakenlyattributedtoBlaisede Vigenère,

a Frenh diplomatandryptographer fromthe 16th entury.Vigenère did not inventthe

so-alled Vigenèreipher, but he did devise astronger autokey based onthe same table.

Messages are enrypted with the help of a tabula reta, also alled Vigenère square,

or Vigenèretable. It onsistsof the alphabetwritten out 26times indierent rows, eah

alphabetshifted ylially to the left ompared to the previous alphabet, orresponding

to the 26possible Caesariphers.

(5)

How to enipher a message

Atdierentpointsintheenryption proess, theipheruses adierentalphabetfrom

one of the rows. The alphabetused ateah point depends ona repeatingkeyword.

Plain text : The world is aat disk. Code word : RADIO

Enryption proess :

The rst letter is enipheredusing the lineof the letter R :t is oded into K.

Forthe seondletter, we use the line of the letter A :h is oded intoH.

Forthe thirdletter, we use the lineof the letter D : eis oded intoH.

Forthe fourth letter,weuse the lineof the letter I : w isoded intoE.

Forthe fthletter, we use the line ofthe letter O: ois oded into C.

Forthe sixthletter, we use the lineof the letterR : r isoded intoI.

Forthe seventh letter,we use the lineof the letter A : lis oded into L.

Andso on...

It'sinterestingtonotiethattheletters handehave bothbeenenipheredintoH!So

the most ommon letter in English has been eniphered with the same letter as another

one, muh less ommon. On another hand, another e in the text may not be eniphered

intoH.

Spaesandpuntuationmarks arenormallynotonsidered beforeenryption,andthe

plain text may be given ingroups of 5 letters,to make deryption even harder, aswords

of one or two letters are easy tospot inEnglish.

Belowis apratial way to present this proess, with the ipher textin the lastrow.

t h e w o r l d i s a f l a t d i s

R A D I O R A D I O R A D I O R A D I

K H H E C I L G Q G R F O I H U I V S

How to deipher a message

To deipher a message enrypted with this method,you need to know the key. Write

down the enrypted message and, below, repeat the key word as many times as needed.

Inathirdrow, wewillwritehedeipheredmessage. Thetableisthesameastheoneused

for enryption, but upside down.

K H H E C I L G Q G R F O I H U I V S

R A D I O R A D I O R A D I O R A D I

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

To deode the rst letter, look up in the tabula reta the letter K in the rowR. You

nd the letter t. For the seond letter, look up the letter H in the row A. You nd the

letter h, and soon.

(6)

Season 03Episode 14The Vigenère cipher

5

A mathematial view

The Vigenère ipher an be implemented easily using numbers instead of letters and

modular arithmeti.

In modular arithmeti, we only onsider positive integers strily lower than a given

number, alled the modulus. For example, if the modulus is 26, we will only use the

integers from 0 to 25. Any whole number

n

is ongruent to one of these integers : the remainder of the division of

n

by the modulus. For example, if we divide 47 by 26, the remainder is 21,as

47 = 1 × 26 + 21

. Wesay that 47and 21 are ongruent, and write

47 ≡ 21 [26] .

Eahletteris assoiatedtoatwo-digitnumber:00toA,01toBand soonuntil25to

Z,This orrespondane lets ustransformany messageintoastringof two-digit numbers.

t h e w o r l d i s a f l a t d i s

19 07 04 22 14 17 11 03 08 18 00 05 11 00 19 03 08 18 10

The key is alsowrittenas astring of numbers : RADIO beomes 1700 0308 14.

To enipher the message, write the numerial version in atable and, in aseond row,

write down the numerial key repeatedly, as we did previously with the alphabetial

messages. Then, is a third row, simply add the numbers in eah olumn, reduing the

results modulo 26.

19 07 04 22 14 17 11 03 08 18 00 05 11 00 19 03 08 18 10

17 00 03 08 14 17 00 03 08 14 17 00 03 08 14 17 00 03 08

10 07 07 04 02 08 11 06 16 06 17 05 14 08 07 20 08 21 18

The numerial enypted message ouldthen beturned bak intoanalphabetialone,

but it's useless.Sending anumerialmessageis just asseure as analphabetial one.

Advantages and drawbaks

T

he so-alled Vigenère ipheroered ahigherlevelof serey thanthe monoal-

phabetiiphers.Itwasonsideredunbreakableforafewenturies,asstraightforward

frequeny analysis didn't work on it. Still, it was never widely used beause it was too

time-onsuming toimplement.When alotofmessages had tobesent inashorttime, for

example duringawar,armies ouldnot aord the timeneeded toenipher anddeipher.

The Vigenère ipher was in fat broken by some ryptanalists as soon as in the 16th

entury.Around 1830,CharlesBabbage broketheso-alledVigenèreipheraswellasthe

stronger auto-key ipher atually devised by Vigenère. As his disovery was kept seret

by the British government, itwas mistakenly attributed to Friedrih Kasiski, a Prussian

infantryoer, who made the same disovery some years afterBabbage.

It still took a large amount of time, intuition and luk to break it, so it was still

a quite seure system. With the advent of omputers, breaking a Vigenère ipher has

beomemuheasierandquiker. It'sinterestingtonote thatCharlesBabbage, oneofthe

rst to break the Vigenèreipher, also introdued the main onepts that would lead to

omputers.

Animportantweaknessofthisipheristherepetitionofthekey.Thisreatesaperiodi

use of the same monoalphabeti ipher. A soon as the length of the key is known, the

iphertextan bedivided aordingtothe period,and eahgroupof letterstreatedwith

(7)

The real Vigenère auto-key ipher

V

igenère didn't invent the ipher that bears his name,but he did devise a

stronger one, with no repetition of the key, and therefore no periodiity in the en-

ryptement, making itreally immuneto frequeny analysis.

The trik is to use the key only to enrypt the rst few letters of the message, and

then to use the message itself,hene the name auto-key.

Usingthesameexampleasbefore,wewillenrypttherst velettersusingthe letters

of the key RADIO, and will then use the letters of the message itself, as shown in the

followingtable :

t h e w o r l d i s a f l a t d i s

R A D I O T H E W O R L D I S A F L A

K H H E C K S H E G R O O I L D N D C

Toderypt theiphermessage, wemust rstuse thelettersof thekey. Whenwereah

the end ofthe key,we usethe the lettersof theplain text, inthe same orderasthey were

derypted.

(8)

Th e V ig e n è re c ip h e r S e a so n 0 3 E p is o d e 1 4 D o c u m e n t Ta b u la re c ta

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

A 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

B 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

C 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

D 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

E 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

F 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

G 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

H 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

I 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

J 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

K 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

L 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

M 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

N 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

O 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

P 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

Q 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

R 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

S 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

T 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

U 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

V 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

W 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

X 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

Y 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

Z 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

(9)

Document 1

Sentenes toenipher

A mathematiian is a mahine for turning oee into theorems.

(Paul Erdös)

Perfet numbers like perfet men are very rare. (René Desartes)

Mathematiians are born, not made. (Henri Poinaré)

It is impossible to be a mathematiian without being a poet in soul.

(Soa Kovalevskaya)

The searh for truth is more preious than its possession. (Albert Einstein)

If there is a God, he's a great mathematiian. (Paul Dira)

Math is like love a simple idea but it an get ompliated. (R. Drabek)

God made the integers; all the rest is the work of man.

(Leopold Kroneker)

There are three types of people in this world : Those who an ount, and

those who an't. (Anonymous)

The essene of mathematis is not to make simple things ompliated, but

to make ompliated things simple. (S. Gudder)

The human mind has never invented a labor-saving mahine

equal to algebra. (Anonymous)

Go down deep enough into anything and you will nd mathematis.

(10)

Season 03Episode 14The Vigenère cipher

9

Mathematis is as muh an aspet of ulture as it is a olletion of

algorithms. (Carl Boyer)

Musi is the pleasure the human mind experienes from ounting without

being aware that it is ounting. (Gottfried Leibniz)

Mathematis is the supreme judge; from its deisions there is no appeal.

(Tobias Dantzig)

I used to love mathematis for its own sake, and I still do, beause it allows

for no hyporisy and no vagueness. (Stendhal)

If there is a God, he's a great mathematiian. (Paul Dira)

Philosophy is a game with objetives and no rules. Mathematis is a game

with rules and no objetives. (Anonymous)

Mathematis onsists in proving the most obvious thing

in the least obvious way. (George Polya)

Obvious is the most dangerous word in mathematis. (E.T. Bell)

Arithmeti is being able to ount up to twenty

without taking o your shoes. (Mikey Mouse)

I have hardly ever known a mathematiian who was apable of reasoning.

(Plato)

You know we all beame mathematiians for the same reason :

we were lazy. (Max Rosenliht)

(11)

These days, even the most pure and abstrat mathematis

is in danger to be applied. (Anonymous)

What is a rigorous denition of rigor? (Anonymous)

Only two things are innite, the universe and human stupidity, and I'm not

sure about the former. (Albert Einstein)

There are 10 kinds of people in the world, those who understand binary

math, and those who don't. (Anonymous)

Statistis : the mathematial theory of ignorane. (Morris Kline)

Most people use statistis the way a drunk uses a lamp post, more for

support than enlightenment. (Anonymous)

Geometry is the siene of orret reasoning on inorret gures.

(George Polya)

Without geometry life is pointless. (Anonymous)

Inspiration is needed in geometry, just as muh as in poetry.

(Aleksandr Pushkin)

Calulus has its limits. (Anonymous)

Mathematis is the siene whih uses easy words for hard ideas.

(Anonymous)

A mathematiian who is not also a poet will never be

a omplete mathematiian. (Karl Weierstrass)

Références

Documents relatifs

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

Something began when the Guild of Assassins enrolled Mister Teatime, who saw things differently from other people, and one of the ways that he saw things differently from other

The evidence reported in leisure studies has also suggested that digital technologies have altered leisure activities performed at home, and may also have changed the

When accessing a database through SQL from an ordinary programming language, such as C# or Java, there is typically a strict segregation between data under the control of the DB

• Commençons par fabriquer une fonction CleRepetee(sentence,key) qui permet de renvoyer une chaîne de caractères qui sera composée de la chaîne key écrite autant de fois qu’il y

Il s’agit d’une fonction qui permet de créer n’importe quelle ligne de la table de

Dans le chiffrement de Jules César, chaque lettre est remplacée par la lettre qui la suit trois rangs plus loin dans l’alphabet, les trois dernières lettres étant remplacées par

 Pour chaque lettre du mot à coder, on calcule le reste y de la division euclidienne de x + z (où z est le rang dans l’alphabet de la lettre de la clé) par 26.  On note la