# Create self signed certificate from modulus, private and public exponents of RSA

I have the values of RSA public exponent $$e$$, the secret exponent $$d$$ and the modulus $$n$$.

How can I create (for example using openssl) a self-signed certificate using the RSA key $$(n,d), (n,e)$$? Is it even possible?

Second question: Is it possible to get the factors of $$n$$ from $$(n,d), (n,e)$$?

• 2. $(n,d)$ in usually contains information about $p$ and $q$ so that the calculations can use CRT. – kelalaka Oct 29 '19 at 20:56

Yes, it is possible to generate a self signed certificate. If you've got a private key that can sign with it using the required signature algorithm then that should always be possible. Tool usage (such as openssl, which can be used to generate self signed certificates) is off topic here, but basically you just create the To Be Signed (TBS) part of the certificate and then, well, you sign it.
Yes, you can get the factors from this answer which is about calculating the CRT parameters, but those include the $$p$$ and $$q$$ values.