0

I have a few questions on BIP 174: XPUBs: I am looking at BIP174, and I see that I can define a global XPub. How is this used. How does an updater, signer, or finalizer know what this XPub is for? Doesn't this expose some privacy?

Public Keys: For outputs, do I have to enter the public keys? Is there no option to enter an address instead?

Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this?

1

How does an updater, signer, or finalizer know what this XPub is for?

It's not just an xpub. It's an xpub with key origin information. The fingerprint of the master public key and the derivation path to that xpub is provided. This means that a prefix match can be done with the derivation paths given in the input and output maps to find which xpub can be used to derive a particular pubkey.

Doesn't this expose some privacy?

Yes.

For outputs, do I have to enter the public keys?

No. You don't have to provide any information for the output maps.

Is there no option to enter an address instead?

No. Addresses are not useful in PSBTs.

The output fields do not specify the outputs themselves. That is done in the global transaction. Addresses only serve to specify the scriptPubKey to use in an output. The global unsigned transaction already has the output specified with their scriptPubKeys. So providing an address is not useful as it is just duplicate information.

Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this?

The txid and vout are already provided by the Global unsigned transaction. Both the Non-witness UTXO and witness UTXO are needed in the inputs in order to sign the transaction. The signing algorithm requires knowing the scriptPubKey for the output being spent, and for segwit, the amount too. The full previous transaction needs to be provided to prevent attacks where users are signing for an output that they don't intend to spend. By providing the full transaction, signers can verify that the txid they compute for it matches the txid that is specified in the global unsigned transaction.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.