How the "Unbreakable" Vigenere Cipher Was Broken

  Рет қаралды 5,152

Math The World

Math The World

Күн бұрын

Пікірлер: 47
@AKW91
@AKW91 6 ай бұрын
Just as a note: The One-Time-Pad is not only improbable to solve by guessing the key, it is impossible. Since you could decipher the encrypted text to any other text of that length, you have no way of checking, wether you had the right key.
@canaDavid1
@canaDavid1 6 ай бұрын
Indeed. The one time pad is not just cryptographically secure, but information theoretic secure. Even an attacker with infinite computational power cannot decipher it.
@ilayohana3150
@ilayohana3150 Ай бұрын
If done right​@@canaDavid1
@darkgobelin4439
@darkgobelin4439 6 ай бұрын
this channel needs more subscribers 😭😭😭
@AaronToponce
@AaronToponce 6 ай бұрын
Key: paradox Plaintext: So what is the answer? In truth, the when-will-I-use-this question is unfair for the teacher. She doesn’t know when you specifically will use it because she can't see into your future. The difficulty in answering this question lies with an implicit assumption hidden beneath the question. The student has an idea of the kinds of situations that she will encounter in her life, and when the response from the teacher doesn’t apply to any of these situations, the mathematics seems useless. But it is fraudulent to assume that we know at a moment of reflection the kinds of situations in which we might use something. Why? Because we don’t know what we don’t know.
@YunxiaoChu
@YunxiaoChu 6 ай бұрын
………..
@Pystro
@Pystro 6 ай бұрын
(Knowing that it's much easier to decrypt a message encrypted by another message) I would have shifted the message by a certain amount (say 30 positions) and subtracted that from the original message. If you guessed an amount that corresponds to the length of the key, then the result is a (part of the) message minus another (part of the) message. And if you run frequency analysis on it, you can use the fact that E-E will be the most common combination of two letters followed by things like E-S, S-E and S-S. All frequencies will be much closer to 1/26th than in a simple substitution cypher, but will still be detectable for a long enough message. This is kind of like what the technique around 4:50 does, except that that only considers occurrences of E-E and S-S, but ignores E-S and S-E.
@jcorey333
@jcorey333 6 ай бұрын
Mathematical cryptography was my favorite math class in college! I like cryptographic stuff, it's really interesting, and an oddly practical use case for number theory.
@mgancarzjr
@mgancarzjr 6 ай бұрын
It can be made stronger by modifying the encryption key at each round of encryption. For example, the cypher can encrypt the first set of letters. The original letters can encrypt the next set, or the encrypted first set of letters can encrypt the next set. Any combination would work so long as the first set of letters could be decrypted using the key. AES: CBC, PCBC, CFB, and OFB use such a method. The key could also be modified by some agreed method between each round as well: CTR.
@MathTheWorld
@MathTheWorld 6 ай бұрын
Thanks for sharing this! That is clever (which is why I never thought of it).
@SobTim-eu3xu
@SobTim-eu3xu 6 ай бұрын
As a cryptographer I love this video
@MathTheWorld
@MathTheWorld 6 ай бұрын
Thank you!
@Petch85
@Petch85 6 ай бұрын
Cryptography is just some of the most fun math.❤
@ElusiveEel
@ElusiveEel 6 ай бұрын
I've heard of a one-time-pad hard drive getting shipped by Amazon or some similar company as a worst-case post-quantum encryption method. In that case it would be much easier to securely send one large hard drive for many messages than the individual messages themselves.
@Pystro
@Pystro 6 ай бұрын
I wonder how much stronger the Vigenere Cipher would be if you used a "secret" alphabet order. In that case you can't decode a whole group that corresponds to one of the letters in the key at once.
@ilayohana3150
@ilayohana3150 Ай бұрын
Youre talking about substitution cipher, its pretty easy to break using a statistical attack
@Pystro
@Pystro Ай бұрын
@@ilayohana3150 Yup, technically that would be equivalent to successive application of a substitution cypher and the vigenere cypher (and the inverse of the substitution cypher). And yes, the substitution cypher would be quite trivial to break, *if* you already have the vigenere cypher broken. But the vigenere cypher attack that's presented in this video uses the shortcut (5:26) that the common letters are _specific_ distances apart. And the program at 5:50 actually relies on that property.
@ilayohana3150
@ilayohana3150 Ай бұрын
@Pystro all the methods I learnt boil down to some way to calculate the key length according to the distance between the letters. He didn't detail the whole method of colouring the letters and finding the GCD of all the distances, but yeah you always do a statistical attack with the result of that.
@supalupallama
@supalupallama 6 ай бұрын
Great video!
@FrankAnzalone
@FrankAnzalone 6 ай бұрын
I can send you a otp using the square root of 2 I use as many digits as I have in the message you would know the length of the message and the next message would continue from where we left off
@foobar9220
@foobar9220 6 ай бұрын
You have now introduced a path dependency. If one message gets lost or even just a part of it, you will no longer be able to decipher any subsequent message. And while that approach has a certain elegance in the age of computers, your OTP is not random. The fact that makes it so easy to transport, makes it also vulnerable to brute forcing after educated guess. De facto you are using the same pad multiple times, so once it is broken, all your messages are broken. Which is in stark contrast to true OTP where each message is independent and has to be broken separately.
@FrankAnzalone
@FrankAnzalone 6 ай бұрын
I partially agree with you I did not intend to start from the very beginning for each message I intended for the next message to pick up from where the last left off
@mathbrotherc
@mathbrotherc 6 ай бұрын
Here is a variation of your method. Pick a root, such as a 5th root, that the two communicators will use, then the secret key can just be a number that is not a perfect 5th root. You can use the infinite decimal representation for the encoding and decoding.
@troncooo409
@troncooo409 6 ай бұрын
Additional you can provide a function to step though your 'magic' number
@Pystro
@Pystro 6 ай бұрын
This is kind of what stream ciphers do. They use an algorithm or function (in this case "decimal expansion of the square root of the secret number") to turn a short secret (in this case the single digit number "5") into a stream of arbitrary length. And that stream can then be used like a one time pad. The only problem here is that the secret key "5" is very easy to guess (it's the 5th key anyone brute forcing this guess would try), and that "decimal expansion of the square root" is not introducing very much randomness.
@mathbrotherc
@mathbrotherc 6 ай бұрын
What about this method. Both the sender and user have the same dictionary. Then the secret key could just be a word in the dictionary, but that is not what you use to code and decode the message. Both use the letters that come right after the key word in the dictionary and go as far as needed for the message. This makes it a one-time pad, but solves the problem of passing a long secret key.
@troncooo409
@troncooo409 6 ай бұрын
Just as said by someone. Use the square root of 2 or pi or any other irregular pattern. Pick a starting point and some function to move through the digits and you can code/decide your secret message
@mathbrotherc
@mathbrotherc 6 ай бұрын
​@@troncooo409 but someone pointed out that if a message gets lost, or there is just one error, then it throws off the ability to decode. Although with computers, I guess you could just keep moving down the infinite decimal one space at a time until you get a comprehendible message.
@HeavyMetalMouse
@HeavyMetalMouse 6 ай бұрын
This is reminiscent of a 'book code' - essentially, you and your partner both own a copy of a particular book, and agree on some way to know what page to use to encode-decode a given message, then use the text of that page as your encoding-text for any messages you send. If the middleman attempting to break your code doesn't know what book you're using, nor how you are choosing your page, then they won't be able to break the cypher, since the page text will generally be longer than any message you will send this way.
@freshrockpapa-e7799
@freshrockpapa-e7799 6 ай бұрын
Please put the secret message in a comment or the description, thanks!
@mathbrotherc
@mathbrotherc 6 ай бұрын
Ok, I will put it in the description. Just give me a few minutes.
@MathTheWorld
@MathTheWorld 6 ай бұрын
@freshrockpapa-e7799 Here is the code: Ho nhdh fh tye dbplei? Iq hojty, tks twee-wlzi-X-uje-wvfh qlevhfdn zs xbcpii frf qwe kedqetr. Jhh rltse’t nbll wyeq mlj sgefwcxcrlom txlc uvs fi bvcdipt sye fok'i sve lbqd yfuu triuie. Wvb siwflqratp iq okhwvrlbd ihzs tibhtzoq zfts niwv xc idpowzxt rsvijetzoq vfsdvn esktakh wvb fuvswwlc. Tye vhrseet kop pn zdho lu tye nwkss ff vwqjakirbp ihrt vvb licl hbzduethf fc hvr owct, aed zvbc tye uspeoesh todm khh hbpcyeu rltse’t ddmay ko dbv df khhgb hikudhfdnj, tks jptyepoqxcj shsjh ujeosph. Blt lh fh fiaxrraeet wc xhslmh hept ne nbll ak a pcjtnk oi fbulvcwwlc tye nwkss ff vwqjakirbp xn nhlqe le dijvq jsv srabihznj. Ken? Bvcdipt wv drb’q znfw zvxi wv drb’q znfw.
@renerpho
@renerpho 6 ай бұрын
Spoiler warning... The key is "paradox".
@renerpho
@renerpho 6 ай бұрын
There are two instances of the word "tye", which stick out as likely meaning "the", and the word "Ken?" almost certainly starts with "Wh". From that, we get the partial strings "ara" and "ox" as part of the key word. The two instances of "tye" are 224 characters apart, so the key length is probably a factor of 224 (2,4,7,8,14,16,28). A length of 2 or 4 is impossible, given the partial strings known. With a length of 8, the positions of "ara" and "ox" in the key would collide. This leaves 7, 14 or 16 as the possible key lengths. If it's 7 then the 2nd and 4th character should be an A, and every letter that's at 2 or 4 (mod 7) shouldn't be shifted. Checking the frequency of 2nd and 4th characters reveals that there are 6 and 17 E's respectively at those positions, the 4th and 1st most of any character. This makes it likely that the length is indeed 7. Using this, the beginning of the text becomes "?o wh?t i? the". This quite obviously ends in "what is the", and the next word is "ans?er", revealing the final missing letters of the key: Paradox.
@renerpho
@renerpho 6 ай бұрын
So what is the answer? In truth, the when-will-I-use-this question is unfair for the teacher. She doesn’t know when you specifically will use it because she can't see into your future. The difficulty in answering this question lies with an implicit assumption hidden beneath the question. The student has an idea of the kinds of situations that she will encounter in her life, and when the response from the teacher doesn’t apply to any of these situations, the mathematics seems useless. But it is fraudulent to assume that we know at a moment of reflection the kinds of situations in which we might use something. Why? Because we don’t know what we don’t know.
@renerpho
@renerpho 6 ай бұрын
Alternatively: In the last sentence, "drb’q" appears twice, 14 characters apart (making the key length either 7 or 14), and the "b'q" must be "n't". This again gives the partial string "ox" at the end of the key word.
@renerpho
@renerpho 6 ай бұрын
Or we may just guess at this point that "?ara?ox" is "paradox", and be done.
@renerpho
@renerpho 6 ай бұрын
Lesson: Having a key word that includes two instances of the letter A a distance of 1 or 2 apart risks revealing the word "the" in the message.
@axiezimmah
@axiezimmah 6 ай бұрын
I dont really understand how you're supposed to spot the "coincidences" if you can only see the encoded text. Although on the 3rd line I do notice "Ebi" and 9 letters later again "Ebi". Both of them just happen to be the word "the".
@panxel8615
@panxel8615 6 ай бұрын
Yippe
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,5 МЛН
Cryptanalysis of Vigenere cipher:  not just how, but why it works
15:33
Proof of Concept
Рет қаралды 33 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Math News: The Fish Bone Conjecture has been deboned!!
23:06
Dr. Trefor Bazett
Рет қаралды 171 М.
Creating Your Own Programming Language - Computerphile
21:15
Computerphile
Рет қаралды 191 М.
Sherlock Holmes NEVER 'Deduced' Anything
29:38
Another Roof
Рет қаралды 348 М.
AES: How to Design Secure Encryption
15:37
Spanning Tree
Рет қаралды 177 М.
Flaw in the Enigma Code - Numberphile
10:58
Numberphile
Рет қаралды 4,9 МЛН
The Mystery of the Copiale Cipher
10:23
hochelaga
Рет қаралды 636 М.
Is the Future of Linear Algebra.. Random?
35:11
Mutual Information
Рет қаралды 377 М.
The Science of Codes: An Intro to Cryptography
8:21
SciShow
Рет қаралды 1,1 МЛН
Vigenere Cipher Cryptography (PicoCTF 2022 #29 'vigenere')
25:48
John Hammond
Рет қаралды 18 М.