Code Review Requests for 8012900: CICO ignores AAD in GCM mode (original) (raw)

Valerie (Yu-Ching) Peng valerie.peng at oracle.com
Tue Jun 11 23:16:16 UTC 2013


Xuelei,

Here is another GCM and CipherInputStream/CipherOutputStream related fix, i.e. for 8012900: CICO ignores AAD in GCM mode

The key changes are in CipherCore.java, GalorisCounterMode.java, the rest files only have minor changes. Essentially, when using AES/GCM cipher in decryption mode, the data will be buffered and processed AFTER the tag has been verified. Otherwise, most of the recovered text would be returned even if tag verification failed later. Given that CipherCore is shared by most modes, this particular buffering is done inside the GCM impl. But then some more methods have to be added/modified slightly so CipherCore will include this additional buffering from the underneath level in its output size calculations, etc.

The webrev is at: http://cr.openjdk.java.net/~valeriep/8012900/webrev.00/

Thanks, Valerie



More information about the security-dev mailing list