Can two different nonces and different blocks produce the same hash?

1

Say, I want to erase the record of a transaction by changing a block. Can I go back to that block and find a new block and nonce combination that makes the same hash?

Is it a case that finding such a new combination is computationally hard or is it actually impossible?

user1936752

Posted 2016-11-25T06:40:36.483

Reputation: 125

Answers

2

One of the main properties of a hash algorithm is collision resistance. If you would find an identical hash with two different datasets, then we would speak of a hash collision.

This is extremely unlikely to happen. The mathematical chance that a sha256 collision would happen is smaller then the actual chance that the universe will implode in this moment.

https://crypto.stackexchange.com/questions/24732/probability-of-sha256-collisions-for-certain-amount-of-hashed-values

Jonas Schnelli

Posted 2016-11-25T06:40:36.483

Reputation: 5 465

Thank you for your reply. I understand that one of the basic principle of a hash is that it should be infeasible to find two messages that give the same hash.

Am I then correct in saying that it is computationally feasible to find a nonce that fits the requirements of the hash in bitcoin but it is computationally not feasible to find a message nonce combination that fits a given hash? – user1936752 2016-11-25T07:47:15.243

Also, is there a chance that a given message has no possible nonce exists that produces the right hash value or is it only a matter of time before such a nonce is found?user1936752 2016-11-25T07:57:50.480

The collision resistance result in the behavior that you won't find a nonce that would result in the same hash when changing other data in the block (example: remove a tx). The hash of a block does always go over the complete header (not only the nonce). The assumption is hash(X) != hash(Y) regardless if X=none or X=nonce||moredata.Jonas Schnelli 2016-11-25T09:55:40.273