# Does RSA - the company - know the $p$ and $q$ used to create $n$ ($p$ and $q$ being prime)

With the RSA cryptosystem, you publish $n=pq$. Does RSA $-$ the company $-$ have/store the values of $p$ and $q$?

If not, how do they find $n$ without knowing $p$ and $q$. Also, how do they find $(p-1)(q-1)$ without knowing $p$ and $q$?

In short, should I trust a private company with my encryption?

• @mikeazo But generally there are RSA numbers provided by RSA llc company and these are used by everyone. How could they trust a private company on these numbers? – Bosco Frank Paul May 26 '17 at 3:05
• I'm not sure you're right about that - it's been known for decades that using the same $N$ but different public/private exponents is insecure, since knowing any $e,d$ so that $ed = 1\; \text{mod}\; \phi(N)$ lets you factor $N$. – pg1989 May 26 '17 at 3:15
• @pg1989 rsa do publish the N right. So is it same N that is being used everywhere? Wiki RSA Numbers. – LIJIN C May 26 '17 at 6:40
• @BoscoFrankPaul Nobody gets their RSA private keys from the RSA company (except their employees, I guess). You just generate two random primes of the desired size and compute the rest of the key from there. – CodesInChaos May 26 '17 at 8:13
• @LIJINC Those numbers were just semi-primes RSA generated as a challenge to demonstrate factoring is hard. Nobody uses these to do crypto. – CodesInChaos May 26 '17 at 8:16

RSA laboratories have established the leading standards for RSA encryption in the PKCS#1 standard. I would not say that the algorithm is completely separate from the company. That said, the schemes within PKCS#1 have been presented in scientific papers extending all the way back to the original proposal by Rivest, Shamir and Adleman (that make up RSA the acronym).

The values of the keys however are independent of RSA Security / Laboratories / EMC / Dell (there were a few takeovers). The values $p$, $q$ and $n$ are different for each RSA key pair (if the RSA KeyGen algorithm is followed correctly and a secure random number generator is used). Generation of these values should take place in a location under control of the entity requiring the key pair. Only the public key - consisting of the pair $(n, e)$ - is then distributed.

Related is the Kerckhoff's principle. The algorithm should be secure as long as the keys are secure. The RSA algorithm including the PKCS#1 padding schemes has had extensive analysis from cryptographers.

So no, you do not have to trust RSA - the company - with your encryption. You can of course if you want to; trusting a specialized security company is often more secure than trying to implement it yourself. However if you still want to use RSA - the company - for that is up to debate to say the least.

In short , should I trust a private company with my encryption?

In short, no, you shouldn't and you don't have to. That is the beauty of the RSA encryption algorithm (which is completely separate from RSA the company). You can use RSA the algorithm without RSA the company knowing anything about it.

If you want to communicate securely with RSA the company using RSA the algorithm, you tell RSA the company your RSA (the algorithm) public key, which includes $n$ (as well as the encryption exponent $e$). They don't need to know $p$ or $q$ or $p-1$ or $q-1$.