On 8/19/2013 3:15 PM, mycompuser wrote:
But the only
problem that I currently face is that the key pair generated by OpenSSL has
headers and footers of the form -----BEGIN RSA PUBLIC KEY----- -----END RSA
PUBLIC KEY----- for public key likewise there is similar header and footer
for private key as well.
That sounds like pem format, base64 encoded.
The server whose implementation I dont control accepts only the key part and
I need to clip of the headers and footers before sending the raw public key
to the server.
On receiving the data encrypted with the public key, when I try to decrypt
the data using the private key pair, the decryption fails. (This could be
because I had stripped the header and footer of the public key and with
this, they are no longer public/private key pairs hence the decryption
fails).
That's because it's not a raw public key; it's a base64 encoded
structure containing the key parts. It's a lot more than just stripping
the header and footer.
Is there a mechanism by which I can generate an RAS Public/Private Key pair
without the header and footer?.
By the command line, or can you write code.
RSA_generate_key() and then pull the parts you need out of the RSA
structure using BN_bn2bin.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org