RustCrypto/block-ciphers

Blowfish/cbc with different key size

zenzille opened this issue · 2 comments

I'm trying to use blowfish+cbc with a key size of 256 like this:

type BlowfishCbcEnc = cbc::Encryptor<blowfish::Blowfish>;
let ct = BlowfishCbcEnc::new(&key.into(), &iv.into())...

But I can't find a way to pass a key size other than 448 bits. It looks like blowfish itself supports different sizes. Is there a way to accomplish my goal?

new_from_slices should accept 256 bit keys.

Ah. That even works through Encryptor. Thanks.