Cryptography & Security
Intermediate

Euler's Totient

Counts integers below n coprime to it, for n = pq — used to make RSA keys.

Formula

φ(n)=(p1)(q1)\varphi(n) = (p-1)(q-1)

Live Calculator

Members

Variables

φ(n)Totient
pPrime factor
qPrime factor

Example

p=3, q=11: φ = 2×10 = 20

Did You Know?

Choosing e coprime to φ(n) and finding its inverse d is exactly how an RSA key pair is generated.

Share this formula