Skip to content

BIP 350

Bech32m format for v1+ witness addresses

Original title: Bech32m format for v1+ witness addresses

Status
Deployed
Type / Layer
Specification / Applications
Author
Pieter Wuille
Assigned
Status verified
Source
github.com/bitcoin/bips/blob/master/bip-0350.mediawiki

Summary

Fixes a weakness found in the bech32 checksum used for addresses. In BIP173's bech32, inserting or deleting any number of "q" characters immediately before a final "p" leaves the checksum valid. Existing version 0 addresses are unaffected in practice because their length is fixed by the specification, but for future witness versions whose length may vary, and for other uses that borrow bech32, it means a class of typos would go undetected. The change in bech32m is small: the constant used in the checksum computation becomes 0x2bc830a3 instead of 1, while the human-readable part, the character set and everything else stay identical to bech32. Which encoding applies is then decided by witness version — version 0 (P2WPKH and P2WSH) keeps bech32, while versions 1 and above use bech32m. Because the two do not validate against each other, older software also cannot mistake a newer address format for one it understands.

Why it matters

This is the encoding behind Taproot addresses beginning with "bc1p". Deciding the encoding by witness version closed the checksum weakness without forcing existing "bc1q" addresses to be regenerated.

Related BIPs

Related articles

This page carries a summary, not a translation. The original document is authoritative, and the metadata above — including Status — was transcribed from the bips repository on the verification date shown. Always consult the original when implementing or verifying.

Read the original on bitcoin/bips