0

I was just looking at the RSA encryption Wikipedia page. RSA encryption essentially boils down to our inability to factorise huge semi-primes.

But then I had the idea of converting the number to base $b$. If a base $b$ number $n$ ends in $0$, then $b|n$.

Furthermore, one only has to analyse base $p$, $p \in \mathbb{P}$ (prime numbers).

Therefore, if there exists an efficient algorithm for converting numbers to base $p$, would efficient factorisation be possible?

My question boils down to:

What makes trial division inefficient? Is it simply the nature of the algorithm? Why? Or is it the task of actually running through all possible divisors?

Thanks!

Roskiller
  • 617
  • It is the task of actually running through all possible divisors indeed. The essence of RSA is large prime numbers, here is a short article. – rtybase Oct 22 '18 at 20:38

1 Answers1

1

To test if a number $p$ divides a number $n$, it suffices to find the remainder when $n$ is divided by $p$. This can be done very quickly. As such, it is not the testing whether $p|n$ that is the difficulty, it's actually iterating through all the primes $p<\sqrt{n}$ (if a number is not prime, its smallest prime factor is less than $\sqrt{n}$). For example, to factor a number around $10^{20}$ via trial division, you need to test divisibility by $455052511$ distinct primes.