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
- Previous message (by thread): Code review request for 8012637: Adjust CipherInputStream class to work in AEAD/GCM mode
- Next message (by thread): hg: jdk8/tl/jdk: 8016370: javadoc warnings, unexpected mostly
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): Code review request for 8012637: Adjust CipherInputStream class to work in AEAD/GCM mode
- Next message (by thread): hg: jdk8/tl/jdk: 8016370: javadoc warnings, unexpected mostly
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]