On Thu, Feb 05, 2009, Tomasz Ka??mierczak wrote:

> Hello,
>
> In the OpenSSL API there are functions called PEM_write_RSAPrivateKey(), 
> PEM_write_RSAPublicKey() and corresponding read functions: 
> PEM_read_RSAPrivateKey(), PEM_read_RSAPublicKey(). What I need is to 
> read/write RSA keys to/from a file in exactly the same format as these 
> functions do, but I cannot use OpenSSL (due to licensing issues when using 
> OpenSSL in GPL'd code). I've tried to find some GPL'd code that can handle 
> files in such format, but haven't succeeded.
> What I've managed to find out is that it's a PKCS#1 certificate stored in a 
> PEM file - is that right? Unfortunately, even with such knowledge, I 
> haven't managed to find any specification that would be of any help.
>
>

RSAPublicKey and RSAPrivateKey are the same structures mentioned in PKCS#1
base64 encoded with the approproiate headers.

If you need the PEM encryption format then see:

http://www.openssl.org/docs/crypto/pem.html#PEM_ENCRYPTION_FORMAT

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to