Author: Pieter Wuille 2021-01-19 17:57:08
Published on: 2021-01-19T17:57:08+00:00
In an email exchange, Nakagat proposed creating BECH32M_CONST from hrp and data instead of constants. This would produce the same error position as bech32 by recalculating the value created from hrp and data. The checksum for bech32 is checksum = polymod(expand(hrp) + data) xor 1; however, Bech32m changes that to checksum = polymod(expand(hrp) + data) xor 0x2bc830a3. In response, Pieter explained that hashing makes all types of errors uniform and doesn't matter what other things are added to the checksum. In this case, non-uniformity is needed, and the polymod function as a checksum detects some kinds of errors much better than others.
Updated on: 2023-05-21T00:30:56.059138+00:00