Appearance
Fermat's little theorem
Consider modular arithmetic under modulo . We fix number so that . Let us write a function where . We argued before (when we proved that the inverse exists) that is a bijection. Therefore,
This gives us . Equivalently, divides . When is prime, we know that divides .
Theorem 18 (Fermat's little theorem (F$\ell$T))
For any prime and number that is not divisible by , we have .
Remark the distinction between the elementary F$\ell$T and the much-more-difficult-to-prove Fermat's Last Theorem (FLT). The correctness of RSA follows from a simple application of F$\ell$T.
Theorem 19 (Correctness of RSA)
We have that .
Proof:
Since
, we can write for some integer . Therefore,
We argue that and , which would imply the desired result (do you see why?). We only prove the former claim (the latter case is symmetrical). To prove , we consider two cases:
- If is divisible by , notice that is also divisible by .
- If is not divisible by , we can apply F$\ell$T to obtain and therefore
Exercise 49
Prove that for all integer . Your proof should be at most a few lines (in particular, do not list all possible choices of ).