RFR: JDK-8338587 - Internal XOF Methods for SHAKE128 and SHAKE256 [v4]

Weijun Wang weijun at openjdk.org
Wed Aug 28 17:14:21 UTC 2024


On Wed, 28 Aug 2024 16:51:11 GMT, Ferenc Rakoczi <duke at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/provider/SHA3.java line 84:
>> 
>>> 82:     // calls) will set it to 0 at its start.
>>> 83:     // When a squeeze() call uses up all available bytes from this state
>>> 84:     // and so a new keccak() call is made, squeezeOffset is reset to 0.
>> 
>> The paragraph only mentions `set to 0` and `reset to 0`, and has not talked about other values. Maybe you can say when the squeeze call returns, it's set to a position that states before it have been used.
>
> Well, the comment starts with "The byte offset in the state where the next squeeze() will start."

You're right. Everything looks fine now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20631#discussion_r1735033933


More information about the security-dev mailing list