bcgit/bc-java — pull request #63 by timw (2014-03-10 08:34:13+00:00)
Title: Fixes for AEAD output size calculations and use in cipher streams

* More testing of lightweight and JCE CipherInputStream/CipherOutputStream
* Fixed a buffer underflow when using packet mode (i.e. CCM) AEAD ciphers in streams
* Another buffer underflow in CipherOuputStream (David already fixed the input stream version) is also fixed by the packet mode fix
* Added tests and fixes for consistent checking of input and output buffers (with use of DataLengthException and OutputLengthException) in all AEAD modes
* Fixed a minor miscalculation of output size in PaddedBufferedBlockCipher
* Added some documentation clarifications to AEADBlockCipher describing valid assumptions for output size calculations and when ciphertext authentication may occur.