How does sha-2 with fewer rounds work? The wikipedia page about sha-2 states:


  Currently, the best public attacks break preimage resistance for 52 out of 64 rounds of SHA-256 or 57 out of 80 rounds of SHA-512


How exactly is the sha-256 algorithm with fewer rounds defined? I am wondering in particular about the message schedule array $W$, since in round $i$ of the $64$ round sha-256 algorithm, $W[i]$ is accessed. Does 52 round sha-256 simply ignore the elements $53..64$ of $W$?
Does 52 round sha-256 simply ignore the elements $53..64$ of $W$?


Yes; rounds 53-64 don't happens, and we don't actually use elements of $W$.

One alternative way of looking at $W$ is that it's an iterative algorithm to generate the next text-dependent constant for the round function (based on the constants generated for the previous rounds, or the actual message text for the first 16 rounds).  With this formulation, there is now no need to specify a magic number '64'; the number of rounds can be decreased or increased without significantly modifying the block scheduling algorithm