The RSA Encryption Algorithm (2 of 2: Generating the Keys)

Поділитися
Вставка
  • Опубліковано 3 лис 2014

КОМЕНТАРІ • 931

  • @Sahil-ph1bp
    @Sahil-ph1bp 7 років тому +990

    4:10 "I KNOW you think you are talking softly. You are not talking softly" LOL ROASTED

    • @Subtitles00
      @Subtitles00 6 років тому +187

      7:50 "Is it really that hard? :(" This dude just casually destroying kids while teaching RSA, amazing.

    • @benriminton4718
      @benriminton4718 6 років тому +78

      He might be saying "Is it really that hard to STFU?"

    • @MrMamfbr
      @MrMamfbr 5 років тому +15

      such a smooth way to burn

    • @amit_bisht
      @amit_bisht 4 роки тому +54

      @@Subtitles00 That was encrypted message for "Stfu bit*h!". Only people with some processing power are able to decipher such messages.

    • @mikecmw8492
      @mikecmw8492 4 роки тому +7

      Obviously this class has mentally challenged people who should not be there.

  • @thebillington
    @thebillington 8 років тому +2551

    I'm currently revising for my cryptography final year exam, and this video is the best RSA explanation I've found anywhere. Just a shame that some of his class doesn't keep quiet, they don't realise they're listening to a genius!

    • @mmmajeed
      @mmmajeed 8 років тому +39

      +Billy Rebecchi its realy good to watch some one explaining things in this manner ...

    • @gib1262
      @gib1262 5 років тому +7

      Billy Rebecchi agreed

    • @youth756
      @youth756 5 років тому +6

      me too preparing for final exam...

    • @dragonore2009
      @dragonore2009 5 років тому +4

      Not for a final, but I used this so i can test out my program to see if it was written correctly.

    • @julianmjk5120
      @julianmjk5120 4 роки тому +61

      I enjoy the background ambience of the audience, it's normal for them to make some noise, it also makes it feel less lonely, unlike many other such videos. Eddie Woo's enthusiasm is the absolute best though!

  • @jihochoi_cs
    @jihochoi_cs 7 років тому +665

    I want to go to this secondary school instead of my university. lol

    • @missghani8646
      @missghani8646 5 років тому +34

      same, I had such an amazing teacher, but he only teaches secondary and i miss his classes now that i m doing my degree, gems like these teachers are needed at each uni or school

    • @tanveerhasan2382
      @tanveerhasan2382 5 років тому +27

      wait, its a secondary school?

    • @missghani8646
      @missghani8646 5 років тому +2

      @@tanveerhasan2382 yh

    • @joaogabriel6929
      @joaogabriel6929 4 роки тому +65

      what? secondary school, learning rsa wtf? Some people are so lucky. Damn i wish i had that in my school

    • @mmcgames8499
      @mmcgames8499 4 роки тому +1

      I fell u bro

  • @DuncanInUK
    @DuncanInUK 4 роки тому +462

    Starting to think the concepts in my uni lectures are probably actually quite simple, just the delivery is horrible.

    • @saloni8818
      @saloni8818 4 роки тому +4

      same

    • @TheMalitias
      @TheMalitias 3 роки тому +32

      That is the case very often. Quite a lot of teachers/professors want to seem smarter by making their topic appear more complex than it actually is.
      If you understood everything and can simplify what they are saying and they react insulted, you know they're just trying to show off instead of teaching.

    • @safer3853
      @safer3853 3 роки тому +4

      I am in a cryptography class right now, and this is literally the easiest explanation I have found... I agree with you 100%

    • @jmcantila9104
      @jmcantila9104 3 роки тому +3

      Academic institutions make a profit off making things seem more difficult than they are

    • @ABobroff
      @ABobroff 2 роки тому +3

      he kinda skipped over the most important steps like: using euclid's algorithm to solve de = 1 (mod n), fermat's little theorem and euler's theorem . There is at least half of a semester of learning about discrete math before you could truly learn RSA in a rigorous manner. Understandable for HS teaching but in uni u need to understand the proof behind things, not just the equations.

  • @thomasappel2973
    @thomasappel2973 4 роки тому +408

    We need more teachers like this...
    He's teaching faster, more accurate and more fun and energetic it sometimes doesn't even feel like he is teaching but is telling us a nice story

    • @CharlesVanNoland
      @CharlesVanNoland 3 роки тому +14

      That's how it is when a teacher is actually passionate about what they're teaching. :P

    • @sophocles1198
      @sophocles1198 Рік тому +1

      Feels like he is teaching to me. The whiteboard is a giveaway

  • @Mathiasmaxi1
    @Mathiasmaxi1 4 роки тому +183

    "Every sixth multiple is a multiple of sixth"
    Genius

  • @jhewitt2008
    @jhewitt2008 8 років тому +747

    You're an exceptionally talented teacher. Thank you

  • @sanvedlop
    @sanvedlop 6 років тому +348

    I'd trade ten of my current professors to get you to teach me.

    • @BroadVisions92
      @BroadVisions92 4 роки тому +2

      lol

    • @wonderfulworldofmarkets9033
      @wonderfulworldofmarkets9033 4 роки тому +17

      Right? I think most teachers care more about being in power than their students learning. One time all the students in our class collected our notes and shared them on Google Drive so that we could learn Chemistry better and the teacher found out and threatened that she would fail us if we did it again. She cared more about us struggling to write down notes + pay attention rather than us learning the material and getting better grades. Compare that to Eddie who happily uploads his lectures on youtube! Sometimes the current school system / current school teachers are so backwards.

  • @abdulazizrehan
    @abdulazizrehan 4 роки тому +142

    I remember studying 3 courses on Cryptography during my Masters in Theoretical Computer Science taught by a renowned research leader in the field, but I haven't seen anyone explain RSA so beautifully!

    • @nazhasabiri4825
      @nazhasabiri4825 4 роки тому +12

      if Eddie Woo explains it better than your teacher, than Eddie is the leader in the Theoretical Computer Science.

    • @gytisx13
      @gytisx13 4 роки тому +4

      Well, he only explained a very simplified RSA. Though understanding simplified way first probably would help to understand underlying formulas and stuff better.
      Btw maybe he does in the next video I did not check.

    • @wonderfulworldofmarkets9033
      @wonderfulworldofmarkets9033 4 роки тому +15

      ​@@gytisx13 No I think he leaves it at this level without going deeper that because he's teaching high schoolers. In all of Eddie's videos it seems like he struggles to dumb down his lessons as to not intimidate his young students and keep them engaged. It's sad that he's such a caring teacher that even when he tries to do that students talk during class (4:10) or give up saying it's so hard (7:54).
      Like he says its to complicated explain the mod calculator "trick" that takes about 2 seconds to understand. Or why the the number of coprimes of the product of two primes is just the product of 1 minus each prime (which is explained in a simple understanding of prime numbers).
      I feel like his highschool students not really caring is what has made him into such a great teacher. Compare that to college where the students are so compelled to learn for the high tuition or job prospects but it causes the opposite effect: professors can bullshit their lecture slides and put little to no effort into class.

    • @2wr633
      @2wr633 5 місяців тому

      ​@@wonderfulworldofmarkets9033 you said it's very easy to understand why the amount of coprimes with pq between 1 and pq is (p-1)(q-1) but i have tried so hard and still can't figure it out, can you explain for me why that is the case?
      Edit: nvm i figured it out after asking

  • @ankurkumardubey9324
    @ankurkumardubey9324 4 роки тому +229

    For people who are wondering what happened at 11:14
    The private key d is derived from the following formula:
    d = (k*Φ(n) + 1) / e for some integer k
    At step 5 instead of doing what Eddie did, I'd suggest for you to use this formula instead which is basically the same thing.
    The little trick here is that k has to be such an integer, that k*Φ(n) + 1%e=0
    (% stands for the mathematical mod)
    So let us try and find k for the above example where Φ(n)=6 and e=5
    if k=1, 1*6+1%e = 2
    if k=2, 2*6+1%e = 3
    if k=3, 3*6+1%e = 4
    if k=4, 4*6+1%e = 0
    if k=5, 5*6+1%e = 1
    if k=6, 6*6+1%e = 2
    if k=7, 7*6+1%e = 3
    if k=8, 8*6+1%e = 4
    if k=9, 9*6+1%e = 0
    So k=9 is our answer. Notice that we did not stop at k=4, because that would give us d=5
    and the idea here is that d and e cannot be the same.
    Hence, for k=9
    d = (k*Φ(n) + 1) / e = 11.

    • @alejandrobrufal257
      @alejandrobrufal257 4 роки тому +4

      Thank you very much, I need it for a Covid App and your explanation was very useful!! 😁

    • @icommented9850
      @icommented9850 3 роки тому +11

      what if we choose 17 of 11? using 17 for the secret key decrypts the message. so can there be multiple "d" for the same "e"? wouldnt that make different private keys?

    • @charlietran7182
      @charlietran7182 2 роки тому +5

      You do realise that he's teaching a class of high school kids yeah? If you throw your equations at them they will be bored the hell out. Keep your explanation to the simplest form like Eddie was doing here

    • @Unstable_dio
      @Unstable_dio 2 роки тому +6

      how can we apply this for huge numbers, we can't cycle through millions of possibilities when e is too long, it'll take way too much time

    • @cheerio4742
      @cheerio4742 2 роки тому

      thanks, also does using extended euclidean algorithm have similar pattern?

  • @antelope6826
    @antelope6826 Рік тому +26

    I've worked in cyber security for 10+ years and Eddie just explained RSA better than I've ever understood it. Love his style of teaching so much, it is so elegant and succinct!

  • @philippegorov367
    @philippegorov367 8 років тому +146

    Man you're brilliant. Make some online courses and world will be better !

  • @MattBellamy87
    @MattBellamy87 8 років тому +152

    Best explanation on youtube

  • @peterhober8124
    @peterhober8124 2 роки тому +15

    Finally. 40 years old and today I just understood exactly how RSA works, how and why the math actually works. Thank you!

  • @Kearney999
    @Kearney999 8 років тому +58

    His enthusiasm is extrodinary and his delivery is second to none. A genius in understanding material, and teaching! You've got a bright future!

  • @RainingArtillery
    @RainingArtillery 4 роки тому +68

    2 of 2? I feel robbed! We were getting to all of the good stuff. :(

  • @lololol112
    @lololol112 8 років тому +191

    amazing video! shame when there are people in the class not wanting to listen and yet so many people around the world who would kill to be in their place..

    • @tishachoudhuri7082
      @tishachoudhuri7082 6 років тому +1

      I agree

    • @silverzero9524
      @silverzero9524 5 років тому +11

      well i dont completely agree
      his explanation is good no doubt about it
      but
      do u consider how bored the students might be ? other teachers may not be good at teaching ? they were exhausted and wanted a break but didnt get 1. So its only natural to talk with others or do something that may disturb teacher

    • @its.moonjc
      @its.moonjc 5 років тому +7

      @@silverzero9524 Thats all assumption. Why are you speaking for them 😂

    • @annapoorania8860
      @annapoorania8860 5 років тому +1

      So trueee!

    • @Enigmater14
      @Enigmater14 5 років тому +9

      In uni and have a professor who sits and reads verbatim from slides for an hour. I would love to have someone as enthusiastic as Eddie teach me.

  • @findthekeys3855
    @findthekeys3855 3 роки тому +16

    I'm at the end of my first semester of a cyber security degree and I just can't get over how brilliantly explained this was. There is SO much more to teaching than just dumping knowledge out there - this video should be shown to all university professors as an example of top level teaching. A wonderful teacher you are Eddie.

  • @yeln4tsmusic
    @yeln4tsmusic 5 років тому +2

    I learned more about RSA encryption through this video than I have ever learned from any other article, book, or video. Thank you so much for making these videos!!!! Instantly subbed!!!

  • @GMIosi
    @GMIosi 3 роки тому +1

    Eddie, not only I'm learning math in a great way, I'm also learning a lot about education just by watching your videos. Keep up the awesome work you do!!

  • @kinglouiecd
    @kinglouiecd 3 роки тому +3

    Whenever I can't figure out a math concept, I look for an Eddie Woo video on it. You are an excellent teacher, sir.

  • @LFSPharaoh
    @LFSPharaoh Рік тому +7

    Great explanation. A shame the class was so disruptive. I would have been laser focused if I was there. It's one of my favorite clever-math things I've come across. I always revisit it from time to time.

  • @Dennis-td3um
    @Dennis-td3um 4 роки тому +2

    This man is such an amazing teacher I'm literally sitting here being awestruck about how great he is at explaining this topic.

  • @zakumownzu
    @zakumownzu 6 років тому +1

    You did an incredible job explaining this concept, thank you so much! I wish there were more teachers like you.

  • @harrytaller9403
    @harrytaller9403 6 років тому +6

    Eddie, you are the best teacher that I have seen in my life, I started my career as CS Teacher with Asia' s largest school.

  • @nlwarrior
    @nlwarrior 8 років тому +3

    I may not aspire to become a teacher, but I am already looking up to you for the contributions your online lessons bring to us students. Keep up the good work :)

  • @ethan6708
    @ethan6708 3 місяці тому

    The fact that this dude just dropped some major RSA knowledge bombs while simultaneously dealing with a classroom of what I presume are unruly and disrespectful college students(aka ADULTS), is amazing. This is the best cryptography video I have ever seen, hands down.

  • @fraserporter5518
    @fraserporter5518 3 роки тому +1

    Eddie makes math easy and the communication is impeccable. well done!!

  • @jijsaxton
    @jijsaxton 6 років тому +5

    Currently learning network security and cryptography as one of my uni subjects. I have to say this video really helped me to understand the RSA algorithm. Brilliant teacher!

  • @clemfoua661
    @clemfoua661 5 років тому +204

    "is it really that hard? " *sad and kinda disapointed face*

    • @Teslacoil33
      @Teslacoil33 4 роки тому +12

      Nothing sadder than a sad Eddie ☹️

    • @duffmandje
      @duffmandje 4 роки тому +2

      I thought a thug life meme would start at that point

    • @orange_leaf4913
      @orange_leaf4913 4 роки тому

      aw :c

    • @gamertechkid1490
      @gamertechkid1490 4 роки тому

      did someone leave? or was a student talking again?

    • @poisonpotato1
      @poisonpotato1 3 роки тому

      I thought the student was talking again

  • @agusnurhalim9671
    @agusnurhalim9671 2 роки тому

    Stumble into this, by accident. Wow, what a good teacher you are. Definitely brilliant explanation.

  • @JITCompilation
    @JITCompilation 4 роки тому +1

    If I took your class I would pay SUCH close attention because you are amazing at explaining things!

  • @leynenslucker2991
    @leynenslucker2991 4 роки тому +6

    wow...... I never learned cryptography, never had any experience over higher level math.
    I understood every step. This is great.
    Very late to the party, but I like Eddie Woo's lectures

  • @v1991c
    @v1991c 6 років тому +153

    omfg how old are the students?! they should be grateful they have such an explanation before their eyes.
    i certainly did not learn this in highschool, and in the university there were no kids...therefore i am intrigued

    • @tld8102
      @tld8102 4 роки тому +13

      Students are teenagers. This is high school

    • @ArtyomPalvelev
      @ArtyomPalvelev 4 роки тому +19

      When you're a teenager, you got more important things to worry about than coprime numbers and modular arithmetics :)

    • @ryank2465
      @ryank2465 4 роки тому +8

      dawg you assume everyone on earth has the same mindset/priorities as you do lmao. you have the benefit of hindsight

    • @Norogoth
      @Norogoth 4 роки тому +5

      @@ArtyomPalvelev Oh yeah I am sure they are discussing vital issues much more important than their education. Give me a break.

    • @arianphilips5777
      @arianphilips5777 3 роки тому

      @@ArtyomPalvelev poor mentality

  • @calcifer1234
    @calcifer1234 3 роки тому

    I am very bad at maths and have been trying to get my head around RSA for ages and this video is what made it click for me. Thank you!

  • @onwarmermusic
    @onwarmermusic 3 роки тому

    I was struggling with the various components of this algorithm, but this explanation clarified everything. Just a fantastic contribution. Thanks so much for making this!

  • @The3nlightened0ne
    @The3nlightened0ne 7 років тому +18

    You're an amazing math teacher.

  • @thegoonist
    @thegoonist 4 роки тому +62

    honestly, this guy is easily in the top 1% of teachers. if hes being paid accordingly, i.e. he should be earning millions IMO.

  • @Lina-mb3vt
    @Lina-mb3vt 3 роки тому

    What a briliant explanation! I can't believe, some of the students did not listen carefully, you're an amazing teacher!

  • @chrischauhan1649
    @chrischauhan1649 5 років тому

    Most enthusiastic teacher i ever seen!! Awesome Explanation.

  • @gokulgopi9129
    @gokulgopi9129 9 років тому +24

    What a power in your deliver :) luvd it

  • @MateoHrastnik
    @MateoHrastnik 7 років тому +3

    Eddie you're a great man. You made my life so much easier. Thank you for this!

  • @BillFlann9
    @BillFlann9 Рік тому

    Excellent, interesting and rather fun explanation. Very clear - Thank you so much for posting. I'm glad I found your channel Professor Woo

  • @krunokartus5382
    @krunokartus5382 6 місяців тому

    Incredible teacher, with real passion and energy. Eddie really enjoys the job. Thank you for the excellent lecture.

  • @casualyoutuber6239
    @casualyoutuber6239 4 роки тому +13

    Dude you jusy killed it, I learnt RSA in like 20mins which my teacher couldn't fully deliver in a 2 hours lecture.
    You are a really brilliant teacher and you explain stuff so well right down at the level of a student 👌👌

  • @standriggs2420
    @standriggs2420 4 роки тому +4

    Note that in this example, e=5 and d=11, but 5 and 11 are the same when used as the exponent power mod 14. That is the lock is the same as the key in this particular case (which defeats the purpose).
    Also, the formula for Phi (Euler's totient function) given here only works for N that is the product of 2 primes. In general, if p is the list of the prime factors of N, phi(N) = prod(p-1) * N/prod(p). Which is to say that if you factor N, phi will be the product of the unique primes minus 1, times the repeated factors. For example N=5x5x7=175, phi(N) = 4x6x5 since the 5 factor is repeated.

  • @brademerson8035
    @brademerson8035 4 місяці тому

    Eddie, this was a GREAT presentation of this, holy smokes. I'm in an online CompSci curriculum, and I had to learn this last year. The math seemed really difficult at the time, and now watching your video for a refresher as we get into SSL/TLS/RSA/HTTPS, it seems so simple! Thanks for keeping these videos up! Also I laughed my ass off "I know you think you're talking softly, but you're not talking as softly as you think you are." you're obviously a very well tempered professor who's great with students. Don't ever lose that man!

  • @user-eq3ol7hs6z
    @user-eq3ol7hs6z 2 роки тому

    One of the greatest lessons which I have watched. Good luck!!! I could easily understand the main concept of this algorithm. Thank you so much for your brilliant explanation absolutely free !!!

  • @GauravBoraJodhpur
    @GauravBoraJodhpur 5 років тому +3

    How can you talk in his class!! You teach beautifully Eddie!

  • @TheHsuya
    @TheHsuya Рік тому +19

    He's such an expressive teacher and really wants to impart all the knowledge he has. The students should be more respectful(silent) when he's working so hard for them!

    • @TheMR-777
      @TheMR-777 Рік тому +1

      I was thinking the exactly same.

  • @fairchild9able
    @fairchild9able 7 років тому +1

    Great work Mr. Woo! I too am doing a MSc exam! Elegant explination! Very subtle behaviour management skills aswell. I hope your students recognise the fantastic teacher they have!

  • @noahglimcher5445
    @noahglimcher5445 9 місяців тому

    I was working for hours and hours to try to get an understandable and digestable explanation of RSA and you did it for me so beautifully I couldn't have asked for more. Now 1 or 2 years later when I wanted to refresh my memory because I wanted to start working on an encryption project of my own I remember how well you explained it to me and came right back. Thank you for explaining this complex topic to me so well, and setting an amazing example for teachers everywhere.

  • @PopeLando
    @PopeLando 8 років тому +3

    Gah! I'm just learning this stuff and while watching the previous video I used the proper algorithm to figure out the d, but all I could get was 5 and I couldn't figure out where he got 11. So now it turns out I was right all along! James Grime at Numberphile did the same thing - picked numbers so tiny you end up with e = d (which destroys the whole point!)

  • @sagarkc6381
    @sagarkc6381 8 років тому +5

    Thank you so much. I thought I would never ever understand this

  • @marcusnapoli9234
    @marcusnapoli9234 5 років тому

    Eddie, as a current student at university I cannot thank you enough for your clear and simple explanation. No one in the world can explain something so complex in such an easy to understand way. Cheers Pal :)

  • @rodmorgan9165
    @rodmorgan9165 4 роки тому +1

    I'm 63, worked for over 40 years in data networking, software development and project management in the telecom industry. Thanks to Mr Woo, I now understand the underlying logic of encryption/decryption. You're never to old to learn and Mr Woo is an exceptional teacher. Thank you.

  • @heliousss
    @heliousss 8 років тому +11

    thank you so much i understood every word you said

  • @leequdgns
    @leequdgns 9 років тому +15

    I think it's worth to note that d is a multiplicative inverse of e mod (p-1)(q-1)

    • @iycgtptyarvg
      @iycgtptyarvg 7 років тому +4

      He sort of said that when he showed that d was added to the encryption formula e(mod phi(N)). What he did not explain is why d*e*(mod phi(N)) has to be 1.
      Also, he didn't tell them the maximum length of the message is limited to N. So, for instance, with his numbers it would not have been possible to encrypt the letter 'Z' in one step.

    • @MrNoxiium
      @MrNoxiium 3 роки тому

      @@iycgtptyarvg why not? If my N is 247. What is the highest number I can encrypt/decrypt?

    • @sander_bouwhuis
      @sander_bouwhuis 3 роки тому +1

      @@MrNoxiium [0,246]. But, with his numbers you cannot do more than [0,13].

  • @clottenbach6869
    @clottenbach6869 6 років тому

    The procedure is better explained than in my university handouts. Thank you, this short video helped me a lot!

  • @westonreed4836
    @westonreed4836 6 років тому

    This is the best explanation of RSA I've seen yet. Great work!

  • @mistsu1171
    @mistsu1171 4 роки тому +3

    I have a few questions:
    1. Why do we need to pick e between 1 and Φ(N)?
    2. Why when we find d, it's found in such a way that de mod Φ(N) = 1?

  • @derpyscratch9078
    @derpyscratch9078 5 років тому +8

    Eddie Woo, the man, the myth, the legend... he is the lord of this mathematical world, a deity among mere mortals... we love you Eddie, we love you.

  • @abdullahalam2088
    @abdullahalam2088 3 роки тому

    This is hands-down the best explanation of RSA in existence. Amazing.

  • @vaibhav81
    @vaibhav81 5 років тому

    Superb.. one of the best explanation of RSA I have heard recently.

  • @halogenlampert
    @halogenlampert 7 років тому +3

    how do you check if your chosen e and d fulfill these criteria for insanely large numbers tho?

    • @sabinrawr
      @sabinrawr 6 років тому +6

      If you're doing it on paper, you could expect it would take a long time. Luckily, computers are REALLY good (and fast) at doing multiplication and modulo arithmetic. Using massive numbers, with the aid of a computer that has already been given the process, it shouldn't take more than a few seconds. Even with extremely massive numbers. The power of RSA comes from one thing that this brilliant teacher didn't cover in this video, and that is the fact that factoring larger and larger numbers take exponentially more time.
      One easy way to get the value of D is if you have de(mod phi(N)), d = e*phi(N)-1. The number 29 would work equally well as 11. We can check 5*29=145. 145/6~24.167... or 14 45 mod 6 = 1. With small numbers, there seem to be a lot of options for D. But as we'll see, the bigger we make P and Q (and by extension, phi(PQ)), the more disparate and hard-to-guess D becomes.
      Once you decide on prime values for P and Q, the rest of the math is trivial for a computer. But, you never tell anyone those values. They only get to know that the product of P*Q=14. Let's say you chose larger numbers, and their product is 143. It's not super hard, but it's not trivial (11 and 13). Now try 44,747,819... it's getting harder (6599 and 6781). Now try that with two prime numbers that are 400+ digits long. It will take all the computers in the world longer than the age of the Universe to figure that out... UNLESS you already know one or both of the factors! The largest known prime number has over 23 million digits. Good luck, Eve!

  • @Nico-ny2om
    @Nico-ny2om 7 років тому +5

    Such a complicated thing made simple !

  • @asdfgpredyz92
    @asdfgpredyz92 2 роки тому

    Defenitely he is the best instructor, I'm here because of my java communication encryption homework for MSc CSE. Greetings from Hungary! :) Keep it up!

  • @pcbona
    @pcbona 2 роки тому

    you can clearly see, that he himself is passionate about the things he teaches. This helps alot in bringing the point across. Have seen so many videos where they only explain the theory or explain it with an example that has very large numbers and are hard to follow. This is the best explenation of the RSA algorythm i could find on YT and i have watched a lot of videos. Great teacher. He is not getting the attention he deserves for his genious.

  • @lyuboslavkanev8702
    @lyuboslavkanev8702 6 років тому +5

    Why did we choose 11 as the private key? 5 seems to also do the work, but the math is easier. Did we choose it for the sake of the example, or is there another reason?

    • @illiacvie
      @illiacvie 5 років тому +10

      The point of RSA is an asymmetric encryption. Where sender and receiver of the message didn't have same key.
      If he use (5,14) for both sender and receiver will have same key.
      This coincident can happen because he use 2, and 7 as 'p' and 'q' for the sake of simplicity in calculation.
      If we use bigger prime number for 'p' and 'q', most of the time sender and receiver will have different key (asymmetrical).
      for example if we use (7,33) to encrypt , we can't use (7,33) to decrypt the message.
      let says we send B or 2.
      2^7 mod 33 = 29
      if we tried to decrypt using (7,33) we got : 29^7 mod 33 = 17 (it's wrong message, it should be 2).
      but if we use (3,33) to decrypt the message : 29^3 mod 33 = 2.

    • @rafaelalbarello1292
      @rafaelalbarello1292 5 років тому

      @@illiacvie I think that is not what he meant. He's not trying to use the same key, he's asking why at 11:12 he didn't chose 5 , as he went for 11.
      I've tried to look for an answer, but I've only found that the number "e" can be calculated with another method, but nothing on the "reasons it's a little harder to explain". Maybe it's in the extended euclidean algorithm, but that i haven't checked myself

  • @Mux31
    @Mux31 4 роки тому +14

    "... one times six, whaaaaat" :D

  • @malavbadu663
    @malavbadu663 2 роки тому +1

    Simply amazing. What a teacher he is. The energy and the explanation. uff.

  • @fillpattanamontri8698
    @fillpattanamontri8698 2 роки тому +1

    Ive never been taught by such a passionate teacher/professor as you!

  • @ankitsagar255
    @ankitsagar255 5 років тому +4

    but in that case, we could have many decryption keys. ain't it?

  • @getnomercy4657
    @getnomercy4657 3 роки тому +3

    Isn;t it weird that you can actually decrypt the cipertext with the lock. 4^5 = 1024, 1024/14 = 73.1428......, that - 73 gives 0.1425... and if you mulitiply this by 14 it gives back 2. I mean, am I the only one to notice this. It isnt a good formula or just not a good example of the RSA algorithm.

  • @PixlStyx
    @PixlStyx 4 роки тому

    Man, you are a life saver... i don't care how old this video is it still holds up. thank you for such an awesome explanation

  • @user-jp4qy5ij5h
    @user-jp4qy5ij5h 2 роки тому

    Thank you for much for explaining this. I have been wondering why prime numbers are important for RSA but couldn't find anyone using an example like this! Your students are lucky to have you!!!!

  • @Michaels0184
    @Michaels0184 8 років тому +14

    Sorry why did you pick the 11 again? tHANKS

    • @auroraaa._.
      @auroraaa._. 4 роки тому +9

      I know this comment comes from 3 years ago... But oh well I can't help to reply..
      On 09:00 there's step 5, de(mod Φ(N))=1, where the value of e is already known as 5
      5.d(mod 6)=1, in mod 6, every 6th step will always gives remainder of 0
      So to complete 5.d(mod 6)=1 equation, we'll pick 6th step minus 1
      The d value can be (6,12,18,24,30) minus 1 = 5,11,17,23,29
      So the decryption key can be (5,14) or (11,14) or (17,14) and so on.
      To proof if above decryption keys are correct, let's calculate back:
      1) key (5,14) -> 4^5 (mod 14) = 1,024-(74x14) = 2 -> (5,14) is correct
      2) key (11,14) -> 4^11(mod14) = 4,194,304-(299,593x14) = 2 -> correct
      3) key (17,14) -> 17,179,869,184-(1,227,133,513x14) = 2 -> correct
      So the conclusion is: He choose 11 because the decryption keys can be 5,11,17,23,29
      Hope this helps someone in the future.. :D

    • @AverageJoe8686
      @AverageJoe8686 4 роки тому

      @@auroraaa._. You didn't understand the question. If the keys can be any of the set {5, 11, 17...} why choose 11 versus 17, etc.?
      The question is: What actually defines a public versus private key? Is this arbitrary? Computational speed limit? Crypto-strength? How do you weigh this?

    • @auroraaa._.
      @auroraaa._. 4 роки тому +1

      @@AverageJoe8686 He chose 11 over 5 (or 17) because he wants to shows that on simpler math, the key can be multiple. This happens because he used smaller number on p & q.
      What defines a public key?
      The logic is like this, when you lock your door on your house, you will always choose to use complicated one. So thieves will have longer time to break through your door, even though the thief can just use hacksaw, or TNT as 'bruteforce' way to break your lock.
      In real usage, the decryption key usually only has 1 or several possible key due to usage of high modulus number, on my previous comment, there's mod 6, so in every 6th thep, there will be a valid key.
      So if we use (for example) mod 1,000,000,000 the key is only valid for every 1,000,000,000th step.
      I hope you get what I mean

    • @AverageJoe8686
      @AverageJoe8686 4 роки тому

      @@auroraaa._. You still didn't get it.
      11,000th prime versus 17,000th prime. Is this arbitrary? Computational speed limit? Crypto-strength? How do you weigh this?

    • @auroraaa._.
      @auroraaa._. 4 роки тому +6

      @@AverageJoe8686 Nowadays, the minimum acceptable crypto strength for RSA is 1024-bit, or equivalent to 80-bit symmetric key.
      RSA is an asymmetric system, while an example of a symmetric system is AES (Advanced Encryption Standard).
      The strength of RSA 1024-bit key is more or less equivalent to AES 80-bit key, it is also approximately equivalent to another encryption algorithm known as Triple DES.
      The 1024-bit here is not the string length, where as 'abcdef' is 6 string length. The algorithm use Base64 encoding to cope with the string length.
      Below is the strength equivalency between symmetric key and asymmetric key:
      80 = 1024, 112 = 2048, 128 = 3072, 192 = 7680, 256 = 15360
      The difficulty of breaking 112-bit compared to 80-bit strength is 2^48 times more difficult.
      A 80-bit key strength is recommended to be obsolete at 2010 by the National Institute of Standard and Technology (further read: csrc.nist.gov/CSRC/media/Projects/Key-Management/documents/transitions/Transitioning_CryptoAlgos_070209.pdf)
      RSA 512-bit can be broken by a normal 2GHz PC in about 73 days, requiring 5 GB of diskspace and 2 GB of RAM.
      NIST determine the obsoletion of a key strength by calculating the speed and computational power needed for a key to be broken.
      And also, English is not my first language, so if your question is not answered yet, perhaps you can rephrase it.

  • @MrQwerty2524
    @MrQwerty2524 7 років тому +11

    Did he mean a common factor with 2 and 7? How are 8 / 10 / 12 a common factor of 14?

    • @scottza
      @scottza 7 років тому +28

      He means to share a common factor of 14 from my understanding. Because 2 is a factor of 14 and it also is a factor of 8, 10 and 12. Therefore they share a common factor. :-)

    • @MrQwerty2524
      @MrQwerty2524 7 років тому +1

      Thanks a lot mate!

    • @cyberguide_in
      @cyberguide_in 7 років тому

      I also did not understand what he meant to say. Perhaps, +Eddie Woo can make it clear.

    • @aparnamahalingam1595
      @aparnamahalingam1595 6 років тому

      He mainly meant common factor with 2; all even numbers (here, because we are dealing with 14 = even) will share at least common factor, i.e., the number 2. Therefore, they're all eliminated.

    • @confidential303
      @confidential303 6 років тому

      Aparna Mahalingam where does q=7 came from couldnt follow it.

  • @Selanthe
    @Selanthe 6 років тому

    This is the most understandable explanation of RSA I've found. Thank you!

  • @tedkoler6301
    @tedkoler6301 Рік тому

    Eddie, I love the passion you bring to your classroom [and your videos]! I ran into an issue with your explanation: if the modulus < number of characters in the set of possible characters being encoded, the decryption will not return the original character since the modulus 'repeats'. So if you're encoding the upper alphabet (A - Z), the modulus would have to be 31. Also, if the modulus results in a zero or one remainder, your resulting encryption/decryption will be either a zero or a one (raise zero and one to a power and the result is zero or one, respectively). Try encrypting/decrypting 'hello'; the decrypt comes as 'hella' since the letter 'o' is the 15th letter. The public key (5,14) encrypt produces a remainder of 1. The decrypt of 1 is also 1.

  • @AL-go2mv
    @AL-go2mv 6 років тому +5

    Tell those students to shutup!

  • @RokSlana
    @RokSlana 8 років тому

    Thank you very much for this upload, sir. This is by far the best explanation of the RSA algorithm. It all makes sense finally.

  • @annapoorania8860
    @annapoorania8860 5 років тому

    You are one freakin awesome teacher! Really enjoy your lectures. They are both fun and interesting and make you want to use your brain

  • @Dinho675
    @Dinho675 Рік тому

    Acredito que seja a melhor explicação sobre RSA que já encontrei. 😁

  • @DenysVitali
    @DenysVitali 7 років тому

    I wish I had you as a teacher. Wonderful explanation, you're the coolest teacher ever!

  • @fadygamilmahrousmasoud5863
    @fadygamilmahrousmasoud5863 2 роки тому +1

    my doctor explains this in a 3 hours lecture and i can't see the big picture of the algorithm or where these numbers are exactly come from, you are amazing thank you 😄

  • @riasadbari1872
    @riasadbari1872 9 місяців тому

    You are one of the top 10 educators the world has ever witnessed... Your students are lucky to have you.

  • @veen8616
    @veen8616 2 роки тому

    This is incredibly useful. I'm a grade 9 student who needed to get a refresher on RSA for a school thing, and this vide was simple enough that I could easily understand it.

  • @bing_liu
    @bing_liu 3 місяці тому

    Thank you for the video. My teacher at CIT just read a PowerPoint slide with no explanation. Now I can understand the whole procedure.

  • @berkaay1977
    @berkaay1977 7 днів тому

    The best explanation to RSA that I've seen. Thank you!

  • @rachelluo4300
    @rachelluo4300 8 місяців тому

    The most vivid and detailed RSA explanation I've ever seen!

  • @earthpatel365
    @earthpatel365 4 роки тому +1

    These kids are being spoiled lol my prof in college can't explain anything in 90 minutes yet I feel comfortable about RSA with you :) thank you!

  • @CosmoNovic
    @CosmoNovic 4 роки тому +1

    Got this video recommended to me and I managed to finally get the hang of it you're an amazing teacher

  • @anumsheraz4625
    @anumsheraz4625 7 років тому

    I was sleepy... but now I am not. They way he delivered such a complex topic in an interesting and exciting way, AWESOME !

  • @udara5966
    @udara5966 5 років тому

    Best tutorial on the process of RSA. THANKS Mr Eddie Woo!

  • @jamesmagliocco7736
    @jamesmagliocco7736 2 роки тому

    Really helped me understand RSA for one of my assignments. Thank you so much.

  • @tonytheprogrammer542
    @tonytheprogrammer542 Рік тому

    8 years later and this is probably the best explanation I've seen so far👌

  • @chrisyang05
    @chrisyang05 Рік тому

    Mate, I've been using RSA for my entire career and never bothered to learn the maths behind it, thinking it'll be a waste of time. Thanks to your video, now I know it's not impossible to comprehend. Thanks!

  • @DarylStark
    @DarylStark Рік тому

    This (and part 1 as well) are maybe the best vids I have seen on UA-cam!

  • @TheDilanson
    @TheDilanson 3 роки тому +1

    The best lecturer I have ever seen... Thank you so much sir. I am so happy