<p>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.</p>

<p>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.</p>

<p><a href="https://crypto.stackexchange.com/questions/24732/probability-of-sha256-collisions-for-certain-amount-of-hashed-values">https://crypto.stackexchange.com/questions/24732/probability-of-sha256-collisions-for-certain-amount-of-hashed-values</a></p>

CC BY-SA 3.0
2016-11-25T07:47:15.243Z
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
CC BY-SA 3.0
2016-11-25T07:57:50.480Z
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
CC BY-SA 3.0
2016-11-25T09:55:40.273Z
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
CC BY-SA 3.0
2016-11-25T07:31:23.110Z
2016-11-25T07:31:23.110Z
2017-04-13T12:48:25.933Z
Jonas Schnelli
<p>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? </p>

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

<blockchain><nonce>
Can two different nonces and different blocks produce the same hash?
user1936752
# Can two different nonces and different blocks produce the same hash?

(Asked by: username_0 on 2016-11-25)

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?

**Tags:** blockchain, nonce


---

## 1 answers

### Answer by username_1 on 2016-11-25. Score: 2 | Accepted answer

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>

> **Comments:**
> **username_0**: 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?  
> **username_0**: 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?  
> **username_1**: 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`.  

---

