Skip to main content
4 of 6
Generalize to any number of separately hashed blocks; use TeX
fgrieu
  • 145.5k
  • 12
  • 319
  • 611

To sum up other contributions, the proposed construction:

  • is at least as secure as SHA-256 against collision attacks, that is the ability for an adversary to construct two files with the same hash; if SHA-256 was perfect, difficulty would be in the order of $2^{128}$ hashes.

  • is slightly less secure than SHA-256 against second-preimage attacks, that is the ability for an adversary to construct a file with the same hash as a given arbitrary file; if SHA-256 was perfect, difficulty would be in the order of $2^{256}/n$ hashes for $n$ separately hashed blocks (e.g. $2^{245}$ hashes for the envisioned $n=32768$), which is perfectly fine for any practical purpose.

fgrieu
  • 145.5k
  • 12
  • 319
  • 611