Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add fork id to defend replay attack #55

Closed
wants to merge 9 commits into from

Conversation

@shelvenzhou
Copy link
Contributor

@shelvenzhou shelvenzhou commented Oct 21, 2017

The sighash type is altered to include a 24-bit fork id in its most
significant bits.

ref. https://github.com/Bitcoin-UAHF/spec/blob/master/replay-protected-sighash.md

The sighash type is altered to include a 24-bit fork id in its most
significant bits.

ref. https://github.com/Bitcoin-UAHF/spec/blob/master/replay-protected-sighash.md
// check IsValidSignatureEncoding()'s comment for vchSig format
return vchSig[vchSig.size() - 1];
}

This comment has been minimized.

@leto

leto Oct 22, 2017
Contributor

return (vchSig.size() == 0) ? 0 : vchSig[vchSig.size() - 1] is less code to maintain, just a suggestion 😺

Copy link
Contributor

@leto leto left a comment

This looks like a nice start to 2way replay, great to see

shelvenzhou added 8 commits Oct 22, 2017
Add condition to apply FORKID mask on hash type
Drop the signature in scripts when SIGHASH_FORKID is not used
@tearodactyl

This comment has been minimized.

Copy link

@tearodactyl tearodactyl commented on a6b6c26 Oct 25, 2017

In valication.cpp line 1636
IsUAHFenabled(config, pindex->pprev)
replace config with Params()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.