On Thu, Apr 09, 2009, Ger Hobbelt wrote: > > Which brings us to Blowfish: > > when you compare BF with, say, DES or AES, the latter all have fixed > width key sizes - by design -, e.g. 64 bits (8 bytes) or 128 bits (16 > bytes). Sure, there's AES-256, but that is a _different cipher_ (okay, > not really very different, but is a clearly defined, separately > designed and tested, cipher, accepting 256 bits key values. > > BF is 'variable key size' as it's one design-fits-many key sizes: one > specification, with not 'special sauce' for the various key sizes. > > You can specify your BF key (and its size) using the > > void BF_set_key(BF_KEY *key, size_t len, const unsigned char *data); >
The preferred technique for setting key size for variable length ciphers is to call EVP_CIPHER_CTX_set_key_length() via the EVP interface. See: http://www.openssl.org/docs/crypto/EVP_EncryptInit.html# 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 [email protected] Automated List Manager [email protected]
