You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bip-0047.mediawiki
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
RECENT CHANGES:
2
+
* (17 Apr 2016) Clarify usage of outpoints in notification transactions
2
3
* (18 Dec 2015) Update explanations to resolve FAQs
3
4
* (12 Oct 2015) Revise blinding method for notification transactions
4
-
* (21 Sep 2015) Correct base58check version byte
5
5
6
6
<pre>
7
7
BIP: 47
@@ -119,6 +119,9 @@ It is assumed that Alice can easily obtain Bob's payment code via a suitable met
119
119
* Payment code: an extended public key and associated metadata which is associated with a particular identity/account
120
120
* Notification address: the P2PKH address associated with the 0<sup>th</sup> public key derived from a payment code
121
121
* 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
122
125
123
126
====Notification Transaction====
124
127
@@ -127,12 +130,12 @@ Prior to the first time Alice initiates a transaction to Bob, Alice MUST inform
127
130
# Alice constructs a transaction which sends a small quantity of bitcoins to Bob's notification address (notification transaction)
128
131
## The inputs selected for this transaction MUST NOT be easily associated with Alice's notification address
129
132
# 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>
131
134
## Alice selects the public key associated with Bob's notification address: <pre>B, where B = bG</pre>
132
135
## Alice calculates a secret point: <pre>S = aB</pre>
133
136
## Alice calculates a 64 byte blinding factor: <pre>s = HMAC-SHA512(x, o)</pre>
134
137
### "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
136
139
# Alice serializes her payment code in binary form.
137
140
# Alice renders her payment code (P) unreadable to anyone except Bob:
138
141
## 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
143
146
# Bob watches for any transactions which create an output at his notification address.
144
147
# 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).
145
148
# 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>
147
150
## Bob selects the private key associated with his notification address: <pre>b</pre>
148
151
## Bob calculates a secret point: <pre>S = bA</pre>
149
152
## Bob calculates the binding factor: <pre>s = HMAC-SHA512(x, o)</pre>
150
153
### "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.
152
155
## Bob interprets the 80 byte payload as a payment code, except:
153
156
### Replace the x value with x': <pre>x' = x XOR (first 32 bytes of s)</pre>
154
157
### 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
0 commit comments