Cryptography | The Mathematics of RSA and the Diffie-Hellman Protocol

  Рет қаралды 103,140

Zach Star

Zach Star

5 жыл бұрын

Click here to enroll in Coursera's "Cryptography I" course (no pre-req's required): click.linksynergy.com/deeplin...
STEMerch Store: stemerch.com/
Support the Channel: / zachstar
PayPal(one time donation): www.paypal.me/ZachStarYT
If you missed part 1: • The Mathematics of Cry...
Instagram: / zachstar
Twitter: / imzachstar
Join Facebook Group: / majorprep
►My Setup:
Space Pictures: amzn.to/2CC4Kqj
Magnetic Floating Globe: amzn.to/2VgPdn0
Camera: amzn.to/2RivYu5
Mic: amzn.to/2BLBkEj
Tripod: amzn.to/2RgMTNL
Equilibrium Tube: amzn.to/2SowDrh
►Check out the MajorPrep Amazon Store: www.amazon.com/shop/zachstar

Пікірлер: 108
@zachstar
@zachstar 5 жыл бұрын
In case you missed part 1: kzbin.info/www/bejne/q3_dkoComNqHg5I
@zeuscesar
@zeuscesar 4 жыл бұрын
Good 2 part video dude! thanks for that!
@cardcode8345
@cardcode8345 3 жыл бұрын
Which college major should I go for Computer science or Electrical engineering?
@ajaydabral5672
@ajaydabral5672 3 жыл бұрын
Wanna discuss with you something ,if possible to contact you
@Michael-vf2mw
@Michael-vf2mw 3 ай бұрын
@@cardcode8345Mechanical
@raadwan
@raadwan 5 жыл бұрын
Now I'm smarter than I ever intended to be. Thank You.
@mfadhilal-fatih1427
@mfadhilal-fatih1427 2 жыл бұрын
Ye
@zajec11
@zajec11 5 жыл бұрын
After trying to understand this algorithm for about 4 months, this single video has effectively set in motion the change of my life
@JamesPerez328
@JamesPerez328 5 жыл бұрын
I learned the Caesar Cipher and RSA Encryption in my Hardware Security class. It's honestly so cool.
@fiNitEarth
@fiNitEarth 5 жыл бұрын
Wtf i just randomly got the first part recommended, watched it and landed here 20 minutes after the upload xD So thats kinda creepy :D
@mhh5002
@mhh5002 5 жыл бұрын
Second here. U r such an underrated KZbinr. Another great video again
@digitalconsciousness
@digitalconsciousness 3 жыл бұрын
The new thing in cryptography now is lattice cryptography. The idea is that you form a multidimensional lattice with vectors that are mostly orthogonal, read in your byte from your plaintext (ex: 'g'), find a lattice coordinate that is also 'g' (you associate L points with bytes), but instead of choosing the cardinal coordinate of that lattice point, you choose a point near it; that point is then written to your ciphertext. It is impossible for an attacker to read the point from the ciphertext and match it to the lattice to discover the byte it is because they do not have the lattice basis (vectors) to reconstruct the lattice. All they have is a random point in space. They cannot even reconstruct the lattice from many sample points because the points were not chosen at the exact lattice coordinate: they were only chosen near them. So the sample of all points is completely random. The math part of this comes in with cryptographers wanting to represent a string of vector coordinates as a polynomial. They are, as I understand it, able to write coordinates (4,7,3,5,etc) as a polynomial, then they appear to write the exponents of the polynomial + coefficient backwards and this is the final thing that is written to the ciphertext. Anyway, if you ever feel like exploring the polynomial aspect of it and doing a video about it, I would love that. It's cutting edge stuff, mainly because lattice encryption is resistant to quantum computing attacks so far.
@qigongandthemartialarts3273
@qigongandthemartialarts3273 5 жыл бұрын
you do an excellent job explaining things in your videos keep up the good work
@baraaali4147
@baraaali4147 4 жыл бұрын
Really good videos! I'm watching this to educate myself on what I want to major in and this by far has made computer science a really interesting and fun field.
@AjayKumar-fd9mv
@AjayKumar-fd9mv 3 жыл бұрын
Omg, this is great. Keep posting such great videos.
@zdravkotraykov3752
@zdravkotraykov3752 5 жыл бұрын
Thank you so much! You explain it so simple and easy!
@vovan101
@vovan101 3 жыл бұрын
The only explanation of correctness I found after 2 days internet search. Thank you very much.
@SzechSauce
@SzechSauce 4 жыл бұрын
Awesome thank you so much for the super clear explanation!
@thedoublehelix5661
@thedoublehelix5661 4 жыл бұрын
The proof for Euler's Theorem is so nice. You should do a video on that!
@matt-in8td
@matt-in8td 4 жыл бұрын
You actually saved my exam, I did not understand DH protocol at all. Thanks a lot!!
@arwaaldurehim2727
@arwaaldurehim2727 11 ай бұрын
After studying number theory in my math major classes I’m glad to know all its applications and how cool it actually is
@sky-sight
@sky-sight 5 жыл бұрын
You know a video is good when there are more then 9k views but 0 dislikes there is usually that 1 hater who dislikes and leave so good job.
@dreaminfinity7716
@dreaminfinity7716 5 жыл бұрын
Mindboggling 🙄😮😮
@kid_kulafu_1727
@kid_kulafu_1727 5 жыл бұрын
We want more!!!!!
@inshafahmed8656
@inshafahmed8656 4 жыл бұрын
Ur awesome man!!!
@mbjelica947
@mbjelica947 5 жыл бұрын
Great videos on cryptography! How about maybe sometime doing a video on Nikola Tesla and his inventions, including some of the technical aspects? So fascinating and revolutionary.
@zachstar
@zachstar 5 жыл бұрын
Thanks! And could definitely be a good video idea. I’ll see what I can do with that.
@shivashankar28
@shivashankar28 5 жыл бұрын
Please we need more Electrical engineering videos not CS stuff
@skyline7532
@skyline7532 4 жыл бұрын
This is awesome
@gamesniper98
@gamesniper98 4 жыл бұрын
You’re awesome
@samgallon1273
@samgallon1273 5 жыл бұрын
First video I have ever seen with 0 dislikes despite having more than 10 k views
@chinkeehaw9527
@chinkeehaw9527 4 жыл бұрын
Sam Gallon Now it has 4 dislikes
@aashitashyam6060
@aashitashyam6060 4 жыл бұрын
People probably saw your comment and disliked the video just to prove you wrong.
@hassanm.1887
@hassanm.1887 4 жыл бұрын
@@aashitashyam6060 true
@OneCatholicSpeaks
@OneCatholicSpeaks 5 жыл бұрын
Interesting video. I was just thinking that if the uncracked code was a string of letters, then I could enter that string into a computer programmed with the formula. Have the computer cycle through possible cypher numbers until a string of three letters to a viable word such as or and see if the rest of the cypher follows and translates.
@jayh5992
@jayh5992 5 жыл бұрын
You should maybe mention what is considered a "safe prime number" on the Diffie-Hellman.
@andreavecchio4674
@andreavecchio4674 4 жыл бұрын
at 7:23, shouldn’t x and n(so m and n in the demonstration) be coprime to apply euler’s formula? Great stuff btw
@stevenshrii
@stevenshrii 2 ай бұрын
If you know e, but to find d.. d=1:while(d< some-number){if ((e*d) mod n)= 1){print d}:d++} it will show all the possible of d
@rocksonrong8401
@rocksonrong8401 4 жыл бұрын
Hey I have a question. I noticed that there can be multiple values of d(private key) (e.g.- d=63 also works for the above example). But isn't the private key supposed to be unique?? How do you explain that??
@carlfels2571
@carlfels2571 3 жыл бұрын
I take Cryptography I at my university this semester :)
@benoit__
@benoit__ 4 жыл бұрын
So, the key is chosen by the Prime number and number on the Diffie-Hellman Protocol or is it random?
@user-um7tw6kx4r6
@user-um7tw6kx4r6 2 жыл бұрын
That Stanford course is NOT for beginners, unless "beginners" means "advanced math students, who never used their advanced math for Cryptography specifically"!
@aizhigitmamatov5214
@aizhigitmamatov5214 2 жыл бұрын
why do the values you and your friend select for diffie hellman protocol have to be less than the mod divisor (in this case 23)?
@BrunoValleBR
@BrunoValleBR 4 жыл бұрын
How did you get to congruent to 8 in the first calculation?
@1Backi
@1Backi 2 жыл бұрын
Thank you for the Video - im trying to get warm for potential studies next year and even for someone that didnt study much of anything durring the last decade it really gives some understanding in how these encryptions can work - so big credits for that. I actually have a hard time understanding why the mod(N) is not really "reflected" in the term m^ed at 6:39 if some smart people want to explain it to me :-)
@gamereditor59ner22
@gamereditor59ner22 5 жыл бұрын
Interesting notion. Can one time pad work with end to end encryption to pass the secret key successfully without "Eve" detecting it?
@zachstar
@zachstar 5 жыл бұрын
Technically yeah it could but you need a key for the one time pad anyway so if you were able to establish that key somehow beforehand then you wouldn't need to send one.
@gamereditor59ner22
@gamereditor59ner22 5 жыл бұрын
@@zachstar Thanks for the information and keep up the good work!
@woobilicious.
@woobilicious. 4 жыл бұрын
Addition & subtraction under modulo 128/256 in binary is just xor, and most symmetric cyphers just generate a fake one time pad that is xor'd with the plaintext. And again xor'd to decrypt.
@-B-n-S
@-B-n-S Жыл бұрын
when I divided the value of G to the power of A by the Value of P i got a remainder of 0. is that a problem?
@alleygh0st
@alleygh0st 3 жыл бұрын
So what you are saying is p and g are the public key, a is my own private key and g^ab (mod p) is our secret key? Or am I missing something?
@steventran739
@steventran739 5 жыл бұрын
Make video about architecture
@erdemyilmaz6172
@erdemyilmaz6172 2 жыл бұрын
Can you make a video on sha256?
@user-dg8rr8pl6f
@user-dg8rr8pl6f 4 ай бұрын
I have a question, what do e and d mean?
@AakashKumar-gl2fk
@AakashKumar-gl2fk 3 жыл бұрын
Today I felt: Prime numbers r prime for many reasons. Salute to all prime numbers serving for humanity and cryptography
@imagineaworldwhereallyourw7859
@imagineaworldwhereallyourw7859 Жыл бұрын
5:00 Not explained how one chooses 7 and 23; is 23 easy to calculate knowing 7 and Fi(N)?
@SamvitAgarwal
@SamvitAgarwal 5 жыл бұрын
Doesn't the entire security of RSA rely on the value m then? Since an eavesdropper knows e,n and the value of m^e mod n, couldn't they just brute-force to find the value of m?
@hughjazz4936
@hughjazz4936 4 жыл бұрын
Yes, they can. That's why those values are chosen such that bruteforcing it would take 10 to 15 years with the best computers available. Every code can be cracked given enough time, but the point is that this time is long enough for the message to not be relevant anymore. Once computers get fast enough to crack codes in a reasonable time, you simply choose bigger values.
@MSneberger
@MSneberger 4 жыл бұрын
It is thought that the number of atoms in the universe is around 10^80, which is roughly equivalent to 2^265. This means that brute forcing a 256-bit encryption key would be equivalent to counting every atom in the universe, which while theoretically possible, is not "really" possible.
@rizolli-bx9iv
@rizolli-bx9iv 3 жыл бұрын
Generally euler theorem is the fundamental of cryptography
@BederikStorm
@BederikStorm 8 ай бұрын
Is it Dan Boneh's course?
@tomtian895
@tomtian895 4 жыл бұрын
turns out your professor may not care more about your grade than an youtuber.
@gazfilm693
@gazfilm693 3 жыл бұрын
2:27 ".. and this means they either need the value of a or b. Either one works because once they have it they can figure out what this entire value is." Um, what? Huh? Why? How? Thank you
@rickyleung5890
@rickyleung5890 5 жыл бұрын
why can't the eavesdropper solve the equation? e.g. 5^a mod 23 = 8 i.e. 5^a = 23n + 8 where n is an integer i.e. a = log(23n + 8, 5)
@zachstar
@zachstar 5 жыл бұрын
How are you gonna find n? n is gonna be so big that even a super computer wouldn’t be able to do it fast enough.
@mathematicalninja2756
@mathematicalninja2756 5 жыл бұрын
I would use quantum computer to find the discrete logarithms.
@Darticus42
@Darticus42 5 жыл бұрын
Mathematical Ninja good luck finding a quantum computer with more than 5 qubits and can run Shor's Algorithm
@Darticus42
@Darticus42 5 жыл бұрын
Ricky Leung also keep in mind that the primes everyone knows (23 and 5 in the example, and thus 8 as well) are also extremely large. Taking a log of a number like that is also going to be very difficult with a classical computer when you have to compute it so many times to find a and n
@SeeingGreenDevils
@SeeingGreenDevils 4 жыл бұрын
ok so do we use RSA OR DH? or are they used together? i know DH exchanges secret keys so why need RSA? I'm missing something there obviously.
@woobilicious.
@woobilicious. 4 жыл бұрын
Both are used, DH is used to exchange a key for symmetric algorithm (because RSA is slow), but RSA is used for identity authentication, so you're not doing DH with Eve pretending to be Bob (man in the middle attack)
@maddyIncubus
@maddyIncubus 3 жыл бұрын
where is the link to the course ?!
@zachstar
@zachstar 3 жыл бұрын
top of description
@zajec11
@zajec11 4 жыл бұрын
How do you select e and d? It seems that you've picked them somewhat at random, but what are the rules for picking those numbers computationally?
@jameswang7362
@jameswang7362 4 жыл бұрын
You can select e relatively prime to phi(n) and then compute d (the multiplicative inverse of e) with the Extended Euclidean Algorithm.
@Gotta270101
@Gotta270101 3 жыл бұрын
Great video! But please somebody help me out: at 6:32 you raise (m^e) to the power of d. But how? You don't know m^e, you just know (m^e MOD N). Shouldn't (m^e MOD N) be raised to d?
@1Backi
@1Backi 2 жыл бұрын
same question, could you find an answer?
@Tejas-mm6tu
@Tejas-mm6tu Жыл бұрын
Hey did you get ans?
@Tejas-mm6tu
@Tejas-mm6tu Жыл бұрын
@@1Backi hey did you get ans?
@1Backi
@1Backi Жыл бұрын
@@Tejas-mm6tu kzbin.info/www/bejne/rYmlXomVgMqcq5o&ab_channel=ArtoftheProblem i guess this helped me understand better
@UMAIRKHAN-cz3pn
@UMAIRKHAN-cz3pn 5 жыл бұрын
Make a video on blockchain also.
@jamesedward9306
@jamesedward9306 2 жыл бұрын
I realize this is an old video, with the most recent comment being several months old but I have a specific question on some confusion I have. First let me say I viewed part one and this video and I'm with it all except for a small part at the 1:30 -1:50 mark. As you summarize how it all works you say that what you and the friend did was: (g^b)^a (mod p) (g^a)^b (mod p) and that = g^(a*b) (mod p). But that's not what you actually did a little earlier. You did g^a (mod p) and sent THAT result to your friend, who then applied his secret key, b to it. And you did vice versa. Thus yielding your common secret key, or 2. With the notation (g^b)^a (mod p) are you saying 5^4^6 (mod p) ?? 5^4^6 is an enormous number. Shouldn't that notation read read: ((g^b) mod p)^a (mod p) = 2 the shared secret key. I only raise the issue because you talk about g^(ab) and I don't see you doing that exact calculation anywhere earlier. It could be I just don't understand mod notation. Zach or anyone else, help here would be appreciated. Big fan Zach, love your stuff.
@PandaBros863
@PandaBros863 4 жыл бұрын
Can someone explain how he got 5^6(mod23)=8, I saw his first video but I don’t understand the math behind this specific problem I’m lost
@moveonvillain1080
@moveonvillain1080 4 жыл бұрын
5^6mod(23)=remainder of ((5^6)÷23) which is 8
@moveonvillain1080
@moveonvillain1080 4 жыл бұрын
This mod is what u use in programming language , its the algebraic operator denoted by % in programming language
@PandaBros863
@PandaBros863 4 жыл бұрын
Tanay Verma thank you
@tsunami5884
@tsunami5884 5 жыл бұрын
why is the 0 with a line in it 5?
@hammadibrahim39
@hammadibrahim39 4 жыл бұрын
It's phi (φ), not 5.
@PhysicsBro-xb8qx
@PhysicsBro-xb8qx 5 жыл бұрын
WHAT IS YOUR DEGREE OR PROFESSION IN MY OPINION YOUR A ENGINEER
@Thmyris
@Thmyris 5 жыл бұрын
He is an engineer
@adrianokano8949
@adrianokano8949 5 жыл бұрын
He is an Electrical Engineer
@x78340
@x78340 5 жыл бұрын
He is a Math wizard
@rickh3714
@rickh3714 5 жыл бұрын
I have just posted my new Zodiac Killer Z340 decryption. It is in a Billowy wave format not in the dreaded cryptographical grid beloved of some mathematical types! Please click on the round abstract humanoid profile icon to see. Thanks.
@Darticus42
@Darticus42 5 жыл бұрын
Rick H rule 1 of crypto: never roll your own crypto
@harjitsingh7308
@harjitsingh7308 5 жыл бұрын
Darticus the Great that doesn't mean you can't make your own crypto and play with it ;)
@rickh3714
@rickh3714 5 жыл бұрын
Darticus the not so great? What rot! This case has not been 'solved' for 50 years because people have not thought outside the box. There are no explicit rules for the cryptographical methods of the esoteric and unhinged. They subvert the existing orthodoxies don't they? I have solved- to a coherent English sentence and pertinent appended German word , by an 'Archimedean' spiral algorithm, the Ebeorietemethhpiti letter remainder of the Z408. Also the Riverside Confession letter's 50 year hidden Morse transcript. 'Intestis as I hone Z... Mete Stine I ensure it fund... etc etc. My Z34O solution may not satisfy an exclusively (myopic?) mathematical mind that is blind to the visual and geometric clues of an esoteric thinker. Godel himself showed that solving something and being able to provide a mathematical proof are not necessarily co-evident. What is wrong with finding a ' liquid' state solution to the Z340? 'Zodiac' hints at this a multiplicity of times with his wordplay (some in Latin). There are more clues to the initial 340 keyword in another communique that I have yet to present. Throw away Occam's rusty old razor and conventionality when it comes to esoteric coding and highly complex personalities.
@unitedstatesofindia1460
@unitedstatesofindia1460 3 жыл бұрын
Only 44k made it .... Not-at-all-strange
@alwaysincentivestrumpethic6689
@alwaysincentivestrumpethic6689 4 жыл бұрын
Difficult
@matthewto7406
@matthewto7406 5 жыл бұрын
First again?
@rakra4551
@rakra4551 3 жыл бұрын
what's with the annoying background music ?
@TheRealInky
@TheRealInky 3 жыл бұрын
Mind your ps and qs :D
@xamael1989
@xamael1989 5 жыл бұрын
Your looks more like 5
@ShopperPlug
@ShopperPlug 3 жыл бұрын
Coursera is garbage, Udemy.com is way better.
@shivashankar28
@shivashankar28 5 жыл бұрын
Please we need more Electrical engineering videos, not CS stuff
@Darticus42
@Darticus42 5 жыл бұрын
Shiva Shankar Nah this is fine too
The Mathematics of Symmetry
18:23
Zach Star
Рет қаралды 136 М.
The Mathematics of Cryptography
13:03
Zach Star
Рет қаралды 388 М.
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 64 МЛН
How many pencils can hold me up?
00:40
A4
Рет қаралды 19 МЛН
MOM TURNED THE NOODLES PINK😱
00:31
JULI_PROETO
Рет қаралды 23 МЛН
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 4 МЛН
Public Key Cryptography: RSA Encryption Algorithm
16:31
Art of the Problem
Рет қаралды 927 М.
How Quantum Computers Break Encryption | Shor's Algorithm Explained
17:31
minutephysics
Рет қаралды 3,1 МЛН
The Sierpinski-Mazurkiewicz Paradox (is really weird)
13:03
Zach Star
Рет қаралды 436 М.
Secret Key Exchange (Diffie-Hellman) - Computerphile
8:40
Computerphile
Рет қаралды 942 М.
Math and Physics of the Everyday
15:03
Zach Star
Рет қаралды 196 М.
The Mathematics of Diffie-Hellman Key Exchange | Infinite Series
13:33
PBS Infinite Series
Рет қаралды 86 М.
How did the NSA hack our emails?
10:59
Numberphile
Рет қаралды 1,2 МЛН
Public Key Cryptography: Diffie-Hellman Key Exchange (short version)
5:24
Art of the Problem
Рет қаралды 527 М.
狼来了的故事你们听过吗?#天使 #小丑 #超人不会飞
00:42
超人不会飞
Рет қаралды 64 МЛН