delvingbitcoin
BIP352: PSBT support
Posted on: June 20, 2024 09:21 UTC
In the exploration of secure transaction protocols for silent payments, the discussion focuses on how signers who are aware of silent payments should handle ACP
(AnyOneCanPay) flags and the generation and validation of PSBT_OUT_SCRIPT
for silent payment outputs.
The process is described through various scenarios involving two hypothetical signers, $A$ and $B$, illustrating different combinations of signing options (NONE | ACP
, SINGLE | ACP
, ALL | ACP
) and their implications on transaction security and trust.
The initial scenario outlines a case where signer $A$ contributes to a transaction with an input, proof, and share, opting for the NONE | ACP
signature, while $B$ adds their own inputs, generates the necessary PSBT_OUT_SCRIPT
, and signs with ALL
. This illustrates the need for each silent payment-aware signer to independently verify the proofs, generate the expected output scripts from shared data, and ensure these match the commitments made by other signers before finalizing their signatures.
Further explored is the dynamic of trust between signers, especially highlighted in the ALL | ACP
scenario. Here, both parties exchange shares necessary for generating the correct output scripts. Signer $A$ takes on this task and commits via the ALL | ACP
signature. Signer $B$ then has the responsibility to verify the accuracy of these scripts before proceeding with their signature. The narrative underscores the critical principle that a signer should never use ACP
without full trust in their counterparts, given the potential risks involved in incorrect script generation or malicious intent.
An interesting technical suggestion emerges from the discussion regarding the optimization of data storage within the PSBT format. The proposal involves adding shares and proofs as global data rather than duplicating them for each input, potentially offering a more efficient way to manage transaction data depending on the number of inputs covered by the same proof. This raises considerations about the trade-offs in data size and complexity, suggesting that while this approach may offer benefits in certain scenarios, it might introduce challenges in others.
Overall, the conversation delves into the intricacies of implementing secure and efficient silent payment transactions, emphasizing the importance of trust, precision in script generation, and thoughtful consideration of data structure within the PSBT framework.