# Is it possible to get the SHA256 hash collision with partial known data

I have a text sentence that consists of 448 digits [0-9] [a-f] (in HEX format).

This text sentence is partially cut off, but I know the middle, and the beginning and end are damaged.

What I know is 322 known digits in the middle of a text sentence.

74 unknown digits at the beginning

52 unknown digits at the end

That is, the entire text Size: 224 bytes and it is hashed using the SHA256 hash algorithm I know of.

Is it possible to simplify the search for the same hash in this case? (simplify brute force)

Is it possible to stumble upon a collision of this hash since I know 322 known digits in the middle of the text?

• @fgrieu Sorry for the incorrect question, I corrected it. However, as far as brute force is concerned, is it possible to simplify the search for the hash in the case of the known 322 known digits in the middle of the text? The text itself is 448 digits [0-9] [a-f] (in HEX format) Oct 14, 2021 at 12:35
• What is the origin of this question? Why did you have some partial information about the message? Oct 14, 2021 at 16:17

No, there's no easier way than to just try brute force.

A hash is constructed deliberately in such a way that even two very close inputs can produce two very different hash outputs. That property is known as the avalanche effect.

Is it possible to stumble upon a collision of this hash since I know 322 known digits in the middle of the text?

Also no, there are no known SHA256 collisions (yet).

• What's missing: SHA-256 is preimage-resistant. Also we miss 63 bytes, the hash only gives 32, thus we can expect that about $$256^{31}$$ combinations of the missing bytes lead to the hash.