Number Theory and Public-Key Cryptography · Cryptography and Network Security

Euler's Theorem

Watch lectures

Euler's Theorem

1. What It Is (beginner — Fermat grown up!)

Fermat needs PRIME modulus. Euler works for ANY nn, using φ(n)φ(n) = count of numbers <n< n coprime to nn. If gcd(a,n)=1gcd(a, n) = 1:

aφ(n) mod n=1a^{φ(n)} \text{ mod } n = 1

Fermat is the special case: φ(p)=p−1φ(p) = p - 1!

2. Totient Table (exam must-compute!)

nn Coprime set φ(n)φ(n)
prime pp 1..p-1 p−1p - 1
p×qp \times q (distinct primes) all minus multiples (p−1)(q−1)(p-1)(q-1)
p2p² all minus multiples of pp p2−pp² - p

Example RSA: p=5p = 5, q=11q = 11 → n=55n = 55, φ(n)=4×10=40φ(n) = 4 \times 10 = 40!

3. Worked (exam numerical!)

3¹⁰ mod 10? gcd(3,10)=1, φ(10)=4 → 3⁴ ≡ 1 → 3¹⁰ = 3⁸×3² ≡ 1×9 ≡ 9 mod 10!
verify: 3²=9, 3⁴=81≡1 ✓

4. Why Crypto Cares

  • RSA correctness: encryption exponent ee + decryption dd with e×de \times d mod φ(n)=1φ(n) = 1 → medm^{ed} mod n=mn = m (Euler guarantees round-trip!).
  • Exponent reduction mod φ(n)φ(n) (fast big powers!).

5. Exam Points

  • State + φ(pq)φ(pq) + verify (343⁴ mod 1010) — 5-7 marks, very frequent.
  • Fermat as special case — 3 marks, favourite link.
  • RSA φ(n)φ(n) computation — 3 marks, frequent.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Cryptography and Network Security modules