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

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];
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants