Score:-1

Why doesnt RSA use composite numbers?

kr flag

I am currently writing a math paper regarding the importance of prime numbers in RSA encryption. I understand that generating q x p = N (where p and q are prime numbers) is simple for a computer however factoring N into its two primes is improbable within a reasonable amount of time.

As mentioned before I am addressing the importance of prime numbers. What I think the reason for their importance is that if RSA used composite numbers they can be broken up into smaller numbers as they are composite making it easier to factor however I am unsure if this is correct reasoning.

I would greatly appreciate it if someone could help me understand the true importance of prime numbers beyond the simple reasoning that it is because factoring N is highly improbable in a reasonable amount of time.

kelalaka avatar
in flag
Does this answer your question? [RSA with modulus product of many primes](https://crypto.stackexchange.com/questions/11287/rsa-with-modulus-product-of-many-primes) It is called Multi-Prime RSA and even there is a standard for it. Note that original RSA modulus is already a composite number and it has a special name; [semi-prime](https://en.wikipedia.org/wiki/Semiprime)
Jackwannsee avatar
kr flag
@kelalaka I have read through the thread you attached however I am still left confused as I was asking whether composite numbers are able to be used not multiple primes such as *n = p x q x r* (where p, q and r are primes)
kelalaka avatar
in flag
Arbitrary composite number will have many small factors. Look for this.
kelalaka avatar
in flag
Are you asking something like this; select a random number $N$, if prime discard it. Now can we use this as an RSA modulus? Sure 1) if you can factor the $N$ to find $\phi(N)$, if you can factor everybody can factor so no security 2) make sure that it is not a smooth number.
Jackwannsee avatar
kr flag
@kelalaka no but thank you for answering my question. I was asking whether using non-prime numbers for p and q changes the effectiveness/ security of RSA encryption. I am not concerned with whether *N* is prime or not prime
Score:1
in flag

In order to create a private, public key pair we need to know the factorization of N. If we pick N as a random composite number we are no better off then an attacker. If we can find the factors so can the attacker.

If we pick p and q as random numbers we will need to factorize them in order to find the factors of N, this may be easy or hard. But in the end we want N to be hard to factor. One thing we want is for N to have no small factors which will aid in factorizing it.

In order to ensure: a. The generator of the secret key knows the factors of N b. An attacker can not easily find any factor of N

We choose random large primes p,q and multiply them to produce N.

There are also multi-prime variants of RSA with more than 2 primes used to create N but we still start with large primes.

Jackwannsee avatar
kr flag
I understand the multi-prime variant of RSA however I will not be addressing this in my paper due to the word count. However, I am still confused as my original question is not about choosing a random number which is N however if using composite numbers that combine to make N is still possible/ safe with regards to RSA encryption. I hope what I am saying makes sense I am still a newbie to encryption.
Meir Maor avatar
in flag
If you choose p, and q to be composite you may end up with an easy to factor N. It will almost definetly include small factors. On the flip side, p and q may be hard to factor for the key generator.
Jackwannsee avatar
kr flag
For clarity purposes, N is easier to factor as having non-prime numbers (composite numbers) makes the factoring easier as it can be broken up into smaller numbers (not possible with primes as it is only itself and 1) decreasing computation time? Additionally, does using prime numbers decrease computation time to generate both the private and public keys?
Meir Maor avatar
in flag
In order to generate key pair you must know the factorization of N. If you chose p,q prime you already know it. If they are composite you must first factorize them which could be very hard.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.