[botan-devel] CBC mode with no padding

Jeffrey Walton noloader at gmail.com
Thu Nov 23 18:56:06 EST 2017


Hi Everyone,

I'm trying to use SM4 cipher in CBC mode with no padding. The code is
available at https://pastebin.com/tFEjzZtz.

The code either fails to compile (no start() on cipher object) or
crashes (just a segfault; no uncaught exceptions).

The documentation for SymmetricCipher is at
https://botan.randombit.net/manual/symmetric_crypto.html, but I don't
see a discussion of "no padding". I found a Null_Padding class, but I
have not figured out how to wire it in to the machinery.

How do I use SM4 cipher in CBC mode with no padding?

Happy holidays and thanks in advance,

Jeff


More information about the botan-devel mailing list