Bech32 weakness and impact on bip-taproot addresses



Summary:

The bitcoin-dev mailing list discusses the potential need for non-32/20-byte Segwit outputs and the associated costs of adding another address format. Pieter Wuille proposes amending BIP173 to restrict witness programs to lengths of 20 or 32, but still allowing other versions besides 0. This would be sufficient for several years, until version numbers run out. He suggests developing a variant of bech32 with better insertion/erasure detecting properties for witness programs of different lengths, without needing a new address scheme or different HRP. Pieter believes improving bech32 itself is preferable over changing the way segwit addresses use bech32, as that can be done without making addresses even longer. The easiest solution is to change the constant 1 xor'ed into the checksum before encoding it to a 30-bit number.


Updated on: 2023-05-20T21:05:09.780620+00:00