Skip to content
uencoder

Euler Totient Function

Euler's totient function φ(n) counts the positive integers less than n and coprime to n; it is central to RSA cryptography.

Purpose

To count invertible elements under a modulus; the basis of RSA key generation and Euler's theorem.

Mechanism

If n=∏p_i^k_i, then φ(n)=n*∏(1-1/p_i). For a prime p, φ(p)=p-1. Multiplicative over coprime factors: φ(mn)=φ(m)*φ(n). In RSA, φ(N)=(p-1)(q-1).

Use cases

  • RSA key generation
  • Number-theoretic computation
  • Modular arithmetic

Related tools

References