Hi Ivo,
Thanks for reporting this (and for including a simple test case). This
is now fixed in CVS.
There have been a few other bug fixes and performance improvements to
GCM (and other AEAD modes) since the last release so I would encourage
you to try building the latest from source if you haven't already.

Pete.

On 11/12/2012 3:26 PM, Ivo Rothschild wrote:
Hi Everyone,

First off, let me say I'm new to using BouncyCastle. I'm using the C#
version 1.7 and Mono 3.5.

I think I've found a problem using BufferedAeadBlockCipher with
CipherStream for decrypting. I am using a GcmBlockCipher. When I
encrypt something of 16 bytes (or a multiple of), the decryption never
does the final mac check (the GCMBlockCipher DoFinal() never gets
called.) Other lengths of input work properly.

In CipherStream, when the end of the read stream is reached, it calls
inCipher.DoFinal(block, 0, numRead). If the data is aligned to the
block size, numRead will be 0.


Reply via email to