RFR: 8351351: Pre-hash mode, context string, etc for ML-DSA

Weijun Wang weijun at openjdk.org
Tue Feb 3 19:40:36 UTC 2026


On Mon, 10 Mar 2025 13:19:49 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

>> Add a new `SignatureParameterSpec` internal API to fully utilize the capabilities of ML-DSA. The updated ACVP test demonstrates its usage.
>
> test/jdk/sun/security/provider/ML-DSA/PreHashed.java line 65:
> 
>> 63:         var s = Signature.getInstance("HashML-DSA-65-SHA512");
>> 64:         s.setParameter(new SignatureParameterSpec("SHA-512", new byte[10]));
>> 65:         Utils.runAndCheckException(
> 
> There is also an `Assert.assertThrows()` method that I wrote not knowing that this `Utils` method exists. For consistency, the Asserts method might be preferred.

Oh I didn't know that. The name certainly sounds more consistent.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23934#discussion_r1990321999



More information about the security-dev mailing list