1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Euler Totient or Phi Function

  1. Oct 26, 2013 #1
    What is most motivating way of introducing this function? Does it in itself have any real life applications that have an impact. I can only think of a^phi(n)=1 (mod n) which is powerful result but is this function used elsewhere.
  2. jcsd
  3. Oct 26, 2013 #2

    jim mcnamara

    User Avatar

    Staff: Mentor

    It is part of the RSA encryption scheme. Is that what you mean? ssh RSA keys which allow passwordless connections over the ssh protocol rely on RSA.

    So a more general answer might be "cryptography"
  4. Oct 26, 2013 #3


    User Avatar
    Homework Helper

    I don't know what RSA encryption uses, but if n in (a^phi(n)) mod (n) = 1 is a product of 2 or more prime numbers, then phi(n) returns the count of how many numbers from 1 to n-1 are not multiples of those prime numbers. For example, if n = 3 x 37 = 111, then phi(n) = (3-1) (37-1) = 72, so there are 72 numbers from 1 to 110 not multiples of 3 or 37. Multpilication and division of any pair of those 72 numbers will produce a result that is part of the 72 number group, but addition and subraction may produce results that are not within the group.

    If n is a prime number, then phi(n) is n-1, and there is at least one "primitive" often called "alpha" where every number 1 through n-1 mod n in the field can be considered as a power of "alpha" mod n. This can be the basis for a finite field group (add, subtract, multiply, divide all produce numbers within the group). Reed Solomon error correction code can be based on this type of finite field, such as pdf417 bar codes which use n = 929.

    However, most error correction code is based on polynomials with singe bit coefficients (finite field mod 2) called a generator polynomial "g". Such a polynomial can be treated as a binary integer but the mathematical operations addition and subtraction are implemented as exclusive or. A finite field uses single bit polynomials modulo a generator polynomial "g".

    Part of AES encryption calculates 1/x for 8 bit polynomials modulo the 9 bit polynomial [itex]1 x^8 + 1 x^4 + 1 x^3 + 1 x + 1 [/itex] (hex 11b).
  5. Oct 27, 2013 #4


    User Avatar
    Homework Helper

    I forgot to mention that although (a^phi(n)) mod n = 1, phi(n) may not be the smallest value that results in (a^j) mod n = 1. Using the example in my previous post for n = 3 x 37 = 111, j is never greater than 36, regardless of a, and in the case of a = 73, j is 2: (73^2) mod 111 = 1.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook