Score:1

What does the 256 in SHA3-256 and SHAKE256 refer to?

mp flag

I am simply wondering what the bit-length in the algorithm variant in the table below refers to? For the hash functions I assume that this refers to the ouput length in bits. For instance for SHA3-256 this means the hash will be of 256 bits in length. Is this correct?

But, then, what does the 256 mean for the XOF SHAKE256? The desired output length here is $d$.

I am hoping that there is something obvious I am not understanding and that this is an arbitrary question. However, I hope someone takes the time to answer me regardless.

The table below is from the SHA wikipage.

For the hash functions I SHA3-224

Score:4
my flag

SHA3-256 this means the hash will be of 256 bits in length. Is this correct?

Yes, that is correct - exactly the same as SHA2-256 means that hash has an output of 256 bits.

But, then, what does the 256 mean for the XOF SHAKE256?

Obviously, that's not the output length (that's up to the application). Instead, it is the security level. That is, the amount of effort required to break the various standard security goals (preimage, second preimage and collision) is (barring some cryptanalytic advancement) about $2^{256}$ permutations (or inverse permutation) evaluations. This security level is essentially the capacity (state size minus the block size), divided by two.

One surprising thing about SHAKE is that collision attacks aren't that much easier than second preimage attacks; this is not true with SHA-2, where collision attacks appear to be much easier (if still infeasible). This happens because, for SHAKE, we can do an internal collision attack on the capacity bits, using the invertibility of the permutation for one of the directions; the effort required for this internal collision attack turns out to be about the same as a standard collision attack against the full hash function.

Rory avatar
mp flag
Thank you for taking the time to answer @poncho ! Interesting additional fact about SHAKE too.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.