Trying all address types in message signing verification (BIP)



Summary:

Ali Sherief is considering creating a Bitcoin Improvement Proposal (BIP) to address the lack of standardization for Segwit message signatures. Currently, wallets that support signing and verifying a bitcoin message can only sign legacy addresses. Although it is technically possible to sign and verify segwit addresses, there is no generally-accepted standard for signing segwit messages. The proposal aims to standardize the practice of placing the segwit address into the address field and does not require alterations to the message signing format like other BIPs. In the verification part, P2PKH (legacy address), P2WPKH-P2SH (nested segwit), and P2WPKH with version from 0 to MAX_WITNESS_VERSION will be tried in sequence to reconstruct the address in the signed message. In the signing procedure, the only modification is the insertion of the segwit address in place of the legacy address in the signed message. If approved, this BIP does not require any changes to existing signed messages, and the original sign/verify algorithms will continue to interoperate with this improved sign/verify algorithm, without any action necessary from the developers. The proposal does not replace, supersede, or obsolete BIPs 173 or 322. Ali Sherief believes that a "defacto" BIP is needed and useful to do, and then Core should be updated to support it as well. There is no need for any auxiliary feature additions into this BIP, and the original approach was directly from Satoshi himself when the original client was written. It has never been codified in a BIP as far as he knows. A related issue is the "ascii armor" that is sometimes used, but newline-treatment isn't defined well enough for good interoperability, in his personal experience.


Updated on: 2023-06-15T23:01:04.253407+00:00