[Botan-devel] Botan: Decoding error: AES-256/CBC/PKCS7

Jack Lloyd lloyd at randombit.net
Sat Oct 3 11:19:57 EDT 2009

On Sat, Oct 03, 2009 at 03:45:52PM +0200, Bernhard Rosenkraenzer wrote:
> On Sat, 3 Oct 2009 09:36:46 -0400, Jack Lloyd <lloyd at randombit.net> wrote:
> > I can't tell; your attachments came through as empty.
> Odd... trying again

What version are you using?

The encrypt code didn't work for me at all until I replaced the calls
of Pipe::write to Pipe::process_msg, since you are not setting message
boundaries in addFile(). [Also addFile is missing a return true in the
succesful case).

It looks like your problem is probably because when you call
read_all() [in both source files], the default message number is
Pipe::DEFAULT_MESSAGE. Mostly for backwards compatability, this number
does not increment automatically; it has to be set using
pipe.set_default_msg(). Instead, you probably want to pass
Pipe::LAST_MESSAGE, which will read the message you most previously
wrote. [This behavior is annoying, but changing it is waiting for a
full Pipe/Filter overhaul currently scheduled to occur sometime before
2020]. With that change it works for me with Qt 4.5.1 and Botan 1.8.7.

[BTW, why not use something like libarchive to combine the entire
directory tree into a single block and then encrypt it with a single
message? This seems like it would be easier]


More information about the botan-devel mailing list