java-multihash icon indicating copy to clipboard operation
java-multihash copied to clipboard

Fix bits length of Shake 128 (16 not 32) & 256 (32 not 64)

Open vorburger opened this issue 1 year ago • 1 comments

@ianopolous @mk868 does this seem better to you as well? (Or am I just confused?)

vorburger avatar Jan 04 '25 15:01 vorburger

These are extendable-output algorithms that can produce hashes of any length. As far as I understand, the outputs of SHAKE128 and SHAKE256 do indeed have just 16 and 32 bytes of entropy, but nothing prevents you from generating a SHAKE128 hash that's 1000 bytes long.

That said, it looks like this library doesn't support hashes of variable length (see #45).

odisseus avatar Jan 04 '25 22:01 odisseus