How RSA Works

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • RSA is an extremely popular cryptosystem used to secure Internet communications today. In this video, John describes RSA encryption and shows a real example of how to encrypt and decrypt using RSA.

КОМЕНТАРІ • 108

  • @bryanmccaffrey1
    @bryanmccaffrey1 7 років тому +31

    One of the best, right to the point, explanations of RSA. Thanks.

    • @devcentral
      @devcentral  7 років тому +2

      glad you enjoyed it!

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

      ​@@devcentral i dont understand how to get E and D :(

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

      @@amirsalarsalehi4968...great question! That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

    I've been to multiple forums, read multiple articles, and this video is the only thing that helped me understand RSA. Good work and thanks

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

    I love your videos! Extremely helpful for whenever I'm having trouble in class!

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

      Yay! Glad they help and thanks for the comment!

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

    very well explained, you have solved a mystery to me.

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

    One of the finest explanation. I start loving these lighboard l essons

  • @stingoh
    @stingoh 2 роки тому +2

    It would have made sense to expand on how to determine d.

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

    Your videos are so cool and simple John.

  • @emmapaczkowski2982
    @emmapaczkowski2982 Рік тому +3

    Hi, I was wondering how you get the value of d, ,when I do the calculations for d = 7^-1 mod (120) I get one as 120 = 7*17 +1 which to me indicates that the answer for d is 1? Thanks:)

  • @HunterFrenzy23
    @HunterFrenzy23 2 роки тому +2

    Brilliant video. Thank you!

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

    Man, you simply rock!
    Congratulation for the great job!
    Thank you!

  • @kodder
    @kodder Рік тому +2

    Thanks! very useful!

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

      Glad it was helpful! And, thanks for the comment!

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

    Except for not minding his Ps and Qs , this video is awesome!

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

      glad you enjoyed it! and, we will tell John to mind his Ps and Qs. :)

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

    Thanks !

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

    Pls help me get d= 7^-1 (mod 120) = (1/7) (mod 120) = 103 ?? Thanks

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

      That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

      I also got stuck there but this helped. en.wikipedia.org/wiki/Modular_exponentiation
      Basically we are trying to replace the value 7 with a value that would make the following true. 7*X (mod 120) = 1
      103 solves this equation:
      7*103 = 721
      721 mod 120 = 1

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

      He wrote d = e^(-1) (mod ⏀(n)) but also he mentioned that GCD of e has to be 1:
      d = 1/e (mod 120) ≡ 1 (mod 120)
      d⋅e mod 120 = 1
      d⋅7 mod 120 = 1
      103⋅7 mod 120 = 1
      d =103

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

      here is a video to explain how to get d: ua-cam.com/video/Z8M2BTscoD4/v-deo.html

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

    This video is phenomenal, really nice work!!

  • @ones9638
    @ones9638 4 роки тому +10

    this man is highly skilled in the art of writing backwards

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

      I think they reverse the video.

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

      @@cosmikrelic4815 I doubt it. The writing on his shirt is the right way around

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

      @@uni1014 It's pretty easy to print a T-shirt backwards, easier than writing backwards. I haven't checked intensively but it looks to me as if there are a lot of left-handed presenters. Not conclusive of course, maybe people who can write backwards are predominantly left handed.

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

      ua-cam.com/video/U7E_L4wCPTc/v-deo.html

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

      @@nawnwa Thanks for that :-)

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

    Thank you! Great teacher!

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

    very well explained. thx

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

    John... Amazing explanation. Love the way..

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

      thanks...glad you enjoyed it!!

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

    Thank you soo much! You are amazing and a great help to me

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

    Hi from Argentina. It was one of the best explanation about RSA. Thank you for share with us.
    Only one question, the value "e" is a random value or derive from other calculation?.

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

      Its a random prime number. There are excelent programs to generate big primes, so its usually random.

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

    thank u so much sir'

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

    Great video. I don't understand why 7^-1 mod 120 would be 103 though.

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

    I had trouble following since I don't know how modules work, but It connected enough when you said how to break it

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

      glad you found it useful!

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

    The part where you said that most times the exponent "e" is same, and since an attacker would also will also get the "n". Would this not make him/her to find the privkey "d" using d=e^-1(mod phi(n)) ??? Unless you mean that the problem to find Euler's Totient "phi" is a bigger problem without knowing the actual 2 primes.

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

      Hi nawnwa, great question! You are correct that the issue is finding Euler's Totient "phi". The attacker (or anyone else for that matter) would know the values for "e" and "n" but would have a mathematical problem in trying to figure out Euler's Totient or "p" or "q". Hope this helps!

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

    How did you calculate d to be 103? How do you solve 7^(-1) mod (120)? I'm so confused.

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

      Hi Pragati...great question! That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

      find d so that (d*e) mod φ(n)=1. 103*7 mod 120 = 1. so, d can be 103

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

    Great video

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

      Thanks Tommy...glad you enjoyed it!

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

    Thanks for this vid that help me understand rsa

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

      Thanks Garfy Y...glad you enjoyed it!

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

    great explanation

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

      thanks...glad you enjoyed it!

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

    What if the plaintext information that you wanna encrypt aren't only numbers like letters and such are also present how does it happen then?

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

      Hi Anthony...great question! Ultimately, all characters (numbers, letters, etc) can be converted to binary 1's and 0's (and then converted back once the operations are complete). This way, you can run the mathematical equations on everything. Thanks!

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

      @@devcentral do you mean ascii sir?

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

    in your example your e is 7
    but with the same given number is it ok if my calculated e is not 7 but still between 1 and totient?

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

      The value of "e" is very important (as are all the values in the RSA algorithm) and it relates to the other numbers in a specific way. So, while it's true that the value of "e" needs to be between 1 and totient, it is also important that it is the correct value given the other values (p and q). So, in this specific case, "e" would need to be 7. I hope this helps...thanks!

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

      @@devcentral but how to tell if it is correct?

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

      the value "e" must be 2 < e < totient, and GCD( e, totient ) = 1

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

    How (inverse of 7) mod (120) is equal to 103?

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

      Great question! That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

    Thanks

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

    let us say that I find "p" and "q", then what about "e" ?. Should I try every number from 1 to the totient of "n" to find out "d"?

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

    Either this guy is really good at writing in reverse with his left hand or his shirt is printed mirrored

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

      you can see how we do it here. You're half correct: ua-cam.com/video/U7E_L4wCPTc/v-deo.html

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

      men's button flaps are left over right. his is right over left, signifying an inverting of screen

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

    Imagine someday you read the news, and it says somebody just figured out how to calculate that prime numbers 😮

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

      That's a real possibility one day! In fact, that's the exact reason RSA bit strength keeps going up...to make it harder to factor out the prime numbers. If you have a larger number, then it's harder to factor it out correctly!

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

      @@devcentral once somebody know how to calculate those without brute force, big big number won't matter anymore.
      Remember, our generation has a lot more population than last century. So there must be multiple number of Einstein-like people.

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

    This is how math should be taught in public school.

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

      Thanks! Maybe schools could show this video... :)

  • @viggo-lv2fm
    @viggo-lv2fm 3 роки тому

    My TI-Nspire Cas Student tool can't calculate d. when i type mod(120,7^-1) it says 0. Can anyone help?

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

    What is the number of RSA keychain that keeps changing every 30 seconds? That number correspond to which variable in this video?

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

      Great question! The RSA encryption described in this video is the public key cryptosystem used for key exchange between browser and web server. This cryptosystem is not tied to one specific company or computer...it's used by millions of computers and web servers all over the world.
      On the other hand, there is a company named RSA (www.rsa.com) that specializes in all sorts of computer security solutions and technologies. The RSA keychain that you are asking about is a specific product that the RSA company offers to customers (community.rsa.com/docs/DOC-62315). This keychain provides authentication services to users and can also be used to do things like sign emails, encrypt files on your computer, etc. A user can input the number that is displayed on the keychain in order to gain access to the computer or application. The number on the keychain can be programmed to change every 30 seconds to make it very hard for attackers to break into the authentication session.
      I hope this helps clarify for you!

  • @a.yashwanth
    @a.yashwanth 4 роки тому +1

    How do you find 7-¹ mod 120.

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

      That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

    why do we use extended euclidean algorithm if we have e^-1 mod Φ(Ν) ?

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

      That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

  • @imwings
    @imwings 7 років тому +2

    how did you get: 7^-1 (MOD (120)) = 103?

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

      That's probably the hardest part of this entire system. It would take a lot to explain it here in these comments, but here's a great explanation of how to use the Extended Euclidean Algorithm to help find the value for "d"
      crypto.stackexchange.com/questions/5889/calculating-rsa-private-exponent-when-given-public-exponent-and-the-modulus-fact
      In the example at the link above, they don't use the exact same numbers that I did, but the concept is the same. I hope this helps!

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

    how to the two end know the p,q

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

    how can you do this like I mean how u shoot this video.

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

      We have an article on DevCentral that shows the magic behind the curtain and details our equipment/build: devcentral.f5.com/articles/lightboard-lessons-behind-the-scenes

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

      Davinci in 20 century~

  • @YuNgHaSaN
    @YuNgHaSaN 3 роки тому +6

    This man really proves that university is a waste of money and time. I took 14 minutes of my life to understand the RSA than it took 3 hours of my lecturer going through it.

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

      This video shows the core mechanics or RSA, which is okay, but it's also important to understand why RSA is secure, why it's hard to factor very large, why it's important that p and q be primes, etc. I don't know if your lecturer tried that, but even 3 hours is not enough to go over all of that, unless you already have a background with modular arithmetic and cryptography. It's one difference to have an idea what RSA is roughly about (perhaps that what's you were after), and another to understand the why and how.

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

    The private key isn't "n" it's p and q. Even though they equal "n" when multiplying together, you're losing the point that they are the private values.

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

      Hi Jesse...thanks for the comment. As you said, p and q are private values that are multiplied together to get n. When referencing the private key, I'm referring to the actual private key that is the complement to the public key in a given RSA implementation. The public key is actually a key pair consisting of the values e and n. The private key is also a key pair...consisting of the values d and n. The public key is shared with everyone...the private key is kept secret on the server. Thanks again for the comment!

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

    must be hard to write all that mirrored lol

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

    The answer is 46, how come you get 9?

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

      Hi Jason. This is a great catch! I ran several versions of numbers on my notes before I recorded the video. I was using several different combinations of the variables, and I must have mixed up one of the variable values...very sorry about that! Obviously, the formulas and the process for RSA still holds true, but I should have double checked these numbers before I used them in the example. Again, great catch, and sorry for the mistake!!

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

    How is this guy writing? It's driving me crazy...

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

      You can see how we produce these: ua-cam.com/video/U7E_L4wCPTc/v-deo.html

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

    Forget RSA, is he mirror writing?

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

      nope the screen picks it up and is recorded in that format