×
Login Register an account
Top Submissions Explore Upgoat Search Random Subverse Random Post Colorize! Site Rules Donate
0

Diffie-hellman key exchange

submitted by happytoes to mathematics 20 hoursMay 10, 2025 20:28:26 ago (+0/-0)     (www.youtube.com)

https://www.youtube.com/watch?v=M-0qt6tdHzk

Diffie-Hellman key exchange is a really cool trick and this video explains it clearly in 2'18"

Perhaps it needs to be longer, adding that (a^b)^c is the tiny number and a^(b^c) is the huge number. Diffie-Hellman uses the tiny number because it is a bit lame (a^b)^c = a^(b times c) = a^(c times b) = (a^c)^b

I like to make my examples with Common Lisp, because the fully parenthesised prefix notation makes things explicit. No stubbing by toe on what 3^5^7 actually means.

(expt (expt 3 5) 7) => 50031545098999707

(expt (expt 3 7) 5) => 50031545098999707

(expt 3 (* 5 7)) => 50031545098999707

(expt 3 (expt 5 7)) has 37276 decimal digits


3 comments block


[ - ] puremadness 1 point 18 hoursMay 10, 2025 21:46:41 ago (+1/-0)

love this shit

saving that one for the kids, practical examples are awesome.
I read the book "Crypto" (Stephen Levy) as a kid and have been enthralled ever since.
I'm not great at it, but I like walking the math, pure joy.

[ - ] autotic 0 points 16 hoursMay 11, 2025 00:02:49 ago (+0/-0)

Well, not the site I thought I'd ever see DH or CL mentioned.

[ - ] Trope 0 points 15 hoursMay 11, 2025 01:10:49 ago (+0/-0)

I remember learning about this years ago. I’m well beyond the point of caring by now.