On Mon, 28 Apr 2025 14:48:34 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> Add 2 `MessageDigest` algorithms.
>
> Weijun Wang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   test alias usage

(I thought I clicked the "comment" botton last Friday, not sure what happened. 
Anyhow, here it is)

> > I will take a look~
> 
> Thanks.
> 
> I have 2 concerns on this feature:
> 
>     1. These algorithms are mainly used in higher-level algorithms, mainly 
> signature algorithms. It seems seldom used on their owns. But again, even 
> other SHA-3 algorithms are not used a lot.
> 
>     2. SHAKE128 is both an XOF and a `MessageDigest` algorithm. Although it's 
> well-known that when it is used as a `MessageDigest` algorithm the output 
> size is 256 bits, people might still be confused or simply not aware of it. 
> In this sense, the name might be better SHAKE128-256. Same for SHAKE256, 
> which could be SHAKE256-512.

Are you referring to RFC 8702? What is the main motivation for adding these two 
as MessageDigest impls? Is there internal JDK usage for them already? These 
SHAKExxx are not included in the initial SHA-3 support because they aren't 
approved as hash functions due to the possible generation of related outputs. 
Personally, I'd strongly prefer indicating the output length when using them as 
fixed-length message digest algorithms, e.g. SHAKE128-256.

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

PR Comment: https://git.openjdk.org/jdk/pull/24576#issuecomment-2835984390

Reply via email to