On Thu, 6 Mar 2025 15:12:54 GMT, Weijun Wang <[email protected]> wrote:

> Add a new `SignatureParameterSpec` internal API to fully utilize the 
> capabilities of ML-DSA. The updated ACVP test demonstrates its usage.

I need to reconsider this. The hash algorithm is usually considered an integral 
part of the signature algorithm itself, and when the key is generated it is 
generated for one algorithm. This means we should not use a ML-DSA key with 
HashML-DSA. Furthermore, we also cannot used a HashML-DSA-SHA512 key with 
HashML-DSA-SHAKE256.

So, it does not make sense to provide a hash algorithm field in 
`SignatureParameterSpec`.

Unless a matching `NamedParameterSpec` is defined, there is no way to create an 
ML-DSA key that is used for a given hash algorithm. I don't intend to create a 
new `AlgorithmParameterSpec` type for `KeyPairGenerator` and I also don't 
intend for the key's `getParams` to return anything other than a 
`NamedParameterSpec`.

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

PR Comment: https://git.openjdk.org/jdk/pull/23934#issuecomment-2762738223

Reply via email to