Why is deriving public key from the signature not used in Segwit? [combined summary]



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

Published on: 2018-01-24T12:03:55+00:00


Summary:

In a conversation on January 24, 2018, Gregory Maxwell and Aymeric Vitte discussed the absence of a pubkey in a specific transaction on blockchain.info. Vitte had provided a link to the transaction's scriptsig, which lacked any pubkey. Maxwell explained that the pubkey is actually present in the scriptPubKey of vout 0 of another transaction that is being spent by the current transaction.Vitte then asked about the presence of pubkeys in standard p2pkh transactions, noting that this was not the case previously. However, there was no response to his question regarding the reason behind this change and when it was implemented. Maxwell responded by stating that such behavior never existed and suggested that Vitte might be mistaken.In another email discussion, a member of the bitcoin-dev mailing list questioned why public keys are still included in SegWit witnesses, even though they can be derived from signatures. Another member responded that leaving out public keys would slow down verification, be incompatible with batch validation, not save space if hashing isn't used, and could potentially be patent-encumbered. However, it was pointed out that public keys are now included in standard P2PKH transactions as well, whereas previously they were not. The original questioner asked for more information about what motivated this change and when it occurred.Артём Литвинович also questioned the rationale behind having both public keys and signatures in SegWit witness. They suggested that leaving out the public key would have saved 33 bytes per signature, as the public key can be derived from the signature and a quadrant byte. However, it was noted that this method is slow to verify and incompatible with batch validation. Additionally, it doesn't save space if hashing isn't used and could potentially be patent-encumbered.Overall, it appears that there are valid security, performance, and patent-related reasons for including both public keys and signatures in SegWit witness, although the specific rationale behind this decision is not explicitly stated in the provided context.


Updated on: 2023-08-01T22:33:29.469748+00:00