Hi,

Thanks for the reply.

"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."

I was not aware of this. 

But I think my requirement is to send the public key in Base64 encoded
structure format itself(after stripping of header and footer) . I have
noticed that the server (implemented in Java) is successfully able to
encrypt some secure data with the public key.  But there is no means as of
now to tell if I can extract the secured text by using my private key.

I am new to OpenSSL and find it a bit difficult to understand and make
proper use of the methods like the once suggested by you.

Mine is an MAC application using Objective-C hence I can write code and call
OpenSSL api's.

Can you please share some code snippet which does the extracting of
public/private key from the RSA object using OpenSSL?

I have another query, if I manage to generate private and public keys from
the RSA object (RSA object was created by call to RSA_generate_key) and
extract the raw public/private key strings from the public and private key
pair generated in PEM format, can I still use the same RSA object to decrypt
data?




--
View this message in context: 
http://openssl.6102.n7.nabble.com/RSA-encryption-decryption-with-OpenSSL-tp46234p46247.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to