On Wed, 13 Nov 2024 21:14:41 GMT, Ben Perez <[email protected]> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/SHA3Parallel.java line
>> 37:
>>
>>> 35: import static sun.security.provider.SHA3.keccak;
>>> 36:
>>> 37: public class SHA3Parallel {
>>
>> Why not merge this with `sun.security.provider.SHA3` class? A separate class
>> in a different package seems harder to track...
>
> @ferakocz might have some more insight here
It is in the same package. It is not a full implementation of doing two SHA3
XOF operations in parallel, it is assumed that the two state arrays that are
passed in at instantiation/reset contain the state after the absorb phase of
the XOF, where the length of the whole input was less than one block size, and
the parallel part only does the squeezes, one pair of blocks per call. So it is
better to keep it in a separate file, although it should definitely be moved to
the correct place in the source file hierarchy
(src/java.base/share/classes/sun/security/provider/SHA3Parallel.java).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21478#discussion_r1841994351