RFR: 8255557: Decouple GCM from CipherCore [v4]
Anthony Scarpino
ascarpino at openjdk.java.net
Fri May 21 04:31:36 UTC 2021
On Fri, 21 May 2021 01:58:43 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 1510:
>
>> 1508:
>> 1509: // 'len' contains the length in ibuffer and src
>> 1510: checkDataLength(len);
>
> Is this really useful given 'processed' is 0 and there is only one argument 'len'. Should always pass?
Are you asking if its necessary at all to check the length when decrypting? That's a good question given it's encryption. Maybe decryption doesn't need this check, only encryption.
If we do want to check it, then len could be greater than MAX_BUF_SIZE, then the exception would be thrown
-------------
PR: https://git.openjdk.java.net/jdk/pull/4072
More information about the security-dev
mailing list