2

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.

1 Answer 1

5

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.

1
  • Thank you that is reassuring.
    – Cannabijoy
    Commented Nov 8, 2022 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.