HomePhabricator

Add SCRIPT_ENABLE_SCHNORR support to sigencoding

Description

Add SCRIPT_ENABLE_SCHNORR support to sigencoding

Summary:
(includes a new error code SCRIPT_ERR_SIG_BADLENGTH)

motivation for banning 65 byte sigs in CHECKMULTISIG: When Schnorr signatures (64 bytes + 1 hashtype byte) are added, we have the option of leaving CHECKMULTISIG untouched which would mean it would still accept 64+1 byte signatures and interpret them as ECDSA while at the same time, CHECKSIG would accept 64+1 byte signatures and interpret them as Schnorr. This is a sort of awkward ambiguity however, and hopefully it will create less ambiguity, and less risk of consensus break with other implementations, if post-fork *all* 64+1 byte signatures are now Schnorr signatures.

Depends on D2477 and D2475

Test Plan:
added direct tests in sigencoding_tests
added script_tests that ensure each opcode is calling the right function

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: Mengerian, teamcity, schancel

Maniphest Tasks: T527

Differential Revision: https://reviews.bitcoinabc.org/D2469

Details

Provenance
Mark LundebergAuthored on Feb 1 2019, 16:46
Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com>Committed on Feb 1 2019, 23:48
markblundebergPushed on Feb 1 2019, 23:48
Reviewer
Restricted Project
Differential Revision
D2469: Add SCRIPT_ENABLE_SCHNORR support to sigencoding
Parents
rABCc27207fed9c7: Refactor signature encoding checks
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <36528214+markblundeberg@users.noreply.github.com> committed rABCcfd7f1b65be4: Add SCRIPT_ENABLE_SCHNORR support to sigencoding (authored by Mark Lundeberg).Feb 1 2019, 23:48