delvingbitcoin

Combined summary - Satoshi Style Message Signing

Combined summary - Satoshi Style Message Signing

The correspondence highlights a significant gap in the formal documentation surrounding the process of message signing in Bitcoin, particularly regarding a method that predates the Bitcoin Improvement Proposal (BIP) process.

This method, informally known as the "Satoshi format" for message signing, lacks comprehensive documentation, leading to confusion and the reliance on code as the primary source of specification. The creation of the message signing feature and its encoding, attributed to the sender rather than Satoshi Nakamoto, involves a detailed procedure that includes serializing the message with a specific prefix, hashing this serialization through a double SHA256 hash function, and constructing an ECDSA signature from the resulting hash. This signature is then encoded into a "recoverable signature" format to facilitate the verification process by enabling the recovery of the public key from the signature itself.

Despite the widespread implementation of this technique across various hardware and software projects, including Ledger, Trezor, Coldcard, Sparrow, and some multisig companies, due to its utility in verifying the integrity of hardware managing private keys, clear and accessible documentation remains elusive. The Bitcoin Core's implementation, specifically within src/util/message.cpp, serves as a reference for many, alongside a page on the Bitcoin Wiki which, while comprehensive, does not effectively highlight certain critical technical details such as the "magic bytes" used for message signing and the specifics of the double hashing technique.

Further complicating the landscape is the existence of work addressing message signing for other address types through BIPs like BIP-137, BIP-notatether-messageverify, and BIP-322. However, a unified and clear documentation source for the "Satoshi format" remains absent, despite the apparent knowledge and application of this method within the community, as evidenced by tools such as the Bitcoin Message Tool and Checkmsg.org by CoinKite. This scenario underscores a broader issue within the realm of cryptocurrency technologies, where advancements and practices sometimes outpace the development of formalized documentation, leading to challenges in disseminating knowledge and ensuring broad understanding across the community.

Discussion History

0
satsieOriginal Post
May 4, 2024 02:57 UTC
1
May 4, 2024 04:50 UTC
2
May 4, 2024 07:45 UTC
3
May 4, 2024 11:53 UTC