On Mar 17, 1:48 pm, Hal Vaughan <[email protected]> wrote: > I've been experimenting with Blowfish, using different examples and found > that if I create the class object I use for decrypting AND provide the key > and IV in the same step, the padding is stripped on output and the output > is garbage. > > Here's the one line that results in garbage output and stripped padding: > > CBC_Mode< Blowfish >::Encryption myDec((byte*) cKey, keyLen, bIV); > > If, instead, I do this in two steps, everything comes out okay: > > CBC_Mode< Blowfish >::Decryption myDec; > myDec.SetKeyWithIV((byte*) cKey, keyLen, bIV); I don't recall a difference in behavior. It sounds like you have a memory issue somewhere.
Run your program under Valgrind or another diagnostic tool such as Dmalloc or Adress Sanitizer. A good comparison is available at http://code.google.com/p/address-sanitizer/wiki/ComparisonOfMemoryTools. If you arre using Clang 3.3, you have a bunch of goodies available to you. See the -fsantize options at http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation. 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. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
