If I have some data I hash with SHA256 as hash=SHA256(data)
and then copy only the first 8 bytes of the hash instead of the whole 32 bytes. How easy is it to find a hash collision with different data? Is it $2^{64}$ or $2^{32}$?
And uf I need to reduce a hash of some data to a smaller size ($n$ bits) is there any way to ensure the search space $2^n$?