RFR: 8255557: Decouple GCM from CipherCore [v4]
Valerie Peng
valeriep at openjdk.java.net
Tue Jun 1 19:47:49 UTC 2021
On Thu, 20 May 2021 00:57:42 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 874:
>
>> 872: } else if (!src.isDirect() && !dst.isDirect()) {
>> 873: // if src is read only, then we need a copy
>> 874: if (!src.isReadOnly()) {
>
> Do you mean if (src.hasArray() && dst.hasArray())? Even if src is not read only, but array()/arrayOffset() methods are optional and can only be safely invoked after the hasArray() call.
I assume this is again the case of !isDirect()&&!isReadOnly => hasArray()?
-------------
PR: https://git.openjdk.java.net/jdk/pull/4072
More information about the security-dev
mailing list