RFR: 8333867: SHA3 performance can be improved
Daniel Jeliński
djelinski at openjdk.org
Tue Jun 11 18:25:16 UTC 2024
On Tue, 11 Jun 2024 17:39:29 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> There is no other use.. That array is there for the sole purpose of holding the input as a long array before it gets xor-ed into the state.
>
> okay
Could you try using MethodHandles instead of b2lLittle? Similar to what's used in ChaCha20:
https://github.com/openjdk/jdk/blob/b77bd5fd6a6f7ddbed90300fba790da4fb683275/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java#L132-L134
with MethodHandles you could drop longBuf, removing unnecessary allocation on the only platform where the intrinsic is implemented (MacOSX-aarch64)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19632#discussion_r1635309517
More information about the security-dev
mailing list