sipa / bips

Bitcoin Improvement Proposals
bitcoin.org
145 stars 43 forks source link

Abstract out common signature message calculation #186

Closed sipa closed 4 years ago

sipa commented 4 years ago

This tries to address #99 and #104. It moves some things around by abstracting out the bulk of the signature message (everything except epoch and tapleaf/key_version/codesep_pos) into a single function in bip-taproot, which is then used to define both key path signature validation and bip-tapscript signature validation.

gmaxwell commented 4 years ago

Concept ACK. I haven't read it carefully to make sure this didn't introduce errors, but this is the sort of change I was suggesting.

sipa commented 4 years ago

I addressed @jonasnick's comments, including replacing "transaction digest" with "signature message" for consistency.

sipa commented 4 years ago

Going to merge.