RFR: 8255557: Decouple GCM from CipherCore [v8]
Anthony Scarpino
ascarpino at openjdk.java.net
Fri Jun 4 00:20:10 UTC 2021
On Thu, 3 Jun 2021 22:07:34 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> Anthony Scarpino has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - missed resultLen and undo decrypt heap hasarray check
>> - code review comments
>> - fix
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 776:
>
>> 774: if (dst != null) {
>> 775: dst.put(block, 0, len);
>> 776: }
>
> Can this be "resultLen += op.doFinal(block, 0, len, dst)"?
doFinal doesn't have a (byte[], int, int, ByteBuffer) method. While that's not a bad idea to have one, it would be a fair bit of code to do it because it's part of the GCM interface and I'd have to write methods for GCTRGHASH, GCTR, and GHASH. I think that's too much just for this one code segment that isn't broken.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4072
More information about the security-dev
mailing list