Skip to content

Commit

Permalink
Merge pull request bitcoin#138 from harding/bip66-number-examples
Browse files Browse the repository at this point in the history
BIP66: Number Examples To Match Implementation Tests
  • Loading branch information
laanwj committed Mar 11, 2015
2 parents 609f80d + 6c3ea67 commit 50b1e35
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bip-0066.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {

Notation: P1 and P2 are valid, serialized, public keys. S1 and S2 are valid signatures using respective keys P1 and P2. S1' and S2' are non-DER but otherwise valid signatures using those same keys. F is any invalid but DER-compliant signature (including 0, the empty string). F' is any invalid and non-DER-compliant signature.

* <code>S1' P1 CHECKSIG</code> fails (<b>changed</b>)
* <code>S1' P1 CHECKSIG NOT</code> fails (unchanged)
* <code>F P1 CHECKSIG</code> fails (unchanged)
* <code>F P1 CHECKSIG NOT</code> can succeed (unchanged)
* <code>F' P1 CHECKSIG</code> fails (unchanged)
* <code>F' P1 CHECKSIG NOT</code> fails (<b>changed</b>)
* <code>0 S1' S2 2 P1 P2 2 CHECKMULTISIG</code> fails (<b>changed</b>)
* <code>0 S1' S2 2 P1 P2 2 CHECKMULTISIG NOT</code> fails (unchanged)
* <code>0 F S2' 2 P1 P2 2 CHECKMULTISIG</code> fails (unchanged)
* <code>0 F S2' 2 P1 P2 2 CHECKMULTISIG NOT</code> fails (<b>changed</b>)
* <code>0 S1' F 2 P1 P2 2 CHECKMULTISIG</code> fails (unchanged)
* <code>0 S1' F 2 P1 P2 2 CHECKMULTISIG NOT</code> can succeed (unchanged)
# <code>S1' P1 CHECKSIG</code> fails (<b>changed</b>)
# <code>S1' P1 CHECKSIG NOT</code> fails (unchanged)
# <code>F P1 CHECKSIG</code> fails (unchanged)
# <code>F P1 CHECKSIG NOT</code> can succeed (unchanged)
# <code>F' P1 CHECKSIG</code> fails (unchanged)
# <code>F' P1 CHECKSIG NOT</code> fails (<b>changed</b>)
# <code>0 S1' S2 2 P1 P2 2 CHECKMULTISIG</code> fails (<b>changed</b>)
# <code>0 S1' S2 2 P1 P2 2 CHECKMULTISIG NOT</code> fails (unchanged)
# <code>0 F S2' 2 P1 P2 2 CHECKMULTISIG</code> fails (unchanged)
# <code>0 F S2' 2 P1 P2 2 CHECKMULTISIG NOT</code> fails (<b>changed</b>)
# <code>0 S1' F 2 P1 P2 2 CHECKMULTISIG</code> fails (unchanged)
# <code>0 S1' F 2 P1 P2 2 CHECKMULTISIG NOT</code> can succeed (unchanged)
Note that the examples above show that only additional failures are required by this change, as required for a soft forking change.

Expand Down

0 comments on commit 50b1e35

Please sign in to comment.