<p>For the details of computing a transaction ID, see <a href="https://bitcoin.stackexchange.com/questions/2177/how-to-calculate-a-hash-of-a-tx">How to calculate a hash of a Tx?</a>
Basically, it is the double SHA256 hash of the raw transaction data.</p>

<p>SHA256 is believed to be a secure hash function, and part of what it means to be a secure hash function is that there is no reasonable way to "predict" what the hash of some input data will be, short of actually computing it.  It also means that there is no reasonable way to compute some input data whose hash will have a specified value.  So if you are trying to create a transaction whose ID is DEADBEEFCAFEBABE0123456789ABCDEFFEDCBA9876543210FACEFEEDACEDBEAD, or matches the ID of some existing transaction, sorry, you cannot (unless you figure out how to break SHA256).  But you can safely assume that nobody else can do so, either.</p>

CC BY-SA 3.0
2014-06-30T23:20:16.850Z
2014-06-30T23:20:16.850Z
2017-04-13T12:47:36.647Z
Nate Eldredge
<p>I would like to know if it's possible for someone to create a raw transaction using bitcoind or bitcoinJ and predict the Transaction hash.How exactly is the transaction ID(hash) calculated ?</p>

<transactions><bitcoind><hash>
Create custom Transaction ID using Bitcoind raw transaction
user18439
# Create custom Transaction ID using Bitcoind raw transaction

(Asked by: username_0 on 2014-06-30)

I would like to know if it's possible for someone to create a raw transaction using bitcoind or bitcoinJ and predict the Transaction hash.How exactly is the transaction ID(hash) calculated ?

**Tags:** transactions, bitcoind, hash


---

## 1 answers

### Answer by username_1 on 2014-06-30. Score: 1 | Accepted answer

For the details of computing a transaction ID, see [How to calculate a hash of a Tx?](https://bitcoin.stackexchange.com/questions/2177/how-to-calculate-a-hash-of-a-tx)
Basically, it is the double SHA256 hash of the raw transaction data.

SHA256 is believed to be a secure hash function, and part of what it means to be a secure hash function is that there is no reasonable way to "predict" what the hash of some input data will be, short of actually computing it. It also means that there is no reasonable way to compute some input data whose hash will have a specified value. So if you are trying to create a transaction whose ID is DEADBEEFCAFEBABE0123456789ABCDEFFEDCBA9876543210FACEFEEDACEDBEAD, or matches the ID of some existing transaction, sorry, you cannot (unless you figure out how to break SHA256). But you can safely assume that nobody else can do so, either.


---

