Rings, Fields and Euler's Totient Function
The basics of Rings, Fields and Euler's Phi Function
Last updated
The basics of Rings, Fields and Euler's Phi Function
Last updated
In modular arithmetic we work modulo some modulus , and we can think of the numbers we are able to use this way as a group of numbers:
This ring is the ring of integers modulo m. We are able to add and multiply elements of this ring, then divide by and take the remainder to obtain an element in . There are general rules which define this as a ring, including the need for associative addition and multiplication.
As we discussed, has a modular multiplicative inverse if . The set of all numbers with modular inverses are denoted as - this is called the group of units modulo . Number which have inverses are called units. For example:
You can think of the group of units modulo as essentially a set containing all numbers less than which are coprime with it.
If every number in has a modular inverse, it is promoted from a ring to a field (a field is a ring in which division is possible). Note that the only values of where this are possible are values which are prime, which is why these fields are usually denoted . A finite field (also called a Galois field) is a field with a finite number of elements, such as those used in modular arithmetic. As a result, the term finite field will come up quite often to describe .
This function has a huge array of applications and further rules which allow us to do some pretty awesome things, and is a key piece of the RSA cryptosystem.
TODO
denotes the ring of integers - note it is not a field, as there are no fractions to provide inverses.
Euler's totient function returns the number of elements in the group of units modulo . Mathematically, this means:
If then .
If we say that the prime factorisation of is then
Note that if is prime, .
Euler's Formula states that if then
This is perhaps the most important formula for the RSA cryptosystem, which we will get to soon. Note that this actually tells us a little more in the case modulo a prime , a case named after Fermat.
Since , Fermat's Little Theorem states that:
This was stated by Fermat over 100 years before Euler's Formula. You may note that this also gives us a quick way to compute the modular multiplicative inverse of in :