RFR: 8253821: Improve ByteBuffer performance with GCM [v3]

Valerie Peng valeriep at openjdk.java.net
Wed Nov 4 00:49:02 UTC 2020


On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> 8253821: Improve ByteBuffer performance with GCM
>
> Anthony Scarpino has updated the pull request incrementally with six additional commits since the last revision:
> 
>  - style
>  - style & comments
>  - full update
>  - remove old
>  - update
>  - outputsize

src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 770:

> 768:         checkDataLength(0, len);
> 769: 
> 770:         if ((ibuffer.size() + ct.remaining()) - tagLenBytes >

ct is set a new limit (minus the tag length) on line 741. So this check seems incorrect?
How about using the 'len' value which seems to be the overall input size which should also be the expected output size?

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

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


More information about the security-dev mailing list