1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-02-24 23:38:54 +01:00
Commit graph

2110 commits

Author SHA1 Message Date
Elichai Turkel
8ea6798a9d Euler's Criterion prime only nit 2020-01-19 14:47:33 -08:00
JamesC
f5c728ff82 Removed reference to 0xc1 leaf version.
No longer necessary with 32B pubkeys.
2020-01-19 14:47:33 -08:00
Bryan Bishop
b78b6de4fd bip-taproot: fix small typo (is does not) 2020-01-19 14:47:33 -08:00
Jonas Nick
65a4f1deb8 Mention SHA256 block size
Rebased by Pieter Wuille
2020-01-19 14:47:33 -08:00
Pieter Wuille
8886eb4071 Address some nits 2020-01-19 14:47:33 -08:00
Jonas Nick
a5112f9f01 Move plain public key in output rationale to design section
Rebased by Pieter Wuille
2020-01-19 14:47:33 -08:00
Tim Ruffing
2b987b5711 Rework Applications section 2020-01-19 14:47:33 -08:00
Jonas Nick
204b7f13a0 Prescribe that a taproot output key should always have a taproot commitment 2020-01-19 14:47:33 -08:00
Tim Ruffing
29037bd123 Add a footnote about 32-byte security 2020-01-19 14:47:33 -08:00
Anthony Towns
4491902569 note about pubkey collision 2020-01-19 14:47:33 -08:00
Anthony Towns
0d04e41e2f key gen, verify, sign in intro 2020-01-19 14:47:33 -08:00
Anthony Towns
8ffea86023 use p for taproot internal key 2020-01-19 14:47:33 -08:00
Anthony Towns
4e13ec7301 make secret key a 32-byte array called sk, introduce pubkey() 2020-01-19 14:47:33 -08:00
Anthony Towns
a3f74a204e pk not p 2020-01-19 14:47:33 -08:00
Anthony Towns
efa556aa06 public keys aren't identical 2020-01-19 14:47:33 -08:00
Jonas Nick
8fd629c3f9 Fix privkey negation in taproot_sign_key 2020-01-19 14:47:33 -08:00
Jonas Nick
cc962bf84f Address sipa's comments 2020-01-19 14:47:33 -08:00
Jonas Nick
c33c7d0a0c Tag signature hashes, improve rationale and update test vectors 2020-01-19 14:47:33 -08:00
Jonas Nick
7f3611d239 Use a tagged hash in bip-schnorr nonce derivation 2020-01-19 14:47:33 -08:00
Jonas Nick
ba748dcd93 Use key path spend terminology more consistently in taproot/tapscript 2020-01-19 14:47:33 -08:00
John Newbery
680af7db4c Return a point from lift_x() 2020-01-19 14:47:33 -08:00
John Newbery
bba0bad5e8 Define c in lift_x(x) 2020-01-19 14:47:33 -08:00
John Newbery
1c6b104597 Replace 'quadratic residue of...' 2020-01-19 14:47:33 -08:00
Jonas Nick
16073d0c20 Clarify how to disable key path spending 2020-01-19 14:47:33 -08:00
Jonas Nick
f3bef4f459 Address sipa's feedback 2020-01-19 14:47:33 -08:00
Jonas Nick
a67e5e323c Update bip-schnorr/test-vectors.py
Co-Authored-By: Tim Ruffing <tim@timruffing.de>
2020-01-19 14:47:33 -08:00
Jonas Nick
5da30bd568 Update bip-schnorr.mediawiki
Co-Authored-By: Tim Ruffing <tim@timruffing.de>
2020-01-19 14:47:33 -08:00
Jonas Nick
303ff5fb26 Address Tim's comments 2020-01-19 14:47:33 -08:00
Jonas Nick
08e1b3da74 Use short public keys for taproot output keys 2020-01-19 14:47:33 -08:00
Jonas Nick
e084aafb8b Switch to 32 byte public keys in bip-schnorr 2020-01-19 14:47:33 -08:00
Jonas Nick
1a4b08ab72 Fix point_from_bytes in bip-schnorr reference implementation 2020-01-19 14:47:33 -08:00
Jonas Nick
b2e6d11a6e Clarify diagram 2020-01-19 14:47:33 -08:00
Dmitry Petukhov
953dd23665 taproot_output_script: first returned byte should be OP_1 (0x51)
If we look at

  def IsPayToTaproot(script):
      return len(script) == 35 and script[0] == OP_1 and script[1] == 33 and script[2] >= 0 and script[2] <= 1

First byte is is checked for OP_1. OP_1 is 0x51

But the example code in this BIP returns  

`bytes([0x01, 0x21, output_pubkey[0] & 1]) + output_pubkey[1:]`

First byte 0x01, but it should be 0x51
2020-01-19 14:47:33 -08:00
Mark B Lundeberg
b65cd69467 remove duplicate warning
Though perhaps, the emphasis is warranted given its importance. :-)
2020-01-19 14:47:33 -08:00
Jonas Nick
eb96be7a9d Clarify what 'reduced' means in tests and use word 'message' instead of 'message hash' 2020-01-19 14:47:33 -08:00
Pieter Wuille
c7d7034b16 Add taproot/tapscript bips drafts 2020-01-19 14:47:33 -08:00
Pieter Wuille
6e77233b57 Add draft for Schnorr BIP
Includes squashed contributions by GitHub users jonasnick,
real-or-random, AustinWilliams, JustinTArthur, ysangkok,
RCassatta, Sjors, tnakagawa, and guggero.
2020-01-19 14:47:33 -08:00
Luke Dashjr
24eddbb48a
Merge pull request #869 from benthecarman/patch-2
BIP 174: Specify that separator only appears at end of the map
2020-01-03 04:31:58 +00:00
Luke Dashjr
ed3b31c136
Merge pull request #870 from dgpv/patch-10
BIP-174: add missing types to Appendix A; fix proprietary type names
2020-01-03 04:31:45 +00:00
Dmitry Petukhov
8faf97e720
BIP-174: add missing types to Appendix A; fix proprietary type names
PSBT_INPUT_PROPRIETARY -> PSBT_IN_PROPRIETARY

PSBT_OUTPUT_PROPRIETARY -> PSBT_OUT_PROPRIETARY

to be consistent with other in/out type names that use shortened `IN` and `OUT`
2019-12-14 20:39:40 +05:00
Luke Dashjr
0a388fac46
Merge pull request #860 from azuchi/fix-wrong-description-bip174
BIP174: Fix wrong description about Proprietary Use Type
2019-12-13 16:07:25 +00:00
Luke Dashjr
56fe789358
Merge pull request #866 from dgpv/patch-6
BIP174: remove 'first byte is the type' comment for key data
2019-12-13 16:06:41 +00:00
Luke Dashjr
feb5395fe0
Merge pull request #867 from dgpv/patch-7
BIP-174: test data: fix value length
2019-12-13 16:06:26 +00:00
Luke Dashjr
675a14b23c
Merge pull request #865 from benthecarman/patch-1
BIP 174: Specifiy that the 32 bit ints are unsigned
2019-12-13 16:05:26 +00:00
Ben Carman
e097b1d38a
BIP 174: Specify that separator only appears at end of the map 2019-12-11 15:53:06 -06:00
Dmitry Petukhov
65f0b3dd62
BIP-174: test data: fix value length
In the test case "Case: PSBT With invalid output witnessScript typed key", after PSBT_OUT_WITNESS_SCRIPT key with garbage data (which ends with `...478ef51309d`, follows value `2b` which would denote the length of the data value of the key. But the length of actual remaining data is only 7 bytes. Thus, an implementation that reads key-value pairs and checks for validity of the key data after it has read the current key-value pair, will not be able to hit the exact condition intended for this test case: extra data within the key itself. This is because such implementation will hit serialization error when it will try to read the data of the value and will get the short read.

Reading full key-value pair and then checking key format afterwards is fairly normal thing to do, as the format of the keys with all their meaning is an abstraction of higher level than just the simple key-value serialization format.

The proposed change is to replace byte `2b` after the key data to `06` and thus make the value length in the key-value pair valid (not going beyond the end of the data).

base64 encoding has been changed accordingly.
2019-12-09 17:30:47 +05:00
Ben Carman
c7191c935e
Specify 32 bit itns as unsigned and their endianess 2019-12-09 01:44:43 -06:00
Dmitry Petukhov
267c02a4b5
BIP174: remove 'first byte is the type' comment for key data
As the key type is now defined as compact size integer, `At the beginning of each key is a compact size unsigned integer representing the type`, the comment in the first table in the document, about first byte of the key being the key type is no longer accurate.

As the structure of the key data is described further in the text after the table, and the comment that it starts with the compact size integer seems a bit long to be in that table, I think it is better to just remove the comment about the key data structure from the table, and leave the explanation to the text after the table.
2019-12-09 12:21:09 +05:00
azuchi
87a85402ae BIP174: Fix wrong description about Proprietary Use Type 2019-11-14 11:53:05 +09:00
Luke Dashjr
8431b22b2d
Merge pull request #856 from emilengler/emilengler-redefinition-of-the-term-address
BIP 179: Name for payment recipient identifiers
2019-11-08 16:10:12 +00:00