Author

Topic: Public Key Cryptography - Best explanation I've ever seen. (Read 1321 times)

sr. member
Activity: 381
Merit: 250
Short video


Public Key Cryptography: Diffie-Hellman Key Exchange

https://www.youtube.com/watch?v=3QnD2c4Xovk&feature=share


A must watch for non technical people.

Just an FYI, that video is from the Khan Academy Computer Science Information Science courses, which are free for anyone to take. I recommend anyone who is interested in Bitcoin/Cryptography/Encryption to take this course:

https://www.khanacademy.org/computing/computer-science/cryptography

It goes from the first few types of encryption - Caesar ciphers to modern ciphers

legendary
Activity: 1302
Merit: 1008
Core dev leaves me neg feedback #abuse #political
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.

When did they ever say 16^54?

Tell me at what time marker because I missed it.
4:35

Yup. To be more specific: "Alice takes Bob's public result and raises it to the power of her private number" (ie 16^54) "which gives 3 to the power of…"

Ah yes... Well 16^54 isnt the same number as 3^(24*54) , but it has the same modulus result after adding the "mod 17" part.

Mod function is basically the "leftovers" or "remainders" after doing division.
(Hopefully you can see how this is the same as wrapping a string around a clock).

I can't explain the exact mathematical properties why this all works,
(probably something to do with the fact that multiplication is commutative),
but the essence is that the same numbers are being combined (Alice's number and Bob's number using the same
modulus and primitive root), in a way that the remainder is the same.

I understand the concept of public-key cryptography, but not the math behind it.

Math depends on what flavor of cryptography.  This video deals with modulus.
Bitcoin uses ECDSA.  So if you want to know the math behind Bitcoin cryptography,
you need to study ECDSA specifically.  I think there's some good videos/articles
if you search the forum.


 
legendary
Activity: 1246
Merit: 1011
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.

From 4:26 in the video we know that 16 ≡ 324 mod 17.  Therefore
1654 ≡ (324)54 ≡ 324 * 54     (mod 17).

Of course, While Alice has received the value 16 from Bob, she doesn't know that 16 ≡ 324 mod 17 because she does not know Bob's secret number and cannot solve the discrete logarithm problem.  What Alice does know is that 16 ≡ 3[Bob's number] mod 17 and she can therefore calculate the shared secret:
3[Alice's number] * [Bob's number] ≡ 354 * [Bob's number] ≡ (3[Bob's number])54 ≡ 1654 ≡ 1     (mod 17).
Equally, Bob knows that 15 ≡ 3[Alice's number] mod 17 and he can therefore calculate the shared secret:
3[Alice's number] * [Bob's number] ≡ 3[Alice's number] * 24 ≡ (3[Alice's number])24 ≡ 1524 ≡ 1     (mod 17).
hero member
Activity: 868
Merit: 1000
This is far away from understandable for non technical people, but still good for those familiar with it
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
I understand the concept of public-key cryptography, but not the math behind it.
legendary
Activity: 1974
Merit: 1030
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.

When did they ever say 16^54?

Tell me at what time marker because I missed it.
4:35

Yup. To be more specific: "Alice takes Bob's public result and raises it to the power of her private number" (ie 16^54) "which gives 3 to the power of…"
hero member
Activity: 714
Merit: 500
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.

When did they ever say 16^54?

Tell me at what time marker because I missed it.

at 4:26 in the video they said that
3^24 mod 17 = 16, which the result
of Bob's calculation.
4:35
legendary
Activity: 1302
Merit: 1008
Core dev leaves me neg feedback #abuse #political
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.

When did they ever say 16^54?

Tell me at what time marker because I missed it.

at 4:26 in the video they said that
3^24 mod 17 = 16, which the result
of Bob's calculation.

One step closer to understanding public key cryptography but it still has not clicked.

Does their answer translate into a Bitcoin private/public key?

This video is different from Bitcoin...They are specifically using
the Diffie-Hellman Key Exchange to exchange private keys
over a public channel.

Bitcoin is more straightforward as far as public key/private key.
With Bitcoin, only you know your private key and don't have
to exchange it with anyone. 

But the concept of one way function still applies.  It is easy
to sign with your key and verify someone else signed correctly
but very hard to forge a signature or determine a private key
from a public key.





legendary
Activity: 3598
Merit: 2386
Viva Ut Vivas
One step closer to understanding public key cryptography but it still has not clicked.

Does their answer translate into a Bitcoin private/public key?
hero member
Activity: 714
Merit: 500
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.
A lot of people where wondering that Wink
I just typed it into Wolfram Alpha and it indeed gave me the right result, but I would also be interested into a explanation.
legendary
Activity: 1974
Merit: 1030
How did they go from "16^54 mod 17" to "3^(24*54) mod 17"? Don't seem like the same numbers to me, and the transformation isn't further explained.
newbie
Activity: 17
Merit: 0
Definitely one of the simplest explanations I have seen. Definitely something to show friends when they asking about cryptography but aren't as well versed in technology.
legendary
Activity: 1568
Merit: 1031
Short video


Public Key Cryptography: Diffie-Hellman Key Exchange

https://www.youtube.com/watch?v=3QnD2c4Xovk&feature=share


A must watch for non technical people.

Best explanation I've ever seen to be honest ,I really liked the given examples , mostly the Colors example
Thanks for sharing mate  Grin
member
Activity: 62
Merit: 10
Thanks for sharing, bookmarked.
legendary
Activity: 1246
Merit: 1000
103 days, 21 hours and 10 minutes.
That's a very good explanation and its done very well. 
legendary
Activity: 1372
Merit: 1000
--------------->¿?
Short video


Public Key Cryptography: Diffie-Hellman Key Exchange

https://www.youtube.com/watch?v=3QnD2c4Xovk&feature=share


A must watch for non technical people.
Jump to: