<p>A transaction's locktime is part of the data committed to by the transaction's signatures. If you change it, the signatures become invalid, and so the transaction becomes invalid.</p>
<p>If the locktime could be changed by anyone, it would be completely useless.</p>

CC BY-SA 4.0
2022-11-08T16:32:59.933Z
Thank you that is reassuring.
Cannabijoy
CC BY-SA 4.0
2022-11-07T20:50:08.813Z
2022-11-07T20:50:08.813Z
Vojtěch Strnad
<p>If I create a signed raw transaction with a locktime in the future, and give this raw transaction to somebody else, can they edit the locktime so that they recieve the bitcoin immediately?</p>
<p>For example, I have this signed raw transaction:</p>
<p><code>0200000001f27efa829294d2af440c9ddae788d07171253dc1142224d3512b8b4ae422b605000000008b47304402204f586d2d127e469f162fc0ac28b87ed8fca153b61aa3260ecb54d661b6f70a1202205cee581c013c2f89d2695522484f698d788bb940f722fb616368d64cfdf7b640012103803a5bbbe00dad7dbb29dd5f4d7883ac049bad52d78b456cda12591e26ae702420040165cd1db17576a91450840658811828e04f5501bf3fe87f012d297bdd88acfeffffff01e4250000000000001976a914f005b469eb92525da0294247b5d0ae169efd78f588ac40974a65</code></p>
<p>I have tried changing the ending to <code>...ac00000000</code> and that didn't work.</p>
<p>For the record, I am not trying to hack a bitcoin transaction to receive funds early. I'm just wondering if it is safe to give someone a raw transaction with a timelock.</p>

<raw-transaction><timestamp><locktime><signrawtransaction><hacking>
Can a signed raw transaction's locktime be changed?
Cannabijoy
# Can a signed raw transaction's locktime be changed?

(Asked by: username_0 on 2022-11-07)

If I create a signed raw transaction with a locktime in the future, and give this raw transaction to somebody else, can they edit the locktime so that they recieve the bitcoin immediately?

For example, I have this signed raw transaction:

`0200000001f27efa829294d2af440c9ddae788d07171253dc1142224d3512b8b4ae422b605000000008b47304402204f586d2d127e469f162fc0ac28b87ed8fca153b61aa3260ecb54d661b6f70a1202205cee581c013c2f89d2695522484f698d788bb940f722fb616368d64cfdf7b640012103803a5bbbe00dad7dbb29dd5f4d7883ac049bad52d78b456cda12591e26ae702420040165cd1db17576a91450840658811828e04f5501bf3fe87f012d297bdd88acfeffffff01e4250000000000001976a914f005b469eb92525da0294247b5d0ae169efd78f588ac40974a65`

I have tried changing the ending to `...ac00000000` and that didn't work.

For the record, I am not trying to hack a bitcoin transaction to receive funds early. I'm just wondering if it is safe to give someone a raw transaction with a timelock.

**Tags:** raw-transaction, timestamp, locktime, signrawtransaction, hacking


---

## 1 answers

### Answer by username_1 on 2022-11-07. Score: 5 | Accepted answer

A transaction's locktime is part of the data committed to by the transaction's signatures. If you change it, the signatures become invalid, and so the transaction becomes invalid.

If the locktime could be changed by anyone, it would be completely useless.

> **Comments:**
> **username_0**: Thank you that is reassuring.  

---

