blog

Proving RSA Encryption: An Application of Group Theory (Part 3: Digital Signatures and Euler's Totient Function)

We’ve finally proved Fermat’s Little Theorem and explained some of the machinery behind groups and rings. Let’s continue by defining an important function.

Definition (Euler’s Totient Function): Let φ:Z+Z+\varphi: \mathbb{Z}^+ \to \mathbb{Z}^+ be defined as φ(n)=\varphi(n) = the number of integers less than or equal to nn that are relatively prime to nn for nZ+.φn \in \mathbb{Z}^+. \varphi is also known as the Euler phi-function.

As you can see, it can be quite hard to procure a general formula for φ(n)\varphi(n) for all nn. However, in some cases it is relatively easy— for example, if nn is prime, then φ(n)\varphi(n) is simply n1.n-1. Recall from the last post that the Euler phi-function simply defines the order of the multiplicative group of units Z_n\*.\mathbb{Z}\_n^\*. We now state an important theorem:

Theorem (Euler’s Theorem): Let aZa \in \mathbb{Z} be relatively prime to n,n, that is, gcd(a,n)=1.\text{gcd}(a,n)=1. Then

a{φ(n)}1({mod}n),a^\{\varphi(n)\} \equiv 1 \, (\text\{mod\} \, n),

where φ\varphi denotes the Euler phi-function, and nZ+.n \in \mathbb{Z}^+.

Proof: Euler’s Theorem is equivalent to the following statement: For all aZ_n\*a \in \mathbb{Z}\_n^\*, aφ(n)1a^{\varphi(n)} \equiv 1 (mod nn). We know from a previous theorem that any element of a finite group raised to the power of the order of the group is 1.1. Since Z_n\*=φ(n)|\mathbb{Z}\_n^\*|=\varphi(n), we have

a{φ(n)}a{{Z}_n\*}1({mod}n).a^\{\varphi(n)\} \equiv a^\{|\mathbb\{Z\}\_n^\*|\} \equiv 1 \, (\text\{mod\} \, n). \quad \boxtimes

Notice that the reasoning behind the proof is almost the exact same as the proof of Fermat’s Little Theorem: Indeed, Euler’s Theorem is simply a generalization of Fermat’s Little Theorem— Fermat’s Little Theorem simply describes the case where nn is prime.

Update (2025): The rest has been omitted because I couldn’t get the KaTeK align environment working.