# Hash function and outputs of arbitrary length

I know that Skein can output a digest of arbitrary size, with a kind of counter mode. Blocks of the resulting digest can be computed in parallel.

What about Keccak ? I know that a sponge function can generate a hash of arbitrary length, but is it possible to generate this output with a parallel algorithm ?

-
I don't know how Keccak works but a hash function usually has an internal compression function where it iterates its input. So (very informally) for input 2x the block length, it'll iterate it twice. As I said I'm not privy to Keccak's internals so I may be wrong. If this is true however, it means that parallelism is either hard or impossible. –  rath Mar 24 at 17:41
@rath For Skein this is possible. For keccak I don't know because of the sponge property... –  Dingo13 Mar 24 at 19:17

P is the message input per block, z are outputs, and f is the inner permutation. In order to output a given length $x$, z is incremented until it meets or exceeds $x$, to which it is then truncated. The quantity of z required will vary due in implementation to the variable rate r not being a constant.