Bech32m BIP: new checksum, and usage for segwit address [combined summary]



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

Published on: 2021-01-20T00:29:36+00:00


Summary:

In an email exchange, nakagat and Pieter discussed the differences between "checksum = hash (hrp, data)" and the BCH-based checksum used in Bech32. Pieter explained that while they have error-detection properties, the Bech32 checksum is better at detecting certain subsets of errors. He clarified that the goal of Bech32/Bech32m is not to have error detection properties equivalent to a hash.Nakagat proposed creating BECH32M_CONST from hrp and data instead of constants to maintain the same error position as Bech32. Pieter explained that the polymod function as a checksum detects some kinds of errors better than others, and non-uniformity is needed in this case.Pieter Wuille updated several reference implementations to support Bech32m and made updates to the BIP draft. He also opened a pull request on Bitcoin Core and added links for more reference implementations. Nakagawa implemented Bech32m in Go and asked if the Checksum had to be fixed, to which Pieter provided three possible interpretations.Pieter Wuille proposed changes to the checksum in native segwit addresses for v1 and higher in a BIP draft. He introduced Bech32m as a tweaked variant of Bech32 and replaced the corresponding section in BIP173. The proposal prescribes using Bech32 for v0 witness addresses and Bech32m for other versions.The BIP draft for changing the checksum in native segwit addresses for v1 and higher was created following discussions on the Bitcoin-Dev mailing list. Pieter invited comments, suggestions, and ideas on the proposal and provided a link to the Github repository containing the BIP draft.


Updated on: 2023-08-02T02:59:37.533012+00:00