Euler's Totient Theorem: The Secret World of Modular Exponents
Welcome back to izytech.dev ! In our previous article , we discovered how to simulate division using the Multiplicative Inverse and the Euclidean Algorithm. However, we left a huge question unanswered about modular exponentiation. We know how to calculate giant powers, but we learned a strange rule: the exponent does not live in the same modular world as the base . If the base lives in a mod N world, where does the exponent live? Today, we are going to explore this "parallel universe" and introduce the mathematical magic trick behind modern encryption: Euler's Totient Theorem . The Totient: A Parallel World To understand exponents in modular arithmetic, we must introduce a new concept called the Totient (often represented by the Greek letter Phi, Φ(N) ). The totient of a positive integer N is simply the count of positive integers that are strictly less than N and are relatively prime to N (meaning they share no common prime factors with N...