FIPS 202 defines 2 functions, SHAKE128 and SHAKE256, as extendable-output functions (XOFs) that can have variable output length. But in Appendix A.2 marks:
it is possible to use an XOF as a hash function by selecting a fixed output length. However, XOFs have the potential for generating related outputs—a property that designers of security applications/protocols/systems may not expect of hash functions
Later it describes a theoretical use case (and explicitly discourage such uses):
For example, a naïve (and non-approved) way for two parties to agree to derive a 112-bit Triple DES key from a message designated as
keymaterial
would be to computeSHAKE128(keymaterial, keylength)
, wherekeylength
is 112. However, if an attacker is able to induce one of the parties to use a different value forkeylength
, say 168 bits, but the same value forkeymaterial
So what is the use case for these functions? Is there any reasonable use case where these functions should be used instead of standard (fixed-size output functions) SHA-3 functions?
n
to message to make both outputs unrelated. $\endgroup$