# In RSA. Why is $\phi(n)$ kept secret and $n$ is public?

I mean, $n$ can also be easily used to find the factors $p$ and $q$ right?

## 1 Answer

No, it is not easy! RSA is based on the difficulty of factoring the product $n=pq$ of two large prime numbers. But if you know $\varphi(n)$ for plain RSA you can compute the secret exponent $d=e^{-1}\bmod \varphi(n);\;$ and you can factor $n$ from the two equations $n=pq,\;\varphi(n)=(p-1)(q-1)$.

• In general, it is easy to find the prime factors of any numbers. But here, p and q are taken so large (at least 512 bits) that it takes an veery long time. And thus we talk about the hardness of factoring the product of (very) large primes. – aguellier Apr 26 '16 at 11:17