On Sun, Apr 5, 2009 at 5:41 PM, Ger Hobbelt <[email protected]> wrote:
> On Sun, Apr 5, 2009 at 6:19 PM, Dr. Stephen Henson <[email protected]> wrote:
>> Well it looks like one problem is the key. The default key size is 128 bits
>> for EVP_bf_cbc() and "Test Key" is 64 bits or 72 bits if you include the 
>> final
>

> (In fact, you're feeding it 9 defined bytes of key while it needs 16,
> because you treat it all as strings instead of binary data - which is


Doh!  Thanks guys.  I try and use std::strings where possible to keep
me out of trouble.  Stupid.  So I should be padding my key?  I guess
this threw me off:

from http://openssl.org/docs/crypto/EVP_EncryptInit.html:

EVP_bf_cbc(void), EVP_bf_ecb(void), EVP_bf_cfb(void), EVP_bf_ofb(void);

    Blowfish encryption algorithm in CBC, ECB, CFB and OFB modes
respectively. This is a variable key length cipher.

"Variable" key length?

Charles
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to