a sponge construction

I know that the message never directly changes those last c bits of the internal state (as seen in the image). And I also know that the capacity bits make the sponge construction resistant against collision and preimage attacks. How do the c-bits make it resistant against such attacks?


1 Answer 1


How do the c-bits make it resistant against such attacks?

Suppose they weren't there; that is, all the bits in the state were 'rate bits'; that is, when a block of input is absorbed, what happens is that the entire state is xor'ed by input.

What this would allow an attacker to do is arbitrarily set the state to anything he wants (assuming he knows the previous bytes of the message); if those previous bytes set the state to $S'$ and he wants to set the state to $S$, he specifies the next block of inputs to $S \oplus S'$; this will convert the state to $S$. It should be obvious how to use this to do second-preimage and collision attacks (and slightly less obviously, preimage attacks).

With the capacity bits in place, the above attack doesn't work - the attacker can't effect those directly. If he wants to convert state $S'$ to $S$, he has to hope that the capacity bits of $S$ and $S'$ are the same (and with the number of capacity bits we use in practice, that is quite improbable).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.