So, here is the code:

CryptoPP::CFB_Mode<CryptoPP::AES>::Encryption aes(key, key.size(), iv);
CryptoPP::FileSource(args.GetFileArg(i).c_str(), true, new CryptoPP::StreamTransformationFilter(aes, new CryptoPP::FileSink(encryptedFile.c_str())));

And the amazing thing is that when I set a breakpoint in the ProcessAndXorBlock function, my stack backtrace takes me to this method.

class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE BlockTransformation : public Algorithm
{
...
   void ProcessBlock(const byte *inBlock, byte *outBlock) const
       {ProcessAndXorBlock(inBlock, NULL, outBlock);}
...
}

And leaves me bewildered as to how CFB mode is actually doing what it is supposed to be doing if the xorBlock (which in this case should be plaintext is always NULL.....

Reply via email to