Symmetric cipher padding?

Moritz Schulte mo at
Tue Mar 22 21:48:26 CET 2005

On Mon, Mar 21, 2005 at 08:27:38PM +1100, Brad Hards wrote:

> 1. I've been working on the assumption that if I pass more than
> block size bytes to gcry_cipher_encrypt(), then libgcrypt will
> buffer the residual bytes.

Where did you base this assumption on?  Libgcrypt does not buffer such
data for you - the library is a low-level library - keep this in mind.

> 2. Is there  anything that I can use to help with the padding? For example, 
> does libgcrypt keep track of how many bytes have been encrypted already?

There is no such counter.

> 3. Is there any special support for CTS? (or, can I have a hint please :)

CTS is supported.  If you enable it, you can transform chunks of data,
whose size does not have to be a multiple of the block size (it only
needs to be larger than a single block).


Moritz Schulte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 193 bytes
Desc: not available
Url : /pipermail/attachments/20050322/455b8e06/attachment.pgp

More information about the Gcrypt-devel mailing list