On Dec 6, 4:36 pm, Travis Jensen <[email protected]> wrote: > Hi, all, > > I'm fairly new to Crypto++, so I expect I'm missing something that may > be obvious to others. There can be a steep learning curve.
> On the other hand, it might be a bug, so I > thought I would bring it up here. Nope, expected behavior. > I'm creating a CBC_Mode AES decryptor. Depending on how I create it, > I get different results: > > CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption Decryptor; > Decryptor.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv)); > > works fine. If I try to use the constructor to set the key and IV > like this: > > CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption Decryptor(key, > sizeof(key), iv, sizeof(iv)); > > I get an exception: > > "Failure in TestEncryption2: Unhandled exception: > AlgorithmParametersBase: parameter "FeedbackSize" not used" When using CBC mode, the feedback size is fixed - it is the block size of the underlying cipher. In the case of AES, it is 16 bytes. > I haven't been able to find any documentation on the parameters See below. Also, the wiki is fairly complete in some areas (including Denis Bider's original guide). The wiki is also woefully inadequate in other areas. Good with the bad, I suppose :/ See http://www.cryptopp.com/wiki/. > so I don't know if this is expected or not, so I thought I'd > put it out here. CBC_Mode<CIPHER> is a typedef of CipherModeFinalTemplate_CipherHolder. See http://www.cryptopp.com/docs/ref/class_cipher_mode_final_template___cipher_holder.html. This means you should also be able to use: CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption Decryptor(key, sizeof(key), iv); Jeff -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com.
