RFR: 8255557: Decouple GCM from CipherCore [v4]

Anthony Scarpino ascarpino at openjdk.java.net
Wed Jun 2 02:04:40 UTC 2021


On Wed, 19 May 2021 23:10:07 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix perf problem by reorganizing doLastBlock()
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 757:
> 
>> 755:                             if (dst != null) {
>> 756:                                 dst.put(block, 0, Math.min(block.length, len));
>> 757:                             }
> 
> Would this method work correctly if dst is null? Shouldn't this be checked in the beginning of this method?

Because this is a general purpose methods, the check for dst == null is when op is only ghash.  Null is not an exception situation.

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

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



More information about the security-dev mailing list