- One of my favorite symbiotic relationships between Number Theory and Cryptography is the intricate. Number Theory provides the reliability that an algorithm works and Cryptography shows us the how secure it is when attacked. RSA incorporates of my favorite theorem in Number Theory and its elegance has allowed us to provably send secure messeges in the modern age.
The Number Theoretic History of RSA
- It all starts with Fermat, and his discovers of the peropeties in numbers. We start our journey with Fermats Little Theorem : \
Fermats Little Theorem
- If p is a prime, then
Proof!
- Fermats little theorem lets us examine polynomials of the following form:
- Using Fermats little theorem, we apply a small restriction, only allowing numbers n = p-1. However, when we send messages to one another, its translated to binary and binary can be interpreted as any integer. This is when Eulers theorem comes in handy in allowing us to use any positive integrer!
Eulers Theorem
- If and , then
Proof!
Lemma) Reordering a set of co-prime numbers
- Let , where We construct another set, call it . We claim that .
Proof
In multiplying by an arbitrary element in S, we transposed the elements in the set. Hence a transposition of elements in the set results in two equal sets
- Using the above lemma, we can do the following: (note: is beign used as a group action to denote the transposition of the index)
The Cryptographic part of RSA
In most Cryptographic Algorithms, we need to use very large primes(click here to find out why). Lets denote these two large primes p and q. When we multiply p and q, we create a composite number which, using the technology of 2025 is really hard to predict. Using the euler-totient function , we can now generate an encrypted message in the following way. Let C be our encrypted message, then Here is a chart of all the variables to keep track of:
| Variable | Reference |
|---|---|
| p, q | Large Primes Numbers |
| modulus () | |
| Public Key () | |
| Message that we want to send | |
| Private Key () |
To generate the private key, you must use the euclidean algorithm.