If you've been following this mailing list, then you know in Crypto++ 5.0 you're supposed to use CBC_Mode<Blowfish>::Encryption for Blowfish encryption in CBC mode. This class implements the SymmetricCipher interface, which in 5.0 replaces the old StreamCipher interface. I'd like to introduce you to some of the new features of this interface.
1. You can now reset keys and IVs by calling SetKey() and Resynchronize() respectively, or SetKeyWithIV to do both. 2. You can query a SymmetricCipher object to see what kind of IV it requires, or if it can use IVs at all: IsResynchronizable(), CanUseRandomIVs(), CanUsePredictableIVs(), CanUseStructuredIVs(). See API reference to find out what these mean in more detail. This relates to recent attacks on SSL and SSH protocols, where predictable IVs were being used with ciphers that need unpredictable IVs. 3. Encryption cipher objects now can generate new IVs for you (after you input the first one) with the function GetNextIV(). 4. MandatoryBlockSize() tells you whether you have to input data in multiples of the block size (which is the case for ECB and CBC modes), and what the block size is. If you use the StreamTransformationFilter to wrap the SymmetricCipher object, it will buffer up the data into whole blocks and handle this for you. 5. You can call OptimalBlockSize() and OptimalDataAlignment() to find out how to pass data to and from the cipher for optimal performance, but this is optional.
