Secret Key Exchange (Diffie-Hellman) - Computerphile

Sdílet
Vložit
  • čas přidán 14. 12. 2017
  • How do we exchange a secret key in the clear? Spoiler: We don't - Dr Mike Pound shows us exactly what happens.
    Mathematics bit: • Diffie Hellman -the Ma...
    Computing Limit: • Computing Limit - Comp...
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Komentáře • 597

  • @OscarAlsing
    @OscarAlsing Před 6 lety +1407

    Poor Alice and Bob. Always exposed. Always out there. Never left alone. ❤️

    • @kduhtdkzrt
      @kduhtdkzrt Před 6 lety +5

      To answer the question about the aggressive tone in advance, I'm drunk, not austistic. No harm meant.

    • @ragnkja
      @ragnkja Před 6 lety +39

      Eve is always stalking them...

    • @kduhtdkzrt
      @kduhtdkzrt Před 6 lety +1

      Damnit. You're right.

    • @malporveresto
      @malporveresto Před 6 lety +8

      #Pray4AliceAndBob

    • @TruthNerds
      @TruthNerds Před 5 lety +3

      Meh. What if Alice and Bob are just attention whores?

  • @denisr5250
    @denisr5250 Před 4 lety +207

    The analogy with colors in this video is pure genius! Thank you guys, this was an amazing introduction to Diffie-Hellman!

    • @aerodynamico6427
      @aerodynamico6427 Před 23 dny

      Diffie-Hellman's original paper will drive you up the wall.

  • @ScottPlude
    @ScottPlude Před rokem +34

    5 years later and this is still done a million times a minute out there. Very well explained, thank you!

    • @nishantdalvi9470
      @nishantdalvi9470 Před 8 měsíci

      Hey can you please clear my doubt, Actually I am kind of bit confused about the ordering of the events which takes place while TLS handshake does the digital certificate part which server shoots to the client to tell the client it's integrity and provide client it's public key happens before Diffie Helman key exchange or after it or eventually during the key exchange

    • @ScottPlude
      @ScottPlude Před 8 měsíci

      @@nishantdalvi9470 why are you responding to me after 5 months? FIVE MONTHS!?!?!?!

  • @RobertMilesAI
    @RobertMilesAI Před 6 lety +54

    Nice! This is a subject I should have covered immediately after the Public Key Cryptography video, since that one lays out the problem of exchanging keys that Diffie-Hellman solves. Great to see such a clear explanation, I doubt I'd have gone to the effort to get coloured liquids!

    • @proloycodes
      @proloycodes Před 2 lety

      robert miles with only 4 likes and no replies?
      also, first!

    • @AyushMo
      @AyushMo Před 2 lety +1

      Your public key crypto video was amazing! So was this one !

    • @Democracy_Manifest
      @Democracy_Manifest Před rokem +1

      Is it a 'clear' explanation though, or a coloured one?

  • @CGoody564
    @CGoody564 Před 6 lety +36

    Watched the defcon presentation from years ago given by the creator of the diffie-helman key exchange... It was absolutely fascinating. Dude is an innovator and pure genius. Seems like a nice guy as well

  • @phoenix2464
    @phoenix2464 Před 6 lety +544

    yessss him again

  • @goshisanniichi
    @goshisanniichi Před 6 lety +356

    Random squirting of fluids... exactly what I wanted to see this early in the morning...

    • @therealquade
      @therealquade Před 6 lety +80

      the random squirting of fluids, by alice and bob, out in public.

    • @troyjones9344
      @troyjones9344 Před 6 lety +7

      ohhhhhh myyyyyyyy

    • @TheWolfboy180
      @TheWolfboy180 Před 6 lety +10

      Thomas Carrel It’s ok, no one minds if it’s done by Dr. Mike Pound

    • @xxwaldi
      @xxwaldi Před 4 lety +1

      @@therealquade yeah they should rather put it in the privates

    • @mrsmith1097
      @mrsmith1097 Před 3 lety

      Is that Super Sonico?

  • @frenchify7506
    @frenchify7506 Před 6 lety +60

    I really like this guy. Been watching and rewatching his lessons for like 3 hours.

  • @dmatuzo
    @dmatuzo Před 6 lety +71

    How curious, PBS Infinite Series have been talking about encription in the last few days. Now I've got double the encryption bonanza! This has been a good week.

    • @smob0
      @smob0 Před 6 lety +5

      I think the next video in the series will be about this key exchange.

    • @remuladgryta
      @remuladgryta Před 6 lety +2

      Further, one of the Royal Institution's recent videos used the same color mixing analogy to demonstrate key exchange.

    • @curtmack
      @curtmack Před 6 lety +7

      The color mixing analogy has been used to describe Diffie Hellman key exchange for a couple of decades at least.

    • @heyraylux
      @heyraylux Před 6 lety

      curious indeed.....

  • @CristiNeagu
    @CristiNeagu Před 6 lety +340

    1:04 First rule of cryptography: Unless your job is to create cryptographic algorithms, *never* implement your own cryptographic algorithms. You *will* screw it up.

    • @paterfamiliasgeminusiv4623
      @paterfamiliasgeminusiv4623 Před 6 lety +23

      Nice advice because it is such a tempting prospect.

    • @baatar
      @baatar Před 5 lety +3

      Why would you even want to implement your own in the first place?

    • @dapperking
      @dapperking Před 5 lety +55

      @@baatar for funnnnnn

    • @paulzapodeanu9407
      @paulzapodeanu9407 Před 4 lety +41

      In high school I thought I was being clever and did this. Took my deskmate about 1/2 an hour to crack it. Despite many evidence to the contrary, I still think I'm clever.

    • @sir_slimestone3797
      @sir_slimestone3797 Před 4 lety

      @@paulzapodeanu9407 Let me guess, simple substitution

  • @davidoconnor9167
    @davidoconnor9167 Před 3 lety +1

    Excellent, clear explanation, and the colours really showed the process visually, thanks guys!

  • @kingbran923
    @kingbran923 Před rokem +6

    Sir, you have sincerely helped me with my homework far more than my textbook ever could. Thank you so much for making these videos! :D

  • @dasjucktmichnicht6727

    i love the style of the whole channel! proofs nobody really needs power point or laborious anmations.

  • @ironman85000
    @ironman85000 Před 6 lety +50

    I'm a simple man. I see a computerphile video with Mike Pound, I click like

  • @nO_d3N1AL
    @nO_d3N1AL Před 6 lety +3

    What I like most about this channel is the ability of the presenters to explain things simply without mathematics. That is real teaching, not reciting formal proofs and equations

    • @WofWca
      @WofWca Před 5 lety +1

      Reciting formal proofs is also teaching, just for more advanced.

  • @benjohnson6251
    @benjohnson6251 Před 6 lety +4

    Such a good video! Really clever concept, and the colour analogy is great! Cheers! :D

  • @lukas.oppermann
    @lukas.oppermann Před 2 lety

    Great explanation. Makes this concept really easy and straight forward to understand. 👍Thank you

  • @wakomike29
    @wakomike29 Před 4 lety

    This helps soooo much with my university studies! Dr. Pound, your the best.

  • @akshaykkapoor
    @akshaykkapoor Před 5 lety

    Best explanation of DH with such a simple example ..great work ..keep it up

  • @ennis_w
    @ennis_w Před 8 měsíci

    Everytime I feel confused by e2ee or key exchange, I will come back and see these videos. Really helps.

  • @wiltonlawrence882
    @wiltonlawrence882 Před 5 lety

    This is the best explanation of key exchange i came across, thanks for uploading this

  • @rezaghochkhani
    @rezaghochkhani Před 3 lety

    This is the greatest video I have watched on encryption, ever!
    Thanks a lot.

  • @Dashrendar2507
    @Dashrendar2507 Před 5 lety +4

    Hey, thanks! I was still having issues with this but your visual representation really helped :)

  • @evarakovska3302
    @evarakovska3302 Před 3 lety

    Thanks for whole serie of videos! I found something useful for my students and it is great!

  • @florianfanderl6674
    @florianfanderl6674 Před 2 lety

    Recently discovered this channel and I love it ❤

  • @DouroFusion
    @DouroFusion Před 8 měsíci

    amazing video, thanks Dr Mike Pound!

  • @druidelf3
    @druidelf3 Před 6 lety

    Amazing video. I could not have found a better teacher. Thank you so much.

  • @1992Razvy
    @1992Razvy Před 6 lety

    Great video and execution. Always I need to know how something in practice works to know if I really need it in my project and then I need to know the math behind to reproduce myself. I just got here again after watching the math video, beause I have to go back to solidify the knowledge.

  • @Laurabeck329
    @Laurabeck329 Před 6 lety +188

    This demonstration was a classic Parker square.

  • @giorgibakradze8734
    @giorgibakradze8734 Před 2 lety

    Thank you. This video really made the concept of Diffie-Hellman key exchange clear for me.

  • @matteoagius-darrigo7632
    @matteoagius-darrigo7632 Před 9 měsíci

    my favorite video on youtube!

  • @dubonbiton1706
    @dubonbiton1706 Před 4 lety +1

    What an incredible video! Fantastic way to understand how VPN key exchange works!! Thumbs up

  • @grrr1351
    @grrr1351 Před 6 lety +1

    I just love this guy! Keep him comin'.

  • @laurelineparis5407
    @laurelineparis5407 Před 10 měsíci

    Nice, fun and accessible way to explain it :)
    Really enjoyed the analogical explanation
    Thanks for sharing 🙌

  • @kennyethwong5214
    @kennyethwong5214 Před 2 lety

    your presentation is so clear and understandable, thanks a lot

  • @chrisgsauce
    @chrisgsauce Před 2 lety

    I've never seen a clearer explanation of DH. Thanks guy!

  • @MakerTim
    @MakerTim Před 6 lety

    Thanx!
    I got NOW my college about EXACT this
    and your explanation is way more clear

  • @khawajaazfarasif4865
    @khawajaazfarasif4865 Před rokem +3

    Beautifully explained.

  • @RiGGeN83
    @RiGGeN83 Před 6 lety

    i always wanted to know how was the very first aproach! now i know! thank you! great video, keep up with your excelent work!

  • @StuffOffYouStuff
    @StuffOffYouStuff Před 3 lety +8

    Fantasticly simple and easy to understand explanation, thank you for this.
    I'm studying for the Sec+, so basics atm. But i've been getting very confused by some of the terms around encryption. I'm going to ask a completely naive question. I understand to encrypt there are two components, 1) the algorithm, 2) the key. I've seen Diffie-Hellman described as a) a public key encryption algorithm, b) a key exchange protocol, c) a public-key encryption protocol.
    RSA is also described as an asymmetric public key encryption algorithm.
    Diffie-Hellman only generates keys, it does not provide an algorithm for use with those keys to then encrypt data
    RSA also generates keys, but can also encrypt/decrypt data
    So, my questions/assertions:
    1) Is there general misuse of the term "encryption algorithm" or just "encrpytion" as to what that encompasses? What should it encompass?
    2) My current feeling is, Encryption = 1) the algorithm, 2) the key (but not the key generation). Encryption algorithm = 1) literally just the algorithm, not the key. EErr, i don't know what term to use that would also encompass the key generation bit. So yeah confused still.
    2) The process of Diffie-Hellman key generation/exchange is still considered an encryption algorithm because it outputs data (the shared public) that makes deciphering the input to create it practically impossible?
    3) Diffie-Hellman is considered asymmetric because it generates a private/public key pair first?
    4) Diffie-Hellman can also be used to generate asymmetric keys ONLY?
    5) So the private symmetric keys Diffie-Hellman creates would form the symmetric keys for one of the symmetric encryption algorithms like RC4/AES?
    4) Looking back at the above then, the term encryption looks like it should actually include the discrete phase of key generation/distribution?

    • @tudoralexandruienulescu2214
      @tudoralexandruienulescu2214 Před 2 měsíci

      I am also studying Sec+
      From what I (think I) know, here are my answers:
      1 - There is no misuse. Encryption describes the goal of the action, the algorithm is what any algorithm is. A chain of operations for a specific goal. "Encryption algorithm" is fine.
      2 - You are overthinking I guess. "Encryption" is a term used to describe the topic of the discussion (for example). The term "Encryption algorithm" is getting into details and explaining what is, why it's needed, how it works (each step of the process aka the algorithm), etc.
      3 - Diffie-Hellman is assymetric because the Bob and Alice don't have all the same keys in their own pockets. Alice does not have the "b" key and Bob does not have the "a" key.
      4 - From what I learned thus far, yes. DH is the general example for generating asymmetric keys.
      5 - YES
      6 (or maybe 4) - I don't think so. encrypting something using a cypher is one thing, using a handshake or other ways to communicate between parties is another (just like DH).
      The DH is the actual method used to sharing of a secret key between two people who have not contacted each other before. It does not refer to the cyphers at all.

  • @syeduzairahmed
    @syeduzairahmed Před rokem

    Very simplified approach of teaching. Great video

  • @fridric2916
    @fridric2916 Před 3 lety +1

    Dr. Mike Pound is just a great great teacher

  • @lenilsonsg
    @lenilsonsg Před 4 lety

    You just got a new subscriber. Excellent content mate.

  • @999999GALLADE
    @999999GALLADE Před 6 lety

    I was actually looking for a good Diffie Hellman video a couple of days ago - how convenient!

  • @jamie_ar
    @jamie_ar Před 6 lety +132

    Great video, but surely the simpler method with the colours would have been to have ramekins with clear water and then add X drops of food colouring for the stages?! 😂

    • @AloisMahdal
      @AloisMahdal Před 6 lety +21

      Apparently Mt.Dew vending machine was closer than a food coloring vending machine.

    • @AlexRasengan1337
      @AlexRasengan1337 Před 5 lety

      But that wouldn't work, the private keys are different.

    • @agentjeyjey9757
      @agentjeyjey9757 Před 3 lety

      @@AlexRasengan1337 Not for the private keys, for the public key (g)

  • @almiskea
    @almiskea Před 3 měsíci

    Great explanation, I have been searching and no one has explained it as well
    Thank you

  • @ChubBuddy69
    @ChubBuddy69 Před 5 lety

    Excellent explanation. THANK YOU!

  • @ramprasath219
    @ramprasath219 Před 5 lety +1

    Superb video!!!
    Great job 👍👏

  • @daviaquino3625
    @daviaquino3625 Před 5 měsíci

    I am writing Javascript decryption libraries for Apple Pay, Google Pay and Shopify and came across this video trying to learn more about the theory. Fantastic!

  • @pascalst5023
    @pascalst5023 Před 4 lety

    this is so well explained. Thank you!

  • @asherorourke6199
    @asherorourke6199 Před 2 lety

    what a terrific explanation. Terrific, and thank you!

  • @DaMaZa1234
    @DaMaZa1234 Před 4 lety +1

    I would like to Thank you Dr.Mike Pound for this information. it make me understand what is Diffie-Hellman is and i would like to take this video to be your reference in my work i have been put credit for u i really appreciate what u have done for us this video is just 8min it fun and i love this video Thank you

  • @AnimatedHooman
    @AnimatedHooman Před 6 lety

    Excellent explanation. Loved it

  • @edmundderek
    @edmundderek Před 3 lety

    so glad that your video made it in the bibliographie of my PFE

  • @SirCutRy
    @SirCutRy Před 6 lety

    This is so simple yet so effective. Very interesting.

  • @user-qf6yt3id3w
    @user-qf6yt3id3w Před 6 lety +2

    One thing I liked about Hellman was that not only did he invent a clever way to distribute private keys he also invented a decent tasting mayonnaise with an enormous shelf life.
    It has been forecast that a jar or mayonnaise will still be more or less OK even after being stored at refrigerator temperatures for five thousand years.
    If the Ancient Egyptians had known about Hellman's mayonnaise recipe and had stored a few sealed jars in the pyramids we'd still be able to open them and make a decent tuna mayo sandwich.
    Probably long after the nuclear apocalypse we'll be eating Hellman's Mayonnaise probably with roach meat. Or maybe the roaches will win and eat Human Mayo sandwiches.

  • @kigtod
    @kigtod Před 6 lety +6

    A very clear explanation as usual, but it would have been nice for Mike to briefly mention that a trio at GCHQ - Ellis, Cocks and Williamson - came up with the idea first.

  • @ekinseyjr
    @ekinseyjr Před 6 lety

    A very clear explanation - many thanks!

  • @atulsharma4501
    @atulsharma4501 Před 6 lety

    Just love this guy !!!!! Great explanation!!

  • @ryantan5974
    @ryantan5974 Před 2 lety

    Very well explained and elaboration are very clear.

  • @jackboyle3688
    @jackboyle3688 Před 2 lety

    This is an excellent explanation, thanks a bunch!!

  • @afroeuropean5195
    @afroeuropean5195 Před 6 lety

    FINALLY. Love your videos

  • @BackWithTheBoom
    @BackWithTheBoom Před 4 lety +1

    Mathematical squirtings, LOVE THIS GUY XD, i follow this guy almost for a couple years, such a MVP

  • @unvergebeneid
    @unvergebeneid Před 6 lety +19

    2:53 that sound though! =)

  • @tejasanvekar7367
    @tejasanvekar7367 Před 4 lety

    Huge fan of u sir....started encryption watching ur videos.....love ur accent

  • @GordonjSmith1
    @GordonjSmith1 Před 2 lety

    What a wonderful demonstration!

  • @datag1199
    @datag1199 Před 3 měsíci

    Great visual analogy. Thank you!

  • @Skaxarrat
    @Skaxarrat Před 9 měsíci

    Stellar explanation.

  • @LHyoutube
    @LHyoutube Před 2 lety +6

    I would have understood a lot more mathematics had it been presented so intuitively!

  • @videogamemusicandfunstuff4873

    Dr. Mike is the best!

  • @fahansheikh
    @fahansheikh Před rokem

    thanks for the wonderful explanation
    👍

  • @sachinpandeyatd
    @sachinpandeyatd Před 2 lety

    tomarrow I have new sec and cryptography exam, and this topic has high possibility of coming, this is the best explanation I found,

  • @josemiranda6123
    @josemiranda6123 Před 3 lety +1

    Awesome explanation!!!

  • @trollflix
    @trollflix Před 3 lety

    This guy is a genius. The explanation method is high level. You must be a teacher. 😍😋

  • @kanskejonasidag1
    @kanskejonasidag1 Před 6 lety +35

    Mike Pound?? Instant like! :D

  • @pun15h3r.
    @pun15h3r. Před rokem +3

    very nice video, plain and simple explanation ;D

  • @tapewormerbinkosti3141
    @tapewormerbinkosti3141 Před 8 měsíci

    One of these mathematical functions is: Alice sends g to the power of a (modulo prime number p). Bob sends g to the power of b (modulo p). The shared key is then: g to the power of a (modulo p) to the power of b (modulo p) which is the same as g to the power of b (modulo p) to the power of a (modulo p).

  • @Crypto_Wiz
    @Crypto_Wiz Před 11 měsíci

    Brilliant. My professor could not even come close to such a great explanation.

  • @Deiwulf
    @Deiwulf Před 5 měsíci

    Finally explanation of the main part that's missing like literally everywhere else. Good lord.

  • @moazelsawaf2000
    @moazelsawaf2000 Před 5 lety

    This is a pure intelligence ❤️
    Great explanation sir ❤️

  • @42svb58
    @42svb58 Před 3 lety +1

    Best breakdown ever

  • @sebastianb2092
    @sebastianb2092 Před 4 lety

    This guy is absolutely awesome. Thanks a lot.

  • @hashansachintha546
    @hashansachintha546 Před 5 lety

    Finally I have understand it with this simple example. Big thanks.

  • @programmercouple
    @programmercouple Před 3 lety

    Finally understood the Diffy-Hellman concept. Thanks

  • @mercerkace2023
    @mercerkace2023 Před rokem

    Amazing explanation.

  • @shivampokhriyal2782
    @shivampokhriyal2782 Před rokem

    Awesome explanation. 👌👌

  • @sargondinkha8492
    @sargondinkha8492 Před 2 lety

    Fantastic content!

  • @lumanaughty1025
    @lumanaughty1025 Před 4 lety +6

    This might be the quarantine talking, but I’m starting to get a crush on this dude

    • @ruijiebai7531
      @ruijiebai7531 Před 4 lety

      lol,i feel you ,i wish my lecturer could have his face then i wont skip any lecture

  • @westa1979
    @westa1979 Před 2 lety

    This video makes so much sense. And I get that it would be used to exchange, say, an AES key. But I thought symmetric keys were exchanged with asymmetric encryption, such as RSA. When would one chose DH instead? (Answer probably in another video)

  • @suhailidrees5782
    @suhailidrees5782 Před 6 lety

    Great explanation! Thanks!

  • @tomasxfranco
    @tomasxfranco Před 6 lety +3

    I love Mike.

  • @bbittera1425
    @bbittera1425 Před 11 měsíci

    Great explanation!

  • @lesconrads
    @lesconrads Před 6 lety

    A brilliant educator!

  • @mohamedhesham6008
    @mohamedhesham6008 Před rokem

    That is very very clear explanation. thank youuu

  • @hamzamunir8180
    @hamzamunir8180 Před 4 lety

    this guys saved my semester.

  • @MiladMashayekhi
    @MiladMashayekhi Před 3 lety +1

    very well explained. thx

  • @tuannguyen927
    @tuannguyen927 Před 3 lety

    Splendid video

  • @ronaik
    @ronaik Před 3 lety

    Great explanation to understand DH key exchange. Also, as food for thought, wouldn't a highly skilled painter (hacker) know what colours add up to form that final colour? He does and that's where we add more complexities and algorithms to make DH what it is!

  • @mladenkaorlic
    @mladenkaorlic Před 2 lety

    Very well explained!

  • @willk7184
    @willk7184 Před 2 lety +1

    Neat, I finally understand the basics of something I was always curious about. But now I'm thirsty.