create account

RE: bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes by pinhead26

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @jl777/bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes

· @pinhead26 ·
Where in the Core code does the SIGHASH `int` get truncated to 1 byte before signing?
properties (22)
authorpinhead26
permlinkre-jl777-bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes-20160818t221710952z
categorybitcoin
json_metadata{"tags":["bitcoin"]}
created2016-08-18 22:17:09
last_update2016-08-18 22:17:09
depth1
children5
last_payout2016-09-18 08:42:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length85
author_reputation3,707,077
root_title"bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id878,832
net_rshares0
@jl777 ·
HASH(the modified tx with the 4 byte sighash int) -> 256 bits that is signed
then the SIGHASH byte (not int) is concatenated to the signature and that is what goes in the blockchain. it is explained in the http://bitcoinfactswiki.github.io/OP_CHECKSIG/
properties (22)
authorjl777
permlinkre-pinhead26-re-jl777-bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes-20160818t231059861z
categorybitcoin
json_metadata{"tags":["bitcoin"],"links":["http://bitcoinfactswiki.github.io/OP_CHECKSIG/"]}
created2016-08-18 23:10:57
last_update2016-08-18 23:10:57
depth2
children4
last_payout2016-09-18 08:42:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length252
author_reputation14,988,697,980,664
root_title"bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id879,623
net_rshares0
@pinhead26 ·
Right that's what I meant sorry, 4 bytes are signed but only 1 byte goes into the serialized transaction for broadcast. So what I'm asking is, where in the Tx serialization process is the 4 bytes reduced to 1? Like literally where in the code or protocol spec?
properties (22)
authorpinhead26
permlinkre-jl777-re-pinhead26-re-jl777-bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes-20160818t232451363z
categorybitcoin
json_metadata{"tags":["bitcoin"]}
created2016-08-18 23:24:51
last_update2016-08-18 23:24:51
depth3
children3
last_payout2016-09-18 08:42:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length260
author_reputation3,707,077
root_title"bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id879,806
net_rshares0
@jl777 ·
the signature is generated, 70 to 72 bytes (maybe I am off by 1 here), and the sighash byte is just added to the end. It is in the protocol spec, so that is what I did and it works. not familiar with bitcoind code as I wrote iguanacore from scratch
properties (22)
authorjl777
permlinkre-pinhead26-re-jl777-re-pinhead26-re-jl777-bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes-20160818t234635928z
categorybitcoin
json_metadata{"tags":["bitcoin"]}
created2016-08-18 23:46:36
last_update2016-08-18 23:46:36
depth4
children1
last_payout2016-09-18 08:42:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length248
author_reputation14,988,697,980,664
root_title"bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id880,057
net_rshares0
@jl777 ·
yes, you found it. casting an int to char will truncate it
properties (22)
authorjl777
permlinkre-pinhead26-re-jl777-re-pinhead26-re-jl777-bitcoin-spinoff-fork-how-to-make-a-clean-fork-without-any-replay-attack-and-no-blockchain-visible-changes-20160819t005941796z
categorybitcoin
json_metadata{"tags":["bitcoin"]}
created2016-08-19 00:59:42
last_update2016-08-19 00:59:42
depth4
children0
last_payout2016-09-18 08:42:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation14,988,697,980,664
root_title"bitcoin spinoff fork - how to make a clean fork without any replay attack and no blockchain visible changes"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id881,023
net_rshares0