Could someone explain the security implication of using XOF functions for larger output length? I have seen a few algorithms using fixed 32 bytes output length for SHAKE256. Does this have anything to do with the security strength of the algorithm? Does it mean that its recommended to use 16 bytes output length for SHAKE128?
From my understanding XOF by its nature support larger output length so I could use it for output length of 64, 128 or even infinite bytes. I can feel that it would not be ideal and that using more output length would reduce the security but I cannot pin point why or how except the part where session duration would be longer.
For example, If we consider the kex algorithm for ML-KEM, it has a fixed output length of 32 bytes for the final key in its KDF and if I need more I would need to initiate another round of kex for another 32 bytes.
What would it mean if I instead used an output length of 64 bytes instead? Is it equivalent to using the same keys twice?
What exactly does a security strength of an algorithm mean in this context. Does it guarantee 256 bit security no matter the output length? Does it decrease with increase in the output length?
Sorry for framing the question this way, I do not have a math background and would appreciate if someone explained it in a bit more detail. Thanks.