BIP 0352
How can one reusable address receive payments at fresh outputs?
Publish an address once. Receive at fresh outputs. Your wallet does the work of finding which payments belong to you.
An address is easy to put on a website and awkward to keep using. When every payment goes to that same address, an observer can group the payments together. Giving each sender a fresh address avoids that pattern, but now you have to supply addresses whenever someone wants to pay.1
Silent payments let you publish a reusable address while senders pay to fresh Taproot outputs. The address gives them what they need to calculate those outputs. Your wallet can calculate them too, using its scanning key and information in each transaction. That is how it finds your money without a separate notification.23456
Source details
This chapter is an independent explanation, not the proposal itself. Preamble fields are shown as the pinned files record them, without author e-mail addresses. Status is the proposal’s own field. It is not an endorsement or a sign of consensus.
BIP 352: Silent Payments
- BIP
- 352
- Layer
- Applications
- Title
- Silent Payments
- Authors
- josibake
Ruben Somsen
Sebastian Falbesoner - Status
- Complete
- Type
- Specification
- Assigned
- 2023-03-09
- License
- BSD-2-Clause
- Version
- 1.1.1
- Requires
- 340, 341, 350
Fig. A15.1 One address to publish; a payment to find
Inside the address: characters, keys and checksum
Exact values
- Address
sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqjuexzk6murw56suy3e0rd2cgqvycxttddwsvgxe2usfpxumr70xc9pkqwv- B_scan
0220bcfac5b99e04ad1a06ddfb016ee13582609d60b6291e98d01a9bc9a16c96d4- B_m (here the unlabeled spend key B_spend)
025cc9856d6f8375350e123978daac200c260cb5b5ae83106cab90484dcd8fcf36
Meet at the same secret
Begin with a simpler version of the idea. Alice wants to pay Bob. She has a private key and Bob’s public key; Bob has his private key and can see Alice’s public key in her transaction. Each combines the private key they hold with the public key of the other person.11
Elliptic-curve Diffie–Hellman makes those two calculations reach the same point. Alice and Bob arrive there from different directions. Someone watching with only the public keys cannot perform the same calculation under the usual Diffie–Hellman assumption. The secret is computed at each end, rather than sent between them.1112
Fig. A15.2 Different keys, the same destination
Bob publishes his public key B. Everyone, the observer included, can see it.
Alice holds a secret key a; its public key A shows in the transaction she makes.
Each multiplies the other's public key by their own secret: Alice computes a·B, Bob computes b·A.
Both get the same point S (Diffie–Hellman). The observer, with only A and B, cannot.
Alice pays to P = B + hash(S)·G. Bob recomputes it and finds P; under the Diffie–Hellman assumption, the observer cannot connect P to B.
Alice hashes that shared point and uses the result to tweak Bob’s public key. The tweaked key is where she pays. Bob can repeat the calculation and look for that key among the transaction’s outputs. Finding a match tells him which output to spend, and he can apply the corresponding tweak to his private spending key.31113
An observer sees the transaction too. What they lack is the private information needed to reproduce the shared secret and connect that output to Bob’s address. The output itself is an ordinary Taproot output. The authors want silent payments to blend in with other transactions, without extra on-chain notification data.2612
The simple-case equation
The idea is elliptic-curve Diffie–Hellman. If Alice holds the private key a for public key A, and Bob holds b for B, then a·B and b·A are the same point. In BIP 352’s simple case, Alice pays Bob at P = B + hash(a·B)·G. Bob sees A in Alice’s transaction, computes hash(b·A) himself, and looks for P among the outputs. Under the usual Diffie–Hellman assumption, anyone without a or b cannot compute that hash, so cannot connect P to B.1112
Bob has to look
There is no public tag saying “for Bob.” His wallet has to inspect transactions that could contain silent payments and try the calculation. That work moves to the receiver so that the sender can pay without first asking for a new address.15914
A payment may include several outputs for the same receiver. The calculation therefore includes a counter. Bob starts with P₀. If that output is present, he tries P₁, then keeps going until the first missing output. In the example below, two outputs match and the next does not.91015
Fig. A15.3 Find a match, then try the next
Exact values
- P₀ (found)
f207162b1a7abc51c42017bef055e9ec1efc3d3567cb720357e2b84325db33ac- P₁ (found)
e976a58fbd38aeb4e6093d4df02e9c1de0c4513ae0c588cef68cda5b2f8834ca- P₂ (not found)
3c54444944d176437644378c23efb999ab6ab1cacdfe1dc1537b607e3df330e2- Output 1
e976a58fbd38aeb4e6093d4df02e9c1de0c4513ae0c588cef68cda5b2f8834ca- Output 2
f207162b1a7abc51c42017bef055e9ec1efc3d3567cb720357e2b84325db33ac
Stopping at a gap has a consequence for the sender. Every generated output MUST appear in the finished transaction. If the sender removed P₁ but kept P₂, Bob would stop at the missing P₁ and never discover the later payment. Output discovery depends on this shared ordering.916
Scanning is also the main cost of the design. BIP 352’s authors describe it as generally feasible for full nodes and challenging for light clients. Their appendix explores ways a light client might use extra transaction data and block filters, but that discussion is outside the specification.517
Which transactions to scan and when to stop
Nothing on chain tells Bob a payment has arrived. For silent payments v0, a transaction MUST be scanned if and only if it has at least one taproot output, at least one eligible input, and spends no output with a SegWit version above 1. For each such transaction Bob sums the input keys, computes the input hash and the shared secret, and checks the taproot outputs for P_0.35914
If P_0 is there, he checks for P_1, and so on; at the first one not found, he stops. These extra checks happen only after a match, so the authors call the added cost negligible. Since version 1.1.0 the search is also capped. A sender fails if any group of recipient addresses sharing one scan key is larger than K_max = 2323, and a receiver stops at k = 2323. The changelog says this mitigates quadratic scanning on adversarial transactions.9151819
Two keys with different jobs
The full address carries two public keys. One is the scan key, which helps find incoming payments. The other is the spend key, which controls spending. Their private counterparts can be kept in different places: scanning can happen online while the spending key remains in cold storage.47
This separation matters during ordinary use. A wallet needs to keep checking for receipts; it need not bring the spending key online every time it does so. A scanning setup has private information of its own, but that information does not by itself give it the spending key.413
The address is a set of public instructions for deriving outputs, rather than the output key of a particular coin. For version 0 on mainnet it is 116 characters long and starts sp1q. The two compressed public keys account for 66 bytes inside it. The address uses Bech32m to encode them and detect errors.7820
Labels let Bob distinguish receipts while continuing to scan with the same key. A labeled address changes the spending side and keeps the scan key. That is convenient bookkeeping, but anyone comparing those addresses can see their shared scan key and tell that they belong together.2122
Fig. A15.4 Different labels, the same receiver
Exact values
- no label
sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqjuexzk6murw56suy3e0rd2cgqvycxttddwsvgxe2usfpxumr70xc9pkqwv- label m = 2
sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqjex54dmqmmv6rw353tsuqhs99ydvadxzrsy9nuvk74epvee55drs734pqq- label m = 3
sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqsg59z2rppn4qlkx0yz9sdltmjv3j8zgcqadjn4ug98m3t6plujsq9qvu5n- label m = 1001337
sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgq7c2zfthc6x3a5yecwc52nxa0kfd20xuz08zyrjpfw4l2j257yq6qgnkdh5
Matching labels and recovering change
Labels let Bob tell payments apart without scanning for several addresses. He publishes (B_scan, B_m), where B_m = B_spend + hash(b_scan ‖ m)·G. When an output does not match P_k directly, he subtracts P_k and checks whether the difference is one of his label points. If not, he negates the output and tries again, because an x-only output does not say which y it had. Label m = 0 is reserved for change: the BIP stresses that a wallet never hands it out, and says every receiving wallet should at least scan for it when recovering from backup.21232425
Make each payment depend on its transaction
The simple Alice-and-Bob exchange leaves out a practical detail: a transaction can have several inputs. The full protocol adds together the keys from all eligible inputs before computing the shared secret. Sender and receiver must choose exactly the same keys, or they will calculate different destinations.32627
An additional hash ties the calculation to the smallest outpoint and the combined input public key. That makes the destination depend on which coins are being spent, so paying again from the same keys does not simply reuse the previous output. The receiver can recover this input information from the transaction.2829
Only certain input types provide the needed keys in a suitable form. BIP 352 excludes inputs with several keys or conditional branches from the shared-secret calculation. They would let a sender re-sign with a different set of public keys after the output was derived, a problem in collaborative transactions. It also requires at least one eligible input. Funding a payment and contributing a key to its calculation are distinct jobs.273031
Fig. A15.5 Which inputs contribute a key?
Exact values
- Simple send: two inputs
025a1e61f898173040e20616d43e9f496fba90338a39faa1ed98fcbaeee4dd9be5(P2PKH)03bd85685d03d111699b15d046319febe77f8de5286e9e512703cdee1bf3be3792(P2PKH)- Pubkey extraction from malleated p2pkh
025a1e61f898173040e20616d43e9f496fba90338a39faa1ed98fcbaeee4dd9be5(P2PKH)03782eeb913431ca6e9b8c2fd80a5f72ed2024ef72a3c6fb10263c379937323338(P2PKH)02e0ec4f64b3fa2e463ccfcf4e856e37d5e1e20275bc89ec1def9eb098eff1f85d(P2PKH)- P2PKH and P2WPKH Uncompressed Keys are skipped
025a1e61f898173040e20616d43e9f496fba90338a39faa1ed98fcbaeee4dd9be5(P2PKH)
P2PKH: skipped, no compressed key in the scriptSig hashes to the output
P2WPKH: skipped, last witness item is not a compressed key- Skip invalid P2SH inputs
025a1e61f898173040e20616d43e9f496fba90338a39faa1ed98fcbaeee4dd9be5(P2SH-P2WPKH)
P2SH-P2WPKH: skipped, last witness item is not a compressed key
P2SH: skipped, P2SH, but not wrapping P2WPKH- Single recipient: taproot input with NUMS point
- P2TR: skipped, script-path spend with the NUMS internal key H
02782eeb913431ca6e9b8c2fd80a5f72ed2024ef72a3c6fb10263c379937323338(P2TR)
P2TR: skipped, script-path spend with the NUMS internal key H
Start with the sender, then switch to the receiver and finally the outside observer. The transaction stays the same. Watch who can identify the payment and who cannot. Open the calculation after comparing those views.31012
Fig. A15.6 The same payment, three viewpoints
Static view: the sender’s side of the first payment, showing the result. With JavaScript you can switch to the receiver or an outside observer, reveal the calculation and explore other payments.
The sender's view: it sums its input keys' secrets, combines them with the scan key of the address it pays into a shared secret, and creates 1 taproot output.
Exact values for this view
Vector “Simple send: two inputs”, seen by the sender. On chain: inputs P2PKH with key 025a1e61f898173040e20616d43e9f496fba90338a39faa1ed98fcbaeee4dd9be5; P2PKH with key 03bd85685d03d111699b15d046319febe77f8de5286e9e512703cdee1bf3be3792. Taproot outputs: 3e9fce73d4e77a4809908e3c3a2e54ee147b9312dc5044a193d1fc85de46e3c1. The sender knows its input keys' secrets (not shown) and pays sp1qqgste7k9hx0qftg6qmwlkqtwuy6cycyavzmzj85c6qdfhjdpdjtdgqjuexzk6murw56suy3e0rd2cgqvycxttddwsvgxe2usfpxumr70xc9pkqwv. It creates 3e9fce73d4e77a4809908e3c3a2e54ee147b9312dc5044a193d1fc85de46e3c1.
BIP 352 send_and_receive_test_vectors.json, “Simple send: two inputs” (line 3). Recomputed at build time by the tested model and checked against the vector’s outputs, shared secret and found outputs.
The full derivation, including the counter
The shared secret is input_hash·a·B_scan on Alice’s side and input_hash·b_scan·A on Bob’s; they are the same point. From it Alice derives t_k, a tagged hash of the secret and a counter k, and pays to P_k = B_spend + t_k·G (B_m in place of B_spend for a labeled address). She starts with k = 0 and adds one for each further output to the same receiver. To spend, Bob uses b_spend + t_k (plus the label tweak, for a labeled output), mod n, as the private key.31315
Input eligibility and signing rules
Not every input contributes to the secret. Any UTXO with a known output script can fund the transaction, though the sender leaves out outputs with a SegWit version above 1. Sender and receiver MUST, however, derive the shared secret only from inputs of four types: P2TR, P2WPKH, P2SH-P2WPKH and P2PKH. For each, the receiver has to find the public key in what the transaction reveals: the last witness item for the two P2WPKH forms, the scriptSig for P2PKH, and the taproot output key itself for P2TR.272935
Inputs with conditional branches or several keys, such as CHECKMULTISIG, are left out; the BIP explains that they would let a participant in a collaborative transaction re-sign with different keys after the output was derived. Only compressed and x-only keys count, so an input that reveals an uncompressed key is skipped. A taproot script-path spend still counts, through its output key. The sender MUST hold that key’s private key or leave the input out. The exception is a script-path spend whose internal key is the NUMS point H from BIP 341: that input is skipped.2930333436
Two details keep sender and receiver in step. A taproot key is x-only, and the receiver assumes the even-y point when it sums the keys, so the sender negates any taproot private key whose point has odd y. And for P2PKH, the receiver MUST parse the scriptSig for the key even when it does not match the usual template, because a third party can malleate a P2PKH scriptSig.3738
A transaction with no eligible input has no secret at all, so a sender’s coin selection MUST include at least one.31
The sender has rules of its own. It should sign with DEFAULT, ALL, SINGLE or NONE; the BIP calls ANYONECANPAY unsafe. And every output it generated MUST appear in the final transaction: if P_1 were dropped, the receiver, stopping at the first gap, would never find P_2.1639
What you still have to look after
Reusing the public address removes one source of on-chain links. It does not make every surrounding choice private. Labeled addresses can still be grouped together. The authors also advise that a transaction’s inputs belong to one entity: they do not claim a formal security proof for collaborative use.122240
Backups need thought as well. A wallet restored from its seed can rebuild its history by scanning from its birthday. Because outputs are derived individually, the BIP also recommends regular backups. The convenience of a permanent receiving address comes with a wallet that must remember how to search.541
Evidence
Each numbered marker in the text points here, and the ↩ links lead back to the text. Quotes are verbatim
from the BIP files at commit 3a10b5b, wiki markup
included. Links open the exact lines. Labels say what kind of statement each entry is: a rule, the
author’s rationale, history, a test vector, or our own inference.
-
↩ a b Author’s rationale The authors motivate the BIP by the privacy value of fresh addresses, which usually needs sender-receiver interaction (an address, a batch, or an xpub).
Quoted source text (1)
Using a new address for each Bitcoin transaction is a crucial aspect of maintaining privacy. This often requires a secure interaction between sender and receiver, so that the receiver can hand out a fresh address, a batch of fresh addresses, or a method for the sender to generate addresses on-demand, such as an xpub.
-
↩ a b Rule BIP 352 specifies static payment addresses without on-chain linkability of payments or on-chain notifications.
Quoted source text (1)
This document specifies a protocol for static payment addresses in Bitcoin without on-chain linkability of payments or a need for on-chain notifications.
-
↩ a b c d e f g h Rule The sender computes ecdh_shared_secret = input_hash·a·B_scan, t_k as a tagged hash of the secret and k, and P = B_m + t_k·G; the receiver computes input_hash·b_scan·A and P_k = B_spend + t_k·G.
BIP 352 L309–310 BIP 352 L312 BIP 352 L314 BIP 352 L343
Quoted source text (4)
** Let ''ecdh_shared_secret = input_hash·a·B<sub>scan</sub>'' ** Let ''k = 0''
Let ''t<sub>k</sub> = hash<sub>BIP0352/SharedSecret</sub>(ser<sub>P</sub>(ecdh_shared_secret) || ser<sub>32</sub>(k))''
Let ''P<sub>mn</sub> = B<sub>m</sub> + t<sub>k</sub>·G''
* Let ''ecdh_shared_secret = input_hash·b<sub>scan</sub>·A''
-
↩ a b c d Author’s rationale An address carries a scan key and a spend key so b_spend can stay in cold storage while scanning uses b_scan.
Quoted source text (1)
Bob can instead publish an address of the form ''(B<sub>scan</sub>, B<sub>spend</sub>)''. This allows Bob to keep ''b<sub>spend</sub>'' in offline cold storage and perform the scanning with the public key ''B<sub>spend</sub>'' and private key ''b<sub>scan</sub>''.
-
↩ a b c d e Author’s rationale The benefits come at the cost of wallets scanning the blockchain; the authors call this generally feasible for full nodes but a challenge for light clients, and light-client support open research.
Quoted source text (1)
These benefits come at the cost of requiring wallets to scan the blockchain in order to detect payments. This added requirement is generally feasible for full nodes but poses a challenge for light clients. While it is possible today to implement a privacy-preserving light client at the cost of increased bandwidth, light client support is considered an area of open research
-
↩ a b Rule Receiver outputs are always BIP 341 taproot outputs.
Quoted source text (1)
* Receiver addresses are always [https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP341] taproot outputs
-
↩ a b c Rule An address is bech32m with HRP sp (mainnet) or tsp, the character q for version 0, and the 66-byte concatenation of B_scan and B_m; a v0 mainnet address is 116 characters.
Quoted source text (2)
** The human-readable part "sp" for mainnet, "tsp" for testnets (e.g. signet, testnet) ** The data-part values: *** The character "q", to represent a silent payment address of version 0 *** The 66-byte concatenation of the receiver's public keys, ''ser<sub>P</sub>(B<sub>scan</sub>) || ser<sub>P</sub>(B<sub>m</sub>)''
For a silent payments v0 address, this results in a 116-character address when using the 2-character mainnet HRP ("sp")
-
↩ a b Test vector The first vector's address decodes to two 33-byte compressed keys, and the model re-encodes the same 116-character address.
Quoted source text (1)
The 66-byte concatenation of the receiver's public keys
-
↩ a b c d e f g Rule The receiver computes P_k = B_spend + t_k·G starting at k = 0, checks the transaction's taproot output keys, rescans with k++ after each match, and stops when no match is found.
BIP 352 L345–350 BIP 352 L350 BIP 352 L354 BIP 352 L362
Quoted source text (4)
** Let ''outputs_to_check'' be the taproot output keys from all taproot outputs in the transaction (spent and unspent). ** Starting with ''k = 0'':
*** Compute ''P<sub>k</sub> = B<sub>spend</sub> + t<sub>k</sub>·G''
Remove ''output'' from ''outputs_to_check'' and rescan ''outputs_to_check'' with ''k++''
*** If no matches are found, stop
-
↩ a b c d e f g Test vector This site's silent payments model reproduces all 28 of BIP 352's send-and-receive vectors: sender outputs and shared secrets, receiver addresses, tweaks, shared secrets, found outputs and spending tweaks. The figures show six of them, recomputed at build time and checked against the published values.
Quoted source text (1)
A [[bip-0352/send_and_receive_test_vectors.json|collection of test vectors in JSON format]] is provided
-
↩ a b c d e Rule Simple case: Alice pays P = B + hash(a·B)·G; since a·B == b·A (ECDH), Bob finds P by computing hash(b·A) from the input public keys.
Quoted source text (2)
* Let ''P = B + hash(a·B)·G'' * Encode ''P'' as a [https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki BIP341] taproot output Since ''a·B == b·A''
Bob scans with his private key ''b'' by collecting the input public keys for each transaction with at least one unspent taproot output and performing the ECDH calculation until ''P'' is found
-
↩ a b c d e f g Author’s rationale The stated goals include no increase in transaction size or cost, transactions that blend in, and no linking of transactions to a silent payment address by an outside observer.
Quoted source text (1)
* No increase in the size or cost of transactions * Resulting transactions blend in with other bitcoin transactions and can't be distinguished * Transactions can't be linked to a silent payment address by an outside observer
-
↩ a b c Rule The receiver spends with d = (b_spend + t_k + optional label tweak) mod n.
Quoted source text (1)
Let ''d = (b<sub>spend</sub> + t<sub>k</sub> + hash<sub>BIP0352/Label</sub>(ser<sub>256</sub>(b<sub>scan</sub>) || ser<sub>32</sub>(m))) mod n''
-
↩ a b Rule A v0 transaction MUST be scanned iff it has at least one taproot output, at least one eligible input, and spends no output with SegWit version > 1.
BIP 352 L191–195 BIP 352 L194–195
Quoted source text (2)
For silent payments v0 a transaction MUST be scanned if and only if all of the following are true: * The transaction contains at least one BIP341 taproot output
* The transaction has at least one input from the ''[[#inputs-for-shared-secret-derivation|Inputs For Shared Secret Derivation]]'' list * The transaction does not spend an output with SegWit version > 1
-
↩ a b c d e Rule Further outputs to the same receiver use k = 1, 2, …; after finding P_0 the receiver checks P_1 and stops at the first one not found.
Quoted source text (1)
Once he detects the first output, he must: * Check for ''P<sub>1</sub> = B + hash(b·A || 1)·G'' * If ''P<sub>1</sub>'' is not found, stop
-
↩ a b c Rule All generated outputs MUST be in the final transaction; omitting P_i hides later outputs from the receiver.
Quoted source text (1)
All generated outputs MUST be present in the final transaction. If an output ''P<sub>i</sub>'' with ''i < k'' is omitted, the receiver will not be able to find outputs ''P<sub>j</sub>'' where ''i < j <= k''.
-
↩ Author’s rationale Light-client scanning is out of scope; an appendix sketches tweak data served per transaction and BIP 158 block filters.
Quoted source text (2)
While this is out of scope for the current BIP
Once a light client has the tweak data for a block, they can determine whether or not an output to them exists in the block using BIP158 block filters.
-
↩ a b Rule Since version 1.1.0, a sender fails if a scan-key group exceeds K_max = 2323 addresses and a receiver stops at k = K_max, to mitigate quadratic scanning for adversarial transactions.
BIP 352 L306 BIP 352 L347 BIP 352 L510–511
Quoted source text (3)
* If any of the groups exceed the limit of ''K<sub>max</sub>'' (=2323) silent payment addresses, fail.
*** If ''k == K<sub>max</sub>'' (=2323), stop scanning.
* '''1.1.0''' (2026-03-02): ** Introduce per-group recipient limit ''K<sub>max</sub>'' to mitigate quadratic scanning behavior for adversarial transactions.
-
↩ Author’s rationale Because the follow-up checks run only after a match, the authors call the added scanning cost negligible.
Quoted source text (1)
Since Bob will only perform these subsequent checks after a transaction with at least one output paying him is found, the increase to his overall scanning requirement is negligible.
-
↩ Rule Version 0 addresses start sp1q; the version is carried as in bech32 addresses.
Quoted source text (1)
This document defines version 0 (''sp1q'').
-
↩ a b c d Rule A label tweaks the spend key, B_m = B_spend + hash(b_scan || m)·G, so a receiver can tell payments apart without scanning for multiple addresses.
BIP 352 L118–120 BIP 352 L356–357
Quoted source text (2)
Naively, Bob could publish multiple silent payment addresses, but this would require him to scan for each one, which becomes prohibitively expensive. Instead, Bob can label his spend public key ''B<sub>spend</sub>'' with an integer ''m'' in the following way: * Let ''B<sub>m</sub> = B<sub>spend</sub> + hash(b<sub>scan</sub> || m)·G''
Compute ''label = output - P<sub>k</sub>'' ***** Check if ''label'' exists in the list of labels used by the wallet
-
↩ a b c Author’s rationale An outside observer can easily tell that labeled addresses belong to one entity because they share B_scan; labels are not for separate identities.
Quoted source text (1)
It is important to note that an outside observer can easily deduce that each published ''(B<sub>scan</sub>, B<sub>m</sub>)'' pair is owned by the same entity as each published address will have ''B<sub>scan</sub>'' in common. As such, labels are not meant as a way for Bob to manage separate identities
-
↩ Rule If no label matches, the receiver negates the output and checks again, because taproot outputs are x-only.
Quoted source text (2)
If a label is not found, negate ''output'' and check a second time
Unfortunately taproot outputs are X-only, meaning we don't know what the correct Y coordinate is.
-
↩ Rule Label m = 0 is reserved for change; it is important that a wallet never hands it out.
Quoted source text (2)
We reserve ''m = 0'' for this use case.
It is important that the wallet never hands out the label with ''m = 0'' in order to ensure nobody else can create payments that are wrongly labeled as change.
-
↩ Rule Every receiving silent payments wallet should at least scan for the change label when recovering from backup.
Quoted source text (1)
every receiving silent payments wallet should at least scan for the change label when recovering from backup in order to ensure maximum cross-compatibility.
-
↩ a b Rule The sender tweaks with the sum of the input private keys, a = a1 + … + an, and A = a·G.
Quoted source text (1)
Alice performs the tweak with the sum of her input private keys in the following manner: * Let ''a = a<sub>1</sub> + a<sub>2</sub> + ... + a<sub>n</sub>'' * Let ''A = a·G''
-
↩ a b c d Rule Any UTXO with known output scripts can fund the transaction, but sender and receiver MUST derive the secret from P2TR, P2WPKH, P2SH-P2WPKH and P2PKH inputs only.
Quoted source text (1)
While any UTXO with known output scripts can be used to fund the transaction, the sender and receiver MUST use inputs from the following list when deriving the shared secret: * ''P2TR'' * ''P2WPKH'' * ''P2SH-P2WPKH'' * ''P2PKH''
-
↩ a b Rule The input hash prevents a second payment from the same key from deriving the same outputs; it hashes the smallest outpoint and A.
Quoted source text (2)
If Alice were to use a different UTXO from the same public key ''A'' for a subsequent payment to Bob, she would end up deriving the same destinations ''P<sub>k</sub>''. To prevent this, Alice should include an input hash
Let ''input_hash = hash<sub>BIP0352/Inputs</sub>(outpoint<sub>L</sub> || A)'', where ''outpoint<sub>L</sub>'' is the smallest ''outpoint'' lexicographically used in the transaction
-
↩ a b c Rule The receiver reads the key from the last witness item for P2WPKH and P2SH-P2WPKH, from the scriptSig for P2PKH, and from the scriptPubKey (output key) for P2TR, including script-path spends.
BIP 352 L254 BIP 352 L265 BIP 352 L275 BIP 352 L283
Quoted source text (4)
Same as a keypath spend, the receiver obtains the public key from the ''scriptPubKey'' (i.e. the taproot output key)
the receiver obtains the public key as the last witness item.
the receiver obtains the public key as the last witness item.
The receiver obtains the public key from the ''scriptSig''.
-
↩ a b Author’s rationale Inputs with conditional branches or multiple keys are excluded because a malicious participant in a collaborative transaction could re-sign with different keys.
Quoted source text (1)
Inputs with conditional branches or multiple public keys (e.g. ''CHECKMULTISIG'') are excluded from shared secret derivation as this introduces malleability and would allow a sender to re-sign with a different set of public keys after the silent payment output has been derived. This is not a concern when the sender controls all of the inputs, but is an issue for CoinJoins and other collaborative protocols, where a malicious participant can participate in deriving the silent payment address with one set of keys and then re-broadcast the transaction with signatures for a different set of public keys.
-
↩ a b Rule Coin selection MUST include at least one eligible input.
Quoted source text (1)
* At least one input MUST be from the ''[[#inputs-for-shared-secret-derivation|Inputs For Shared Secret Derivation]]'' list
-
↩ Test vector Read by the model, the vectors with a malleated P2PKH scriptSig, uncompressed keys, a non-P2WPKH P2SH input and a NUMS script-path spend each have inputs that are skipped or parsed as the BIP requires, while the shared secret still matches.
Quoted source text (1)
Wallets should include inputs not in the ''[[#inputs-for-shared-secret-derivation|Inputs For Shared Secret Derivation]]'' list when testing to ensure that only inputs from the list are being used for shared secret derivation.
-
↩ a b Rule Only x-only and compressed public keys are permitted.
Quoted source text (1)
For all of the output types listed, only X-only and compressed public keys are permitted
-
↩ a b c Rule Script-path spends whose internal key is the NUMS point H are skipped.
Quoted source text (2)
The one exception is script path spends that use NUMS point ''H'' as their internal key
in which case the input will be skipped for the purposes of shared secret derivation
-
↩ Rule In coin selection the sender excludes inputs with SegWit version > 1.
Quoted source text (1)
* Exclude inputs with SegWit version > 1
-
↩ Rule For a taproot input, including a script-path spend, the sender MUST use the private key of the taproot output key; if it is not available the output cannot be an input, unless H is the internal key.
Quoted source text (2)
Same as a keypath spend, the sender MUST use the private key corresponding to the taproot output key. If this key is not available, the output cannot be included as an input to the transaction.
* For each taproot output spent the sending wallet MUST have access to the private key corresponding to the taproot output key, unless ''H'' is used as the internal public key
-
↩ Rule The sender negates a taproot private key whose point has odd y, because the receiver assumes even y when summing x-only keys.
Quoted source text (2)
check that the private key produces a point with an even Y coordinate and negate the private key if not
since the receiver will assume the even Y coordinate when summing the taproot X-only public keys.
-
↩ Rule The receiver MUST parse a P2PKH scriptSig for the key even when it does not match the template, to address third-party malleability.
Quoted source text (1)
The receiver MUST parse the ''scriptSig'' for the public key, even if the ''scriptSig'' does not match the template specified (e.g. <code><dummy> OP_DROP <Signature> <Public Key></code>). This is to address the [https://en.bitcoin.it/wiki/Transaction_malleability third-party malleability of ''P2PKH'' ''scriptSigs''].
-
↩ Rule The sender should sign with DEFAULT, ALL, SINGLE or NONE; ANYONECANPAY is unsafe.
Quoted source text (1)
The sender should sign with one of the sighash flags ''DEFAULT'', ''ALL'', ''SINGLE'', ''NONE'' (''ANYONECANPAY'' is unsafe).
-
↩ Author’s rationale The design keeps CoinJoins and MuSig/FROST inputs in mind, but recommends that all inputs belong to one entity because there is no formal proof of security in a collaborative setting.
Quoted source text (1)
The design keeps collaborative transactions such as CoinJoins and inputs with MuSig and FROST keys in mind, but it is recommended that the keys of all inputs of a transaction belong to the same entity as there is no formal proof that the protocol is secure in a collaborative setting.
-
↩ Rule Each output is derived independently, so regular backups are recommended and recovery requires scanning; a seed-only restore scans from the wallet birthday.
Quoted source text (2)
Since each silent payment output address is derived independently, regular backups are recommended. When recovering from a backup, the wallet will need to scan since the last backup to detect new payments.
can recover the full wallet history by scanning the blockchain starting from the wallet birthday.
-
↩ History BIP 352 (josibake, Ruben Somsen, Sebastian Falbesoner) is a Specification BIP assigned in 2023 and recorded as Complete; this snapshot is version 1.1.1.
Quoted source text (2)
Title: Silent Payments Authors: josibake <josibake@protonmail.com> Ruben Somsen <rsomsen@gmail.com> Sebastian Falbesoner <sebastian.falbesoner@gmail.com> Status: Complete Type: Specification Assigned: 2023-03-09
Version: 1.1.1