By Q. Zhang KS
1. Introduction
Euler’s totient function, denoted by , is a fundamental arithmetic function in number theory initially conceived by Euler in his investigations concerning modular arithmetic and power residues modulo composite integers. The function was introduced in 1763 as part of a generalisation of Fermat’s Little Theorem, now known as the Euler–Fermat Theorem.
Previously, Pierre de Fermat had established that for any prime such that . Euler sought to extend this property to composite moduli. This inquiry motivated the development of the totient function , which maps a positive integer to the number of integers from that are coprime to .
Definition 1.1. The totient function is defined as the cardinality of the set of integers up to that are coprime to :
2. Properties of
Definition 2.1. An arithmetic function is termed multiplicative if given that . It is termed completely multiplicative if this condition holds for all without the restriction of coprimality. Euler’s totient function is multiplicative, however it is not completely multiplicative.
2.1 Multiplicativity of
Theorem 2.1. If and are coprime positive integers, then .
Proof. Let and be the elements of and respectively. We claim that each element of is made from one unique pair and hence their number .
Initially we are given a pair so we can create a solution of the simultaneous congruences and , by the Chinese Remainder Theorem. We may express this as , containing two terms where the first term has and , which are all coprime to and the second term has and , which are all also coprime to . Thus it follows that is coprime to . We may now reduce so that it lies within the range to and thus belongs to . It is also clear that if or is altered we must also get an altered .
Moreover, given an element belonging to , we are able to reduce it to give an element , and since is coprime to it must be that is coprime to and therefore must belong to . Similarly we can reduce to give an element which belongs to .
If two elements result in the same pair , then and , and since we obtain . Thus we have established a bijection between and , completing our proof.
2.2 Totient Function of Prime Powers
Theorem 2.2. Let be a prime and a positive integer. Then
Proof. The totient counts the number of integers given that and . The only prime factor of is , therefore we must have for any which does not satisfy the given conditions. The only integers between and inclusive that are divisible by are the multiples of :
Upon factoring out the term, these correspond to the choices of coefficients from the set , so there are exactly such elements that do not satisfy the conditions of the totient function. To calculate the number of integers coprime to , we simply subtract the count of multiples of from the total number of integers in the interval:
and we are done.
2.3 The Product Formula for
Theorem 2.3. For any integer with prime factorization ,
Proof. We are able to prove this product formula by mathematical induction on the number of distinct prime factors of .
Base Case (): If for some prime , then by Theorem 2.2, we have , which satisfies the formula given when the product is tested with the single prime divisor .
Inductive Step: Assume the formula holds for any integer having distinct prime factors. Let have a prime factorisation of . We can express as , where possesses distinct prime factors and satisfies .
Since is a multiplicative function (Theorem 2.1), we can factor the totient as:
Applying the inductive hypothesis to and Theorem 2.2 to , we obtain
Grouping the scalar terms and combining the other products yields
Thus by induction, the formula holds for all integers .
3. The Euler–Fermat Theorem
The most well-known application of Euler’s totient function in number theory and applied cryptography is the Euler–Fermat Theorem, often also referred to as Euler’s Theorem, which provides a generalisation of Fermat’s Little Theorem, the proof of which we give below.
Theorem 3.1. (Euler–Fermat)If is a positive integer and is an integer such that , then
Proof. Let be the distinct residues (mod ) which are coprime to and is any element of this set. This is known as a reduced residue system modulo . By our definition, we have that each is coprime to , so that no two elements are congruent modulo , and thus the total number of elements in is exactly .
Now consider the set of residue classes formed by multiplying each element of by :
We claim that is also a reduced residue system modulo by verifying two properties:
- Coprimality: Since and for each , we have that . Thus it follows that each element in must be coprime to .
- Distinctness modulo : Suppose for the sake of contradiction that for some , then . Since , we obtain . Now each lies between 1 and inclusive, hence . As the residues are distinct, this forces . Contradiction establishes the result.
Consequently, also consists of distinct residue classes, each of which is coprime to , thus it is a permutation of the residues in modulo . Then we may evaluate the product of the elements in and congruent modulo as follows:
Factoring out from the left-hand side produces
Let . It is true that each is coprime to , thus their product must also be coprime to . Therefore, there exists some multiplicative inverse for modulo , and multiplying both sides by this inverse, we may cancel out the term and yield
4. Cryptographic Applications
The totient function forms a key part of the RSA cryptosystem, which uses a public key to encrypt messages and a private key to decrypt them. While anyone is able to use the public key to encrypt a message, a message can only be decrypted when an individual is given access to the private key.
The RSA private key refers to a pair of numbers where is the publicly available modulus and denotes the private exponent which allows a person to unlock the message from the ciphertext :
and a key equation connects the public component and the private key :
Herein lies the vulnerability associated with , that is if an adversary were to gain access to it, they could use the Extended Euclidean Algorithm to compute the modular inverse of modulo , thereby finding the private exponent instantly. More significantly, knowing bypasses the intractability of the system upon which RSA’s security depends: while multiplying two very large distinct primes and to yield is trivial, reversing the process to recover the prime factors and from only is believed to be infeasible for modern computers given sufficiently large and . Knowledge of and its multiplicative properties reduces the issue to elementary algebra as
Thus an attacker may simply rearrange to find the sum of the two primes:
and the product and the sum of the two secret primes satisfy the following quadratic equation:
which can instantly yield and .
Therefore is the fundamental architectural tool required to formulate the key during the setup and its preservation is essential to the integrity of a secure system.
5. Conclusion and Discussion
From its origins in modular residue classes and the proof of Euler–Fermat, Euler’s totient function acts as a bridge between elements of elementary number theory, abstract algebra and modern applied cryptography. However, the cryptographic significance of remains only a small facet of its overall theoretical importance, with it being a key domain for mathematical inquiry in many other fields.
These include the algebraic generalisation of counting coprime residue classes beyond the ring of integers to general Dedekind domains and algebraic number fields as well as the analytic behaviour of within analytic number theory. The study of its average order reveals elegant asymptotic density properties, as in:
Its broader behaviour directly links to the distribution of primes and longlasting open questions in number theory such as Lehmer’s Totient Problem and Carmichael’s Totient Conjecture. Ultimately, , though simple in its initial combinatorial definition, serves as a magical unifying thread across many fields of pure and applied mathematics.
References
Apostol, Tom M. Introduction to Analytic Number Theory. Undergraduate Texts in Mathematics, Springer-Verlag, 1976. https://doi.org/10.1007/978-1-4757-5579-4.
Hardy, G. H., and E. M. Wright. An Introduction to the Theory of Numbers. Revised by D. R. Heath-Brown and J. H. Silverman, 6th ed., Oxford University Press, 2008. https://india.oup.com/product/an-introduction-to-the-theory-of-numbers-sixth-edition-9780199219865.
Ireland, Kenneth, and Michael Rosen. A Classical Introduction to Modern Number Theory. 2nd ed., Graduate Texts in Mathematics, vol. 84, Springer-Verlag, 1990. https://doi.org/10.1007/978-1-4757-2103-4.
Niven, Ivan, Herbert S. Zuckerman, and Hugh L. Montgomery. An Introduction to the Theory of Numbers. 5th ed., John Wiley & Sons, 1991. https://catalog.hathitrust.org/Record/002430432.
Rivest, Ronald L., Adi Shamir, and Leonard Adleman. “A Method for Obtaining Digital Signatures and Public-Key Cryptosystems.” Communications of the ACM, vol. 21, no. 2, 1978, pp. 120–126. https://doi.org/10.1145/359340.359342.
Cover image: portrait of Leonhard Euler by Jakob Emanuel Handmann (1753), public domain, via Wikimedia Commons.





Leave a Reply