RFR: 8255557: Decouple GCM from CipherCore [v3]

Anthony Scarpino ascarpino at openjdk.java.net
Thu May 20 21:09:34 UTC 2021


On Wed, 19 May 2021 18:15:26 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   cleanup
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 279:
> 
>> 277:             if (iv.length == 0) {
>> 278:                 throw new InvalidAlgorithmParameterException("IV is empty");
>> 279:             }
> 
> Why separating the validation of iv and tag length in separate methods, i.e. engineInit() vs init()? Consider consolidating them?

I think I had a reason for this where I didn't know what the exact error was.  I'd rather keep them separate so it throws the right message for the error.  It's not a performance critical area.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4072



More information about the security-dev mailing list