Calculating Euler phi function

  • Context: Undergrad 
  • Thread starter Thread starter paton51
  • Start date Start date
  • Tags Tags
    Euler Function Phi
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 8K views
paton51
Messages
8
Reaction score
0
How do i comput the euler phi function of a large interger?
i know that if p is prime then phi(p)=p-1 and I've found a formula for computing non primes but i don't know how to implement in something like Matlab.
Does anyone know how?
 
Mathematics news on Phys.org
AFAIK, computing the Euler phi function requires you to know the prime factorization of the input. Unless you can find it, there's not much you can do.
 
Yes i know the factorisation problem is hard. I am workin with RSA encryption so we know two large primes, the product of which is N this is what i want to do euler phi on.
Since N is the product of two primes (p and q) is phi(N) simply (p-1)(q-1)?