Skip to content

Commit 5d0b400

Browse files
committed
Merge pull request bitcoin#371 from justusranvier/bip47
BIP-0047: Clarify usage and format of outpoints
2 parents 3ff0772 + 97dafa7 commit 5d0b400

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

bip-0047.mediawiki

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RECENT CHANGES:
2+
* (17 Apr 2016) Clarify usage of outpoints in notification transactions
23
* (18 Dec 2015) Update explanations to resolve FAQs
34
* (12 Oct 2015) Revise blinding method for notification transactions
4-
* (21 Sep 2015) Correct base58check version byte
55
66
<pre>
77
BIP: 47
@@ -119,6 +119,9 @@ It is assumed that Alice can easily obtain Bob's payment code via a suitable met
119119
* Payment code: an extended public key and associated metadata which is associated with a particular identity/account
120120
* Notification address: the P2PKH address associated with the 0<sup>th</sup> public key derived from a payment code
121121
* Notification transaction: a transaction which sends an output to a notification address which includes an embedded payment code
122+
* Designated input: the first input in the notification transaction which exposes an secp256k1 pubkey in either its signature script, or in the redeem script or pubkey script of the output being spent
123+
* Designated pubkey: the first secp256k1 pubkey pushed to the stack during script execution for the designated input
124+
* Outpoint: the specific output of a previous transaction which is being spent. See the Reference section for the binary serialization
122125
123126
====Notification Transaction====
124127

@@ -127,12 +130,12 @@ Prior to the first time Alice initiates a transaction to Bob, Alice MUST inform
127130
# Alice constructs a transaction which sends a small quantity of bitcoins to Bob's notification address (notification transaction)
128131
## The inputs selected for this transaction MUST NOT be easily associated with Alice's notification address
129132
# Alice derives a unique shared secret using ECDH:
130-
## Alice selects the private key corresponding to the first exposed public key, of the first pubkey-exposing input, of the transaction: <pre>a</pre>
133+
## Alice selects the private key corresponding to the designated pubkey: <pre>a</pre>
131134
## Alice selects the public key associated with Bob's notification address: <pre>B, where B = bG</pre>
132135
## Alice calculates a secret point: <pre>S = aB</pre>
133136
## Alice calculates a 64 byte blinding factor: <pre>s = HMAC-SHA512(x, o)</pre>
134137
### "x" is the x value of the secret point
135-
### "o" is the outpoint being spent by the first pubkey-exposing input of the transaction.
138+
### "o" is the outpoint being spent by the designated input
136139
# Alice serializes her payment code in binary form.
137140
# Alice renders her payment code (P) unreadable to anyone except Bob:
138141
## Replace the x value with x': <pre>x' = x XOR (first 32 bytes of s)</pre>
@@ -143,12 +146,12 @@ Prior to the first time Alice initiates a transaction to Bob, Alice MUST inform
143146
# Bob watches for any transactions which create an output at his notification address.
144147
# When a transaction is received, the client examines it to determine if it contains a standard OP_RETURN output with an 80 byte payload (notification transactions).
145148
# If the first byte of the payload in a notification transaction is 0x01:
146-
## Bob selects the first exposed public key, of the first pubkey-exposing input, of the transaction: <pre>A, where A = aG</pre>
149+
## Bob selects the designated pubkey: <pre>A, where A = aG</pre>
147150
## Bob selects the private key associated with his notification address: <pre>b</pre>
148151
## Bob calculates a secret point: <pre>S = bA</pre>
149152
## Bob calculates the binding factor: <pre>s = HMAC-SHA512(x, o)</pre>
150153
### "x" is the x value of the secret point
151-
### "o" is the outpoint being spent by the first pubkey-exposing input of the transaction.
154+
### "o" is the outpoint being spent by the designated input.
152155
## Bob interprets the 80 byte payload as a payment code, except:
153156
### Replace the x value with x': <pre>x' = x XOR (first 32 bytes of s)</pre>
154157
### Replace the chain code with c': <pre>c' = c XOR (last 32 bytes of s)</pre>
@@ -300,7 +303,7 @@ In order to use Bitmessage notification, the recipient must have a Bitmessage cl
300303
* [[bip-0032.mediawiki|BIP32 - Hierarchical Deterministic Wallets]]
301304
* [[bip-0043.mediawiki|BIP43 - Purpose Field for Deterministic Wallets]]
302305
* [[bip-0044.mediawiki|BIP44 - Multi-Account Hierarchy for Deterministic Wallets]]
303-
* [[https://bitcoin.org/en/glossary/outpoint|Outpoint]]
306+
* [[https://bitcoin.org/en/developer-reference#outpoint|Outpoint]]
304307
* [[https://github.com/petertodd/dust-b-gone|dust-b-gone]]
305308
* [[https://en.bitcoin.it/wiki/Base58Check_encoding|Base58Check encoding]]
306309
* [[https://bitmessage.org/bitmessage.pdf|Bitmessage]]

0 commit comments

Comments
 (0)