Skip to main content
added 1 character in body
Source Link
e-sushi
  • 18.1k
  • 12
  • 85
  • 235

If I have some data I hash with SHA256 like thisas :- hash=SHA256(data)

Andhash=SHA256(data) and then copy only the first 8 bytes of the hash instead of the whole 32 bytes, how. How easy is it to find a hash collision with different data? Is it 2^64$2^{64}$ or 2^32 $2^{32}$?

IfAnd uf I need to reduce a hash of some data to a smaller size (n$n$ bits) is there any way to ensure the search space 2^n $2^n$?

If I have some data I hash with SHA256 like this :- 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 ?

If 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 ?

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$?

Source Link
Harry
  • 13
  • 5

Reducing size of hash function

If I have some data I hash with SHA256 like this :- 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 ?

If 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 ?