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

Specify valid signature hash flags (SIGHASH_ALL) #498

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@OrfeasLitos

OrfeasLitos commented Oct 31, 2018

Solves #492.

@TheBlueMatt

This comment has been minimized.

Contributor

TheBlueMatt commented Nov 1, 2018

@OrfeasLitos

This comment has been minimized.

OrfeasLitos commented Nov 2, 2018

So, to clarify, currently each signature is created by signing all inputs and outputs (i.e. SIGHASH_ALL) but only the signature (compressed in some way) is sent over the wire, without any other data/flags?

@OrfeasLitos

This comment has been minimized.

OrfeasLitos commented Nov 2, 2018

Rephrased this part. It may have become a bit too verbose.

@OrfeasLitos

This comment has been minimized.

OrfeasLitos commented Nov 12, 2018

Let me know if you want any more changes before merging.

@@ -806,7 +806,7 @@ HTLC-success) results in weights of:
In the following:
- It's assumed that *local* is the funder.
- Private keys are displayed as 32 bytes plus a trailing 1 (Bitcoin's convention for "compressed" private keys, i.e. keys for which the public key is compressed).
- Transaction signatures are all deterministic, using RFC6979 (using HMAC-SHA256).
- Transaction signatures are all deterministic, using RFC6979 (using HMAC-SHA256). A valid signature MUST sign all inputs and outputs of the relevant transaction (i.e MUST be created with a `SIGHASH_ALL` [signature hash](https://bitcoin.org/en/glossary/signature-hash)). Note that clients MUST send the signature in compact encoding and not in Bitcoin-script format, thus the signature hash byte is not transmitted.

This comment has been minimized.

@halseth

halseth Nov 13, 2018

Contributor

maybe add that it is SIGHASH_ALL unless explicitly specified, to allow future changes.

This comment has been minimized.

@OrfeasLitos

OrfeasLitos Nov 13, 2018

Good idea. Just added it.

Specify valid signature hash flags (SIGHASH_ALL)
Clarify that this flag is only used for signing and not transmitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment