I have the public exponent
(e), modulus
(n) and private exponent
(d) of a RSA key, how can I convert them to a RSA key in PEM
format or a RSA structure defined in openssl?
I want to sign text with RSA private key with openssl, either in C
code or openssl
utility is acceptable.
I've searched the internet, there're quite some posts that can extract parameters from the PEM
key, but failed to find useful informations on how to convert them back to PEM with C
. Seems that this is not a common scenario...
edit: Sorry that the title is kind of misleading, my ultimate purpose is to use it to sign message(as stated in the description)