Why do we use prime numbers with RSA?

95 Views Asked by At

I coded a small example of RSA in Python. When filling p and q, I mistakenly put in two numbers that were not prime numbers. And it worked fine anyway.

My question is, why is it so important for RSA to take prime number as inputs?

1

There are 1 best solutions below

6
On BEST ANSWER

"Working" and "easy to break" are different. RSA works as a cryptographic system because it's hard to factor the product of two large primes. A large number that has many prime divisors is easier to factor.