BIP proposal: Pay-to-contract tweak fields for PSBT (bip-psbt-p2c) [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2022-04-01T08:32:36+00:00


Summary:

Dr. Maxim Orlovsky has proposed a new standard called BIP (Bitcoin Improvement Proposal) that aims to add pay-to-contract key tweaking data fields to PSBTs (Partially Signed Bitcoin Transactions). This proposal is an extension of the existing PSBT standard suggested by Andrew Poelstra in March 2019. The BIP proposal introduces a commitment called P2C, which creates a cryptographic commitment to some message using elliptic curve properties.The main objective of this proposal is to provide a universal method for spending previous outputs containing P2C tweaks. These tweaks are used to create a cryptographic commitment to a specific message. In order to spend an output containing a P2C commitment, the same commitment must be added to the corresponding private key. The proposal includes a new per-input type, PSBT_IN_P2C_TWEAK, which contains the compact public key serialization and a value that is added to the private key to produce valid signatures.This new field provides sufficient information for creating valid signatures for spending outputs containing tweaked public keys such as bare scripts, P2PK, P2PKH, P2SH, witness v0 P2WPKH and P2WSH, nested witness v0 P2WPKH-P2SH and P2WSH-P2SH, and witness v1 P2TR outputs. The proposal is compatible with existing consensus rules and does not require any modifications.It is important to note that this proposal only focuses on spending transaction outputs containing P2C tweaks and does not address the construction of new P2C commitments or transactions containing them in their outputs. The scope of the proposal is limited to the question of spending an output that previously contained a P2C commitment, without creating a new commitment or risking extra-blockchain value loss.External signers who may not have any information about the P2C commitment can use this proposal to produce valid signatures. However, it is worth mentioning that possible future witness versions, including witness v1 non-taproot outputs, may not be supported by this BIP and may require the addition of new fields to the PSBT inputs.In summary, Dr. Maxim Orlovsky's proposal aims to extend the PSBT standard by adding new fields for pay-to-contract key tweaking data. The proposal provides a universal method for spending previous outputs containing P2C tweaks and is compatible with existing consensus rules. It introduces a new per-input type, PSBT_IN_P2C_TWEAK, which contains the necessary information for creating valid signatures. However, it does not address the construction of new P2C commitments or transactions containing them in their outputs.


Updated on: 2023-08-02T05:23:35.482429+00:00