Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. how diffie hellman key exchange works

how diffie hellman key exchange works

Scheduled Pinned Locked Moved Uncategorized
34 Posts 20 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • b0rk@social.jvns.caB b0rk@social.jvns.ca

    (the above happened because i realized at some point that even though diffie hellman key exchange _uses_ things like "elliptic curves" or "modular arithmetic" to work, you do not need to actually _understand_ those things to understand the basic idea, and I thought that was cool!)

    mjd@mathstodon.xyzM This user is from outside of this forum
    mjd@mathstodon.xyzM This user is from outside of this forum
    mjd@mathstodon.xyz
    wrote last edited by
    #9

    @b0rk That is a really nice explanation, thanks!

    Your remark that “you do not need to actually _understand_ those things to understand the basic idea” reminds me of a math SE question I answered a while back: “My little cousin (12year) asked me about how emails are encrypted … Is there a teacher here who knows how to make her understand how to factor a number in to primes and what a prime number is?”

    I had to answer twice. First I answered the question that was asked: I do know how to explain prime and composite to kids. But if what the the kid wants is to understand how emails are encrypted, the prime number thing is an unimportant implementation detail. I suggested explaining Vigenère ciphers instead.

    Link Preview Image
    how to explain prime numbers to children

    My little cousin (12year) asked me about how emails are encrypted and I want to answers her in such a way she understands it. This is diffuct, but I am happy with teaching the definition of a prime

    favicon

    Mathematics Stack Exchange (math.stackexchange.com)

    b0rk@social.jvns.caB 1 Reply Last reply
    0
    • mjd@mathstodon.xyzM mjd@mathstodon.xyz

      @b0rk That is a really nice explanation, thanks!

      Your remark that “you do not need to actually _understand_ those things to understand the basic idea” reminds me of a math SE question I answered a while back: “My little cousin (12year) asked me about how emails are encrypted … Is there a teacher here who knows how to make her understand how to factor a number in to primes and what a prime number is?”

      I had to answer twice. First I answered the question that was asked: I do know how to explain prime and composite to kids. But if what the the kid wants is to understand how emails are encrypted, the prime number thing is an unimportant implementation detail. I suggested explaining Vigenère ciphers instead.

      Link Preview Image
      how to explain prime numbers to children

      My little cousin (12year) asked me about how emails are encrypted and I want to answers her in such a way she understands it. This is diffuct, but I am happy with teaching the definition of a prime

      favicon

      Mathematics Stack Exchange (math.stackexchange.com)

      b0rk@social.jvns.caB This user is from outside of this forum
      b0rk@social.jvns.caB This user is from outside of this forum
      b0rk@social.jvns.ca
      wrote last edited by
      #10

      @mjd yeah this happened because someone asked me how DH works and I started explaining modular arithmetic and I realized, wait, that's not important, I don't understand that much about elliptic curve addition or whatever either but I still get the basic idea behind ECDH

      1 Reply Last reply
      0
      • b0rk@social.jvns.caB b0rk@social.jvns.ca

        how diffie hellman key exchange works

        (with as little math as possible)

        ballpointcarrot@social.lolB This user is from outside of this forum
        ballpointcarrot@social.lolB This user is from outside of this forum
        ballpointcarrot@social.lol
        wrote last edited by
        #11

        RE: https://infosec.exchange/@sophieschmieg/116246805758237078

        @b0rk you don't just get Diffie to sign it?

        1 Reply Last reply
        0
        • b0rk@social.jvns.caB b0rk@social.jvns.ca

          how diffie hellman key exchange works

          (with as little math as possible)

          janl@narrativ.esJ This user is from outside of this forum
          janl@narrativ.esJ This user is from outside of this forum
          janl@narrativ.es
          wrote last edited by
          #12

          @b0rk 😭😭😭😭this is so well done and clear 💖💖💖💖

          1 Reply Last reply
          0
          • b0rk@social.jvns.caB b0rk@social.jvns.ca

            @divVerent ah yeah good point! do you know an example offhand where you can find (S o A) o B given S o A and S o B? (but not find B given S o B)

            samirparikh@mastodon.socialS This user is from outside of this forum
            samirparikh@mastodon.socialS This user is from outside of this forum
            samirparikh@mastodon.social
            wrote last edited by
            #13

            @b0rk @divVerent Not sure what you're asking but might it be like the mixing paint example in the video I linked to?

            In that example, Alice and Bob share a common paint color to which they mix their secret color. They share that combination with each other, add their secret color again to arrive at a shared secret key. Horrible explanation on my part which the video does a much better job at.

            But I probably am completely misunderstanding your question in which case ignore this!

            1 Reply Last reply
            0
            • b0rk@social.jvns.caB b0rk@social.jvns.ca

              how diffie hellman key exchange works

              (with as little math as possible)

              pmb00cs@mastodon.onlineP This user is from outside of this forum
              pmb00cs@mastodon.onlineP This user is from outside of this forum
              pmb00cs@mastodon.online
              wrote last edited by
              #14

              @b0rk have you seen the paint explainer for Diffie-Helman? That's quite a good way to get the idea across.

              b0rk@social.jvns.caB 1 Reply Last reply
              0
              • pmb00cs@mastodon.onlineP pmb00cs@mastodon.online

                @b0rk have you seen the paint explainer for Diffie-Helman? That's quite a good way to get the idea across.

                b0rk@social.jvns.caB This user is from outside of this forum
                b0rk@social.jvns.caB This user is from outside of this forum
                b0rk@social.jvns.ca
                wrote last edited by
                #15

                @pmb00cs i have! i wanted to write something a little closer to the mathematical reality

                pmb00cs@mastodon.onlineP 1 Reply Last reply
                0
                • b0rk@social.jvns.caB b0rk@social.jvns.ca

                  @pmb00cs i have! i wanted to write something a little closer to the mathematical reality

                  pmb00cs@mastodon.onlineP This user is from outside of this forum
                  pmb00cs@mastodon.onlineP This user is from outside of this forum
                  pmb00cs@mastodon.online
                  wrote last edited by
                  #16

                  @b0rk that's fair enough, and I think you've done an excellent job of it. I just like the paint analogy because it's easy to grasp that unmixing paint is hard.

                  b0rk@social.jvns.caB 1 Reply Last reply
                  0
                  • pmb00cs@mastodon.onlineP pmb00cs@mastodon.online

                    @b0rk that's fair enough, and I think you've done an excellent job of it. I just like the paint analogy because it's easy to grasp that unmixing paint is hard.

                    b0rk@social.jvns.caB This user is from outside of this forum
                    b0rk@social.jvns.caB This user is from outside of this forum
                    b0rk@social.jvns.ca
                    wrote last edited by
                    #17

                    @pmb00cs one interesting way the mixing paint metaphor doesn't work (imo) is that when you're mixing paint the two colours you're mixing both have the same "type", and it's a symmetric operation (a mixed with b is the same as b mixed with a)

                    but in diffie hellman the operation is not symmetric at all, like the type of the function is more like f(type1, type2) => type1

                    I think saying that "s" and "a" are both "numbers" might be a bit of an oversimplification in that sense

                    b0rk@social.jvns.caB pmb00cs@mastodon.onlineP 2 Replies Last reply
                    0
                    • b0rk@social.jvns.caB b0rk@social.jvns.ca

                      @pmb00cs one interesting way the mixing paint metaphor doesn't work (imo) is that when you're mixing paint the two colours you're mixing both have the same "type", and it's a symmetric operation (a mixed with b is the same as b mixed with a)

                      but in diffie hellman the operation is not symmetric at all, like the type of the function is more like f(type1, type2) => type1

                      I think saying that "s" and "a" are both "numbers" might be a bit of an oversimplification in that sense

                      b0rk@social.jvns.caB This user is from outside of this forum
                      b0rk@social.jvns.caB This user is from outside of this forum
                      b0rk@social.jvns.ca
                      wrote last edited by
                      #18

                      @pmb00cs but I definitely have a tendency to be overly critical about the specifics of metaphors in a way that's not necessarily helpful 🙂

                      the paint thing is cool!

                      1 Reply Last reply
                      0
                      • b0rk@social.jvns.caB b0rk@social.jvns.ca

                        how diffie hellman key exchange works

                        (with as little math as possible)

                        cy@fedicy.us.toC This user is from outside of this forum
                        cy@fedicy.us.toC This user is from outside of this forum
                        cy@fedicy.us.to
                        wrote last edited by
                        #19
                        https://fedicy.us.to/Diffie-Hellman%20Key%20Exchange-Art%20of%20the%20Problem.webm
                        1 Reply Last reply
                        0
                        • b0rk@social.jvns.caB b0rk@social.jvns.ca

                          @pmb00cs one interesting way the mixing paint metaphor doesn't work (imo) is that when you're mixing paint the two colours you're mixing both have the same "type", and it's a symmetric operation (a mixed with b is the same as b mixed with a)

                          but in diffie hellman the operation is not symmetric at all, like the type of the function is more like f(type1, type2) => type1

                          I think saying that "s" and "a" are both "numbers" might be a bit of an oversimplification in that sense

                          pmb00cs@mastodon.onlineP This user is from outside of this forum
                          pmb00cs@mastodon.onlineP This user is from outside of this forum
                          pmb00cs@mastodon.online
                          wrote last edited by
                          #20

                          @b0rk I mean, there's a point where a metaphor doesn't work anymore, because it's not the truth, just a way to explain part of the truth. If you need perfect accuracy you're just explaining reality.

                          The paint metaphor also breaks down because there are tools for recreating paint colours accurately from pure pigments. Do that for (sxa), (sxb), and s, and you recover a and b. So it's not really suitable as a form of key exchange. But it is easy to understand on a basic level.

                          1 Reply Last reply
                          0
                          • b0rk@social.jvns.caB b0rk@social.jvns.ca

                            how diffie hellman key exchange works

                            (with as little math as possible)

                            ednl@mastodon.socialE This user is from outside of this forum
                            ednl@mastodon.socialE This user is from outside of this forum
                            ednl@mastodon.social
                            wrote last edited by
                            #21

                            @b0rk Small typo in panel 4, choose = chose?

                            1 Reply Last reply
                            0
                            • b0rk@social.jvns.caB b0rk@social.jvns.ca

                              how diffie hellman key exchange works

                              (with as little math as possible)

                              counting_is_hard@mathstodon.xyzC This user is from outside of this forum
                              counting_is_hard@mathstodon.xyzC This user is from outside of this forum
                              counting_is_hard@mathstodon.xyz
                              wrote last edited by
                              #22

                              @b0rk you can do it without maths at all. Say I want to give you my bicycle, but our schedules just will never work out for me to give you it directly. Well, we pick a place both of us can access, say outside the train station. I lock my bike up at a designated spot and go about my day. You come along with your own lock and use it to fasten the bike to the same spot without interfering with my lock, then go about your day. At some point I remove my lock, after which you can remove yours and gain a bicycle.

                              As I understand it, such a protocol was the inspiration for DH key exchange. Picking a spot is picking a generator. Locking is exponentiating. Locks not interfering is the commutativity property.

                              It's the explanation I always use when TAing cryptography

                              1 Reply Last reply
                              0
                              • b0rk@social.jvns.caB b0rk@social.jvns.ca

                                how diffie hellman key exchange works

                                (with as little math as possible)

                                E This user is from outside of this forum
                                E This user is from outside of this forum
                                esoteric_programmer@social.stealthy.club
                                wrote last edited by
                                #23

                                @b0rk I would boost it, but the attached image doesn't have any alt text, so I can't. What's the image about? is it showing a mathematical formula or something similar? a diagram?

                                b0rk@social.jvns.caB 1 Reply Last reply
                                0
                                • E esoteric_programmer@social.stealthy.club

                                  @b0rk I would boost it, but the attached image doesn't have any alt text, so I can't. What's the image about? is it showing a mathematical formula or something similar? a diagram?

                                  b0rk@social.jvns.caB This user is from outside of this forum
                                  b0rk@social.jvns.caB This user is from outside of this forum
                                  b0rk@social.jvns.ca
                                  wrote last edited by
                                  #24

                                  @esoteric_programmer will write some and let you know when it’s added

                                  1 Reply Last reply
                                  0
                                  • b0rk@social.jvns.caB b0rk@social.jvns.ca

                                    how diffie hellman key exchange works

                                    (with as little math as possible)

                                    palvaro@discuss.systemsP This user is from outside of this forum
                                    palvaro@discuss.systemsP This user is from outside of this forum
                                    palvaro@discuss.systems
                                    wrote last edited by
                                    #25

                                    @b0rk I love it. when I have taught this material, I have fallen back on the paint mixing analogy, but as a colorblind person this never felt right!

                                    1 Reply Last reply
                                    0
                                    • b0rk@social.jvns.caB b0rk@social.jvns.ca

                                      how diffie hellman key exchange works

                                      (with as little math as possible)

                                      snoopj@hachyderm.ioS This user is from outside of this forum
                                      snoopj@hachyderm.ioS This user is from outside of this forum
                                      snoopj@hachyderm.io
                                      wrote last edited by
                                      #26

                                      @b0rk am I missing something or is "add the result s to itself x times) a result of mixed-up puncutation? Did a double-take at that

                                      snoopj@hachyderm.ioS b0rk@social.jvns.caB 2 Replies Last reply
                                      0
                                      • snoopj@hachyderm.ioS snoopj@hachyderm.io

                                        @b0rk am I missing something or is "add the result s to itself x times) a result of mixed-up puncutation? Did a double-take at that

                                        snoopj@hachyderm.ioS This user is from outside of this forum
                                        snoopj@hachyderm.ioS This user is from outside of this forum
                                        snoopj@hachyderm.io
                                        wrote last edited by
                                        #27

                                        @b0rk fantastic work as usual, thanks for sharing

                                        1 Reply Last reply
                                        0
                                        • b0rk@social.jvns.caB b0rk@social.jvns.ca

                                          @divVerent ah yeah good point! do you know an example offhand where you can find (S o A) o B given S o A and S o B? (but not find B given S o B)

                                          divverent@misskey.deD This user is from outside of this forum
                                          divverent@misskey.deD This user is from outside of this forum
                                          divverent@misskey.de
                                          wrote last edited by
                                          #28
                                          @b0rk@social.jvns.ca No such groups are known yet. However one can easily prove that discrete log solves CDH, whereas no general reduction from CDH to discrete log exists, which in a way tells that DL is a "harder or equivalent" problem.

                                          There exists however such a reduction for some elliptic curves (e.g. the NIST curves and Curve25519); these curves are usually preferred, as we then only depend on one problem being hard.
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups