CMPS 485: Diffie-Hellman Key Exchange

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 56

  • @ansaahmed4780
    @ansaahmed4780 5 лет назад

    Great Explanation!!
    The paint mixture analogy made it even more easier to understand the mathematics behind this encryption!

  • @SzechSauce
    @SzechSauce 4 года назад

    Excellent explanation, thanks a lot!

  • @niklasgraf6370
    @niklasgraf6370 7 лет назад +1

    Very helpful, thank you! Great explaination :)

  • @ragingpahadi
    @ragingpahadi 4 года назад

    Best Explanation

  • @kAngliiii
    @kAngliiii 8 лет назад +1

    This is so sexist. Why doesn't Alice have a job and is just jumping about? Is Alice a gymnast? Why is Eve (another girl) the eavesdropper?
    just a PC joke :p cool animation

  • @WaqarKhan-ld3bd
    @WaqarKhan-ld3bd 8 лет назад

    brilliant explanation

  • @ghadeernn6121
    @ghadeernn6121 4 года назад

    Thank u .

  • @okmf4579
    @okmf4579 6 лет назад

    thank u so much but what the different between elliptic curve diffe hellman key and diffe hellman ?

  • @BuddaSwathi
    @BuddaSwathi 8 лет назад

    thank you so much sir

  • @nejcn001
    @nejcn001 6 лет назад +1

    what if g^a is smaller then p? Then g^a mod p = g^a

  • @eletron4720
    @eletron4720 7 лет назад

    why did you choose a mod function? Why can't it be a Square or a cube or even a simple multiply function ? :)

    • @DarkPhoenix1515
      @DarkPhoenix1515 7 лет назад +2

      Hopefully by now you found the answer. It needs to be a one way function. Something easy to compute, but very difficult to reverse. Thus it is infeasible to break the algorithm.

  • @vivekprakash1804
    @vivekprakash1804 8 лет назад

    Its very much useful for me... sir.. Thank you for uploading... I How to calculate the mod in Scientific calculator..... 5^15 mod 23 = ?

    • @mustafarangwala5657
      @mustafarangwala5657 8 лет назад +2

      Step 1: Find mod of say 5^3 mod 23 (which can be done easily)
      Step 2: Now find 5^15 by multiplying the answer achieved from Step 1 five times and taking mod 23 of that answer.
      Note: To calculate mod in calculator here is a technique:
      say you need 125 mod 23
      divide 125/23=5.4347
      now subtract it with the integer part i.e 5.4347-5=0.4347
      now multiply this result obtained with 23 i.e 0.4347*23=10
      That is your answer :)

  • @ianwright353
    @ianwright353 8 лет назад +2

    do cowboys use computers?

  • @wobuntu
    @wobuntu 8 лет назад +3

    Well done explanation. Your comparison with colors made it a lot easier to understand

  • @junaid_qadir
    @junaid_qadir 2 года назад

    oh wow wow what a nice lecture. You have made it super easy like learning the alphabet "ABCDE....". Can you give us an example in Python code of how to implement it in code?

  • @mcspud
    @mcspud 8 лет назад +3

    The paint analogy was so great! Thanks man

  • @saarzaradez8
    @saarzaradez8 2 года назад

    Thank you for this! Great explanation!

  • @humairamunawar2281
    @humairamunawar2281 2 года назад

    Best Explanation👍

  • @shubhamaaws
    @shubhamaaws 5 лет назад

    Best explanations

  • @ChefEarthenware
    @ChefEarthenware 9 лет назад

    If 5x5 (5 squared) is written 5(2) (no subscript font) and 5x5x5 (5 cubed) is written 5(3), why is 5x5x5x5x5 wriiten as 5(6) in your example? I make 5(6) i.e. 5x5x5x5x5x5 to be 78125. I don't understand exponentiation.

  • @janifajahanrabby9478
    @janifajahanrabby9478 5 лет назад

    thank you so much

  • @Derbauer
    @Derbauer 4 года назад

    audio is too low man.

  • @abobrhom7
    @abobrhom7 8 лет назад +1

    Well explained, thank you

  • @fsoarez
    @fsoarez 5 лет назад

    if a change any variable on the formula, it doesnt replicate the results, if a o b change, the shared key is no longer the same, what am i doing wrong???

  • @ilterefe9295
    @ilterefe9295 4 года назад

    Subscribed! One of the best explanation ever. Thank you ryan for making it much easier to understand

  • @MrVlak93
    @MrVlak93 8 лет назад +1

    Best DH explanation ever

  • @mustafarangwala5657
    @mustafarangwala5657 8 лет назад

    Why do we require two prime numbers? It is also possible to have g as any integer, only p needs to be prime i think.

  • @a1988ditya
    @a1988ditya 9 лет назад

    wat if i want to share a specific private key with User 'B' ?? from DH we jus get a random key ...

    • @ryanriley5591
      @ryanriley5591  9 лет назад

      +Sorrowfull Blinger You typically don't share private keys with other people. If you really did want to (which again, you probably don't) then DH wouldn't be a good way to do it for a simple reason: It has no authentication. An active attacker can perform a man-in-the-middle attack and you wouldn't know.

    • @a1988ditya
      @a1988ditya 9 лет назад

      By pvt key i meant a secret key valid only for some time period .... Https communicates via a secret key which the source determines... man in the middle attack doesnt happen bcos he encrypts this secret key with the public key of the server ... so i was wondering jus like in https where the source selects a secret key ...is there any other known protocol which can be used to share selective secret keys for secure communication ....

    • @ryanriley5591
      @ryanriley5591  9 лет назад

      +Sorrowfull Blinger Diffie-Hellman can be used in HTTPS/TLS to negotiate keys similar to what you are describing. The DHE cipher suites all use a variation of it.

  • @syed1559
    @syed1559 6 лет назад

    Brilliant explanation. I have subscribed :)

  • @jsridhar72
    @jsridhar72 7 лет назад

    Only Alice and Bob picks up a secret color after agreeing upon the public color. Why not Eve picks up a secret color and follow the same procedure to arrive at the same shared secret color? I cant understand the color analogy. I know I am missing something. But I do not get what.

    • @ryanriley5591
      @ryanriley5591  7 лет назад

      What you are describing is Eve as active (instead of passive) attacker. Eve could pick a secret color, but she would need to run the protocol with both Alice and Bob separately, and then she would derive a different shared secret color with each of them.

  • @nayersalim6990
    @nayersalim6990 7 лет назад

    what shall prevent EVE from claiming to be BOB and start communication with Alice (and generating its pvt key) and continue the same procedure until finally creates the same shared secret with Alice?!

    • @ryanriley5591
      @ryanriley5591  7 лет назад +2

      Nothing. That would be a man-in-the-middle attack, and Diffie-Hellman is susceptible to it. It is important to note, though, that Eve would have a different key with both Alice and Bob, so if Alice and Bob could compare their keys offline, even at a later time, they could detect that the attack had occurred.

  • @harrysilenthill1003
    @harrysilenthill1003 8 лет назад

    in first : I want to thank you Mr. Ryan Riley
    but I have a question : if the attacker got on public key (p and g ) and he have also the mix of colors ( mix of public key with privet key(A) ) ,then he can guess the privet key (a)

    • @randomisoty422
      @randomisoty422 7 лет назад +1

      you would have to guess the value (a), try it in the formula and see if it works. Quite difficult to do with 100+ digit numbers as there are a LOT of options.

  • @ChefEarthenware
    @ChefEarthenware 9 лет назад

    So....having determined that Alice and Bob could arrive at a secret number (2) by using their secret nubers (6 and 15), how would they use the shared number (2) to encrpyt a message? Is this covered in another video?

    • @martijnvandendoel4863
      @martijnvandendoel4863 9 лет назад

      c

    • @ryanriley5591
      @ryanriley5591  9 лет назад

      +ChefEarthenware In the simple to understand case, you would just use the shared number as the key for a symmetric cipher like AES. (See my video on Symmetric key cryptography). In practice, instead you would use the shared number to mathematically derive a key used in AES.

  • @beammachine4525
    @beammachine4525 6 лет назад

    hi ryan, can u help me out, im stil trying to understand it. to make it simplified i made a scheme myself and used simple multiplying as encryption key. image.prntscr.com/image/nr9DfovsQ0me35L1h0MKCA.png i understand that alice and bob come with a result of information that is hard for eve to find out. what i dont understand is how can alice and bob send actual data, if they dont know the data before its encrypted? how can alice put a text in the data that only shows up after exchanging messages with bob? also correct my scheme if wrong

    • @ryanriley5591
      @ryanriley5591  6 лет назад

      Diffie-Hellman is only used to determine the encryption key. From there, you should be making use of a standard symmetric key algorithm (such as AES) to actually do the encryption.
      In addition, it is actually more complicated than that to do it all right. Remember a cardinal rule of crypto: Don't roll your own. That means, don't design your own crypto.

    • @beammachine4525
      @beammachine4525 6 лет назад

      oh the result is used to encrypt messages ........... god thats genius. thanks a lot for replying. and yeah i just discovered in my scheme eve can know the private numbers by dividing the message by the public key... lol. my fail. but real technique used in ur vid, the modular exponentation is beyond my understanding. any vids that explain it really simple?

  • @kinjalshah9631
    @kinjalshah9631 7 лет назад

    thnk you sir

  • @reydeleon3050
    @reydeleon3050 7 лет назад

    hello there Ryan, can I use DH key exchange for enhancing the Tiny Encryption Algo(TEA)?

    • @ryanriley5591
      @ryanriley5591  7 лет назад

      Diffie-Hellman can used to allow both parties to agree on a key they would use for TEA. In practice, however, you will need to augment Diffie-Hellman with the concepts from public key cryptography in order to protect against an active attacker.

    • @reydeleon3050
      @reydeleon3050 7 лет назад

      tnx for the reply sir, how about i used Ellipric Curve Diffie Hellman(ECDH), to improved TEA from related key /equivalent key attack? or can you suggest a good key management algorithm to be used to improved TEA...

  • @AvinashGA
    @AvinashGA 9 лет назад

    Super!!!

  • @urgensherpa7987
    @urgensherpa7987 9 лет назад

    Excellente`

  • @syedshakeel2857
    @syedshakeel2857 5 лет назад

    Hi,
    Thank you for your video and explanation. It is very informative and clear.
    I have few doubts. Please could you help clarify them.
    1. When alice and bob are agreeing upon value of 'p' and 'g', Is that not visible to Eve?
    2. So how does Alice know the Public Key of Bob and vice versa. If that was shared over the unsecure channel, wouldnot Eve have a copy it as well. Even though it might be difficult to find out the correct value, still Eve could crack the values and read the message. Is my understanding correct ?

    • @ryanriley5591
      @ryanriley5591  5 лет назад

      Hi Syed.
      For (1), p and g are not secret. So it doesn't matter that Even knows them.
      For (2): In the case of this video, we aren't talking about generalized public key crypto. If you are asking in general, however... It doesn't matter if Eve knows Alice or Bob's public keys. They aren't secret. However, the better question is: "How does Alice know Bob's public key?" That question is the hard one to answer. If you are interested in that question, then read up on PKI (Public Key Infrastructure).

  • @MEANASSJAMSTER
    @MEANASSJAMSTER 9 лет назад

    FANTASTIC!!! Now, I understand diffie-hellman encryption!!!