RSA Encryption Explained - Proof of RSA

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

КОМЕНТАРІ • 44

  • @sofiaflynn317
    @sofiaflynn317  3 роки тому +5

    Please note that Euler's Theorem is conventionally given as a^[phi(n)] mod n = 1 if gcd(a, n) is 1. Then have:
    M¹ ⋅ M^[phi(n)x] mod n (timestamp: 14:26)
    = M ⋅ (M^[phi(n)])ˣ mod n --> exponent rules
    = M ⋅ (M^[phi(n)] mod n)ˣ --> b/c aᵐ mod n = (a mod n)ᵐ
    = M ⋅ (1)ᵏ --> by Euler's Theorem
    = M ⋅ 1
    = M
    Apologies for any confusion

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

      the original formula should be {M ⋅ (M^[phi(n)])ˣ} mod n.

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

      How we can tell that M and n are relatively prime? Please answer

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

      ​@@asmap3096 their greatest common factor is 1

    • @catorlife
      @catorlife 2 місяці тому

      @@asmap3096 N equal p.q (multiplication of 2 prime numbers), of course it cannot be divisible by any random integer M

  • @dragonslayer98767
    @dragonslayer98767 3 роки тому +8

    It's absolutely shocking how difficult it is to find proofs of well known theorems that go through the actual logic for why each steps was taken. Thank you for this.

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

    But how do we know that M^e < N? If this isn't the case it wouldn't work right?

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

      there is a restriction how big the e can be compared to N, also the N which is used in the algorithm is a huuuge number compared to e

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому

      We don't know this at all. This video is not the best explanation of RSA. We know that M

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

      @@benhayter-dalgliesh5794 i can't catch this

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

      @@benhayter-dalgliesh5794 pls explain is M and n are relativel prime?

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

    Finding this video, has me feeling the same when I found $100 bill in my dirty pants. While broke. While bored. God bless you.

  • @andrewsquest628
    @andrewsquest628 10 місяців тому

    This video is a great blessing! It's very hard to find details onto why this method works, but you provided perfect explanation, which fill in all the gaps for me ❤

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

    At 14:45 you somehow take the M^1 out of the mod expression, which cannot be done, thus you cannot just simplify the other part to 1

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому +1

      You can do this here because the result, M, is less than N. If you have the mod of a product of 2 numbers, a and b, you can take a or b out so long as the result is less than n. AKA (ab)modN = a * (bmodN) if a * (bmodN) < N.

    • @AlexStormDrake
      @AlexStormDrake 11 місяців тому

      @@benhayter-dalgliesh5794 that makes sense, but why is that the case for M? Sorry its been 2 years I honestly forgot a bit. Thanks for the reply tho, that clears something up

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому +1

      @@AlexStormDrake Because M represents the message that is being encrypted/decrypted. And it is simply a condition that the message must be smaller than N. This is because the decryption process will never yield the original message if M > N because it is mod(N)

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому +1

      @@AlexStormDrake Note the decryption equation at 1:53, for this equation to work, M simply must be less than N

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому +1

      It is also worth noting that this video is not the best to watch to understand why RSA works. It has a few flaws, for example the modular arithmetic exponentiation law at 3:20 works for all values of a, not just when a

  • @asmap3096
    @asmap3096 8 місяців тому +1

    Well said😍

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

    At 7:41 7d = 1 mod 3120 might be calculated using Extended Euclidean Algorithm - might require less computation than guessing the number. Aside from that the material explains the topic very well ;)

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому

      another note is the modular exponentiation law at 3:08 works for all values of A. Showing that it works only for A

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

    holy moly thank you SOO much ! This is GOLD !

  • @AbhinavKumar-qn1dt
    @AbhinavKumar-qn1dt 6 років тому +6

    Hi there, just one question :
    There is restriction on M that M must be less than N, but M^e may or may not be less than N, then how can we use Euler?

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

      Abhinav Kumar that restriction is not necessary

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

      @@joefagan9335 Is there a seperate proof that shows how the modular exponential law is still true when A>N?

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому

      did you ever find an answer

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

    This is an amazing explanation!

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

    I might be wrong here but I think Euler’s Theorem is based on the proof he presented for Fermat’s Little Theorem stating that X^p-X is a multiple of P. Eg. 4^5-4 = 1020 is equal to 204 * 5 therefore a multiple of 5.

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

    Aarigato Sofia kun.

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

    Thank you so much

  • @ucTran-bb1mt
    @ucTran-bb1mt 2 роки тому

    Thank you! It made my day.

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

    😊 🙏 😊
    thanks for sharing with us!

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

    that's not the euler's theorem. Euler's theorem states that if a and n are coprime, then a^(phi(n)) mod n = 1, there is no positive integer x that's in the exponent of a

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

    You are proving it using Euler's theorem but, Euler's theorem only work when GCD(M, n) = 1. So in the case that GCD(M, n) > 1 then this didn't prove how RSA still works in that situation

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому

      The Euler's theorem proof of correctness can be extended to show correctness for such cases, although in a practical system, GCD(M, n) > 1 is almost never the case. So proofs like this are generally considered good enough. But RSA does still work for GCD(M, n) > 1, it just requires a little extra maths to show it.

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

    Best explanation on the internet

    • @benhayter-dalgliesh5794
      @benhayter-dalgliesh5794 11 місяців тому

      Except there are a many gaps and a few flaws. For example, the exponentiation law at 3:20 works for all integer values of A, not just for A

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

    Ultimate

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

    thanks

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

    thank you so so much

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

    Thankyou for this

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

    Thanks :)