libcrux-sha3: Incorrect output from SHAKE squeeze functions
High severity
GitHub Reviewed
Published
Mar 26, 2026
to the GitHub Advisory Database
•
Updated Mar 26, 2026
Description
Published to the GitHub Advisory Database
Mar 26, 2026
Reviewed
Mar 26, 2026
Last updated
Mar 26, 2026
The incremental squeeze functions in the portable SHAKE XOF API, when attempting to squeeze more than
RATE(168 for SHAKE128, 136 for SHAKE256) bytes, performed an additional permutation of the state before producing the first output block, thus discarding the first block ofRATEbytes of valid XOF output.Impact
This bug impacts users that rely on this XOF API to squeeze more than
RATEbytes. It does not impact the use of libcrux-sha3 in libcrux-ml-kem or libcrux-ml-dsa.Mitigation
Starting from version
0.0.8the squeeze functions correctly output all blocks including the first block.References