Skip to content
ecdsa.com

BIP-137 (signed message format)

The Bitcoin message-signing format that uses a 65-byte recoverable ECDSA signature whose header byte encodes both the recovery id and the address type: 27–30 P2PKH uncompressed, 31–34 compressed, 35–38 P2SH-P2WPKH, 39–42 P2WPKH.
Also written asBIP-137BIP137Bitcoin signed messagesignmessage

The message is wrapped in the "Bitcoin Signed Message" prefix with length bytes, double-SHA-256 hashed and signed with secp256k1; the verifier recovers the public key from the signature, derives the address of the type indicated by the header and compares it with the claimed address. Signatures are exchanged as base64.

It descends from Bitcoin Core's signmessage, which only supports P2PKH, and the SegWit header ranges were never implemented consistently: some wallets, including Electrum and Trezor, used the P2PKH ranges for SegWit addresses. BIP-137 cannot express Taproot, multisig or script addresses at all, which is why BIP-322 replaces it. The Bitcoin message verifier accepts both formats.

Standards and references

All terms