B1 · Episode 5 · 4:56
Cracking the Vigenère Cipher
This episode explains how the Vigenère cipher works—a polyalphabetic substitution technique where each plaintext letter maps to different ciphertext letters depending on its position and a shared secret key. It then explores cryptanalysis strategies, especially how grouping ciphertext letters by key length enables frequency analysis within each group.
Source:stph / aperi.tube · License:CC BY-SA 4.0
Transcript
Alors on va encore compliquer les choses.
So, we’re going to make things even more complicated.
Maintenant, nous allons passer à une technique qui s'appelle le chiffre de Vigenère.
Now, we’ll move on to a technique called the Vigenère cipher.
Cette technique n'est plus une substitution monoalphabétique,
This technique is no longer monoalphabetic substitution—
une lettre dans le clair égale une lettre dans le chiffré,
that is, one letter in the plaintext always equals one letter in the ciphertext—
c'est une substitution polyalphabétique où une même lettre dans le clair peut
instead, it’s polyalphabetic substitution, where
apparaître sous différentes lettres dans le chiffré en fonction de sa position.
the same letter in the plaintext can appear as different letters in the ciphertext, depending on its position.
Et pour ce chiffre de Vigenère,
For the Vigenère cipher,
on a besoin que la personne qui chiffre le message et que la personne qui déchiffre
the person encrypting the message and the person decrypting it
le message partagent un secret sous forme de clé.
must share a secret in the form of a key.
Je vais vous montrer comment ça marche.
I’ll show you how it works.
À droite, le message que nous voulons faire passer: « Il fait beau aujourd'hui»,
On the right is our plaintext message: “Il fait beau aujourd’hui” (“The weather is nice today”),
et la clé secrète que partagent l'émetteur et le récepteur,
and the secret key shared by sender and receiver
c'est le mot« Paris». Alors, j'écris mon message et je réécris ensuite la clé autant
is the word “Paris”. So, I first write down the plaintext,
de fois que nécessaire, en dessous des lettres du message.
then rewrite the key repeatedly below the plaintext letters, as many times as needed.
Et ensuite, je vais utiliser le grand tableau qui se trouve à gauche,
Then, I’ll use the large table on the left
de la manière suivante.
in the following way.
La première lettre du chiffré, je vais aller chercher.
To find the first ciphertext letter,
à la ligne I, parce que c'est la première lettre de mon message,
I go to row I—because that’s the first letter of my plaintext—
et à la colonne P, parce que c'est la lettre de la clé qui lui est associée,
and column P—because that’s the corresponding key letter—
et je vais trouver dans cette case- là la lettre X.
and there, in that cell, I find the letter X.
Ce sera donc le X, la première lettre du message chiffré.
So, X becomes the first letter of the ciphertext.
Ensuite, à la ligne L, colonne A, je trouve la lettre L.
Next, at row L, column A, I find the letter L.
Ligne F, colonne R, je trouve le W.
At row F, column R, I get W.
Ligne A, colonne I, je trouve le I.
At row A, column I, I get I.
Ligne I, colonne S, je trouve le A.
At row I, column S, I get A.
Ligne T, colonne P, je trouve le I.
Row T, column P: I find the letter I.
Ligne B, colonne A, je trouve le B.
Row B, column A: I find the letter B.
Ligne E, colonne R, je trouve le V, etc.
Row E, column R: I find the letter V, and so on.
Voilà, j'ai fabriqué mon message chiffré par la technique de Vigenère.
There we go—I’ve created my ciphertext using the Vigenère cipher technique.
Maintenant, on se place du point de vue du cryptanalyste.
Now, let’s adopt the cryptanalyst’s perspective.
Alors le cryptanalyste commence par se dire:
So the cryptanalyst begins by thinking:
ce que je faisais avant par analyse des fréquences, je ne peux plus le faire.
What I used to do—frequency analysis—I can no longer do.
Parce que maintenant, quand j'ai un E dans le chiffré,
Because now, when I see an E in the ciphertext,
des fois il peut représenter un B, des fois un X,
it sometimes stands for B, sometimes for X,
des fois encore une autre lettre. Donc les fréquences d'apparition des lettres dans
and sometimes for yet another letter. So the frequencies of letters appearing in the ciphertext,
le chiffré ne suivent plus les fréquences d'apparition des lettres dans le clair.
no longer match the frequencies of letters in the plaintext.
Malgré tout, on peut dire la chose suivante:
Nonetheless, we can state the following:
j'ai représenté ici le message, la clé et le chiffré,
I’ve displayed here the plaintext, the key, and the ciphertext,
et j'ai groupé les lettres par couleur.
and grouped the letters by color.
À une couleur est associée une même lettre de la clé.
Each color corresponds to the same key letter.
Le groupe rouge, c'est le groupe des lettres qui sont associées au P de la clé,
The red group contains all letters paired with the key letter P,
le groupe vert, le groupe des lettres qui sont associées au A de la clé,
the green group, all letters paired with the key letter A,
le groupe bleu au R, le groupe jaune au I, et le groupe orange au S.
the blue group with R, the yellow group with I, and the orange group with S.
Eh bien, on peut constater que si j'ai une même lettre dans le chiffré,
Well, we can observe that if the same letter appears in the ciphertext,
par exemple, regardez les i jaunes,
for example, look at the yellow i’s,
qui correspondent à une même lettre pour la clé, ici le I de la clé.
they all correspond to the same key letter—in this case, I.
C'est un hasard si c'est un I dans le chiffré et un I pour la clé.
It’s purely coincidental that both the ciphertext letter and the key letter happen to be I.
Ce qui est important, c'est que les deux colonnes aient la même lettre en ligne,
What matters is that both columns share the same letter in the same row—
le I du chiffré et le I de la clé,
namely, the I in the ciphertext and the I in the key—
alors je vais trouver la même lettre dans le clair.
then I’ll obtain the same letter in the plaintext.
Vous avez un autre exemple, si vous regardez.
You have another example, if you look closely.
Dans le groupe orange, vous voyez deux M
In the orange group, you see two M’s,
qui sont associés à deux S de la clé,
each associated with an S in the key,
eh bien tous les deux représentent le U du clair.
and both represent the letter U in the plaintext.
Alors, ça, comment je vais essayer de l'utiliser?
So, how can I try to use this?
En fait, si je connaissais la taille de la clé.
In fact, if I knew the key length,
Je pourrais faire des groupes, comme je vous ai montré ici avec les couleurs,
I could form groups, as I showed you here with colors,
et faire des analyses de fréquences par groupe.
and perform frequency analysis separately for each group.
Parce que si je regarde uniquement les lettres orange par exemple,
For instance, if I look only at the orange letters,
eh bien l'apparition d'un M
then each occurrence of an M in the ciphertext,
dans le chiffré correspond bien à l'apparition d'une même lettre dans le clair,
corresponds precisely to the appearance of the same letter in the plaintext,
ici le U. Donc les fréquences d'apparition au sein d'un groupe d'une même couleur
here, the letter U. So, within a single-color group,
doivent suivre les fréquences d'apparition dans le clair.
the letter frequencies must match those of the plaintext.
Le problème, c'est que je ne connais pas la taille de la clé,
The problem is that I don’t know the key length,
alors je vais simplement tester toutes les tailles de clé.
so I’ll simply test all possible key lengths.
Voyons ce que ça donne lorsque je suppose une taille de clé qui est mauvaise.
Let’s see what happens when I assume an incorrect key length.
Je vous ai remis ici le message chiffré.
Here again is the ciphertext.
On a supposé que la taille de la clé était 3.
We’ve assumed the key length is 3.
Je ne connais pas les lettres de la clé, je suppose qu'elle
I don’t know the key’s actual letters—I’ll call it
s'appelle alpha, beta, gamma.
alpha, beta, gamma.