On Wed, 24 Jun 2026 20:05:13 GMT, Volodymyr Paprotski <[email protected]> 
wrote:

>> With `quadKeccak`, it is possible to have 3 extra `keccak`s calls that are 
>> really noops.. teach `SHA3Parallel.squeeze()` how many operations it really 
>> should be doing.
>> 
>> While it is possible to match precisely the number of keccak calls 
>> required.. the previous implementation always called doubleKeccak, so 
>> collapsing the odd numbers to the closest even.
>> 
>> PS:  `make install-hsdis test 
>> TEST="micro:org.openjdk.bench.javax.crypto.full.SignatureBench.MLDSA" 
>> MICRO="JAVA_OPTIONS=-XX:+UnlockDiagnosticVMOptions 
>> -XX:-UseSHA3Intrinsics;FORK=1;ITER=3;TIME=10;WARMUP_ITER=7;WARMUP_TIME=10;OPTIONS=-prof
>>  perfasm -p algorithm=ML-DSA-65"`
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Volodymyr Paprotski has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   comment from Ferenc

With the crypto intrinsics that don't return a value we followed the convention 
that instead of declaring them void, we declare them int and have the intrinsic 
version return 0 and the Java version return 1 (it makes it easy for tests to 
decide which version was actually running). This convention could be applied to 
the @IntrinsicCadidate methods in this class, too.

src/java.base/share/classes/sun/security/provider/SHA3Parallel.java line 83:

> 81:     }
> 82: 
> 83:     public int squeezeBlock() {

I think there are no callers for this version anymore.

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

PR Comment: https://git.openjdk.org/jdk/pull/31648#issuecomment-4801088503
PR Review Comment: https://git.openjdk.org/jdk/pull/31648#discussion_r3475595699

Reply via email to