On Fri, Dec 10, 2010, Matej Kurpel wrote:

> Hello,
> I am developing an application where I need to decrypt a RSA private key 
> generated by OpenSSL (fyi, it's in C# .NET).
> I am facing some trouble with the passphrase. I have chosen a 6-character 
> passphrase when generating the key but when I provide it to tie TripleDES 
> algorithm, it says the passphrase has invalid length. I know that it should 
> be 24-bytes long so I have padded it with zero bytes. Now it says it's a 
> known weak key and cannot be used.
> My question is, how to get the 3DES key out of the passphrase? How does 
> OpenSSL do it?
> Thanks in advance,
>

It is documented here:

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

and here:

http://www.openssl.org/docs/crypto/EVP_BytesToKey.html

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to