Correct me if I am wrong, but this is my understanding of Merkle–Damgård hashes:
- $n$ is the state/digest size of hash function in bits.
- $k$ is the input block size of the compression function in bits.
- $C(s, x)$ is the compression function, where $s$ is the internal state and $x$ is the message block.
- $x_i$ for $i=1 \ldots t$ is an appropriately padded sequence of $k$-bit blocks.
- $y_0$ is the initialization vector.
- $y_i = C(y_{i-1}, x_i) \oplus y_{i-1}$ for $i=1 \ldots t$.
- The hash output is $y_t$.
If $C(s, m)$ were changed to $C(s, m, p)$, where $p$ is incorporated into the round function of $C$, would using a different value of $p$ during the calculation of $y_t$ thwart length extension attacks?