On Thu, Aug 07, 2003, Davide De Benedictis wrote:

> Hi, here again
> 
> I'm a Java user and I'm using the Java Cryptography Extension shipped
> with the JDK 1.4 and enhanced with the BouncyCastle.org open source
> libraries. I need to interact with a PHP server which uses OpenSSL
> for digital Signatures.
> I'm trying to read and decript an RSA private key previously
> generated with OPENSSL. The key is encrypted using triple des
> and a key obtained from a pass phrase. Command used was:
> 
> openssl genrsa –des3 –out private_key_file 256
> 
> I will have to find out the algorithm used by openssl to convert the
> passphrase into a 3des 168 bit key and do the same in my code.
> 
> Has somebody successfully imported such a key with Java and/or 
> BouncyCastle libraries?
> Which algorithm should I use ?
> I investigated OPENSSL docos and source code without results.
> 

The default format is an old SSLeay traditional format which is unique to it.

If you can its would be easier to convert to another more standard form such
as PKCS#8 or PKCS#12.

If you have to use the old format then it is documented in the pem manual page
and elsewhere, see:

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

BTW a 256 bit RSA key will have very little security if that's the command you
are using.

Steve.
--
Dr Stephen N. Henson.
Core developer of the   OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: [EMAIL PROTECTED], PGP key: via homepage.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to