As we know, a public key consists of a public exponent and a modulus.
My questions is:
How to generate a DER/PEM certificate from public exponent and modulus of RSA?
Thank you very much in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With a public exponent and modulus the best you could hope to do is to get something like this:
That said, usually DER/PEM files are used to hold private keys and you’re not going to be able to get the private exponent when all you have is the public one. If, however, the above is what you’re looking for, let me know and I can post further instructions on how to get it from the modulus / public exponent!
edit: Here’s how I’d do it:
I’m using phpseclib, a pure PHP RSA implementation.