BIP proposal - Signatures of Messages using Bitcoin Private Keys



Summary:

A proposed Bitcoin Improvement Proposal (BIP) has been written up by Christopher Gilliard regarding signature formats when using Bitcoin private keys. The proposal includes actual code that does verification, but lacks code for signing. ECDSA keys are used to do the signatures, so it is hard to not include anything about keys even though that's not the main topic. The "Background on ECDSA keys" section was mainly meant to give background about what kind of keys Bitcoin uses, for people who already know, they can easily skip this section. The reason for including this data in the header is the same that compressed/uncompressed is included in the header so that you know which type of key the signature is from and you don't have to try all options to see if any matches. This is why Trezor did that way and why it was documented. The proposal was written as suggested in a GitHub issue and is inline with the implementation that Trezor implemented in the above issue. Any feedback would be appreciated. The steps for getting a BIP number assigned or any other process steps required is yet to be determined. Aymeric Vitte asked for a more precise description of the signing/verification process since it is documented nowhere. The use of the speech regarding keys should focus on signatures which are summarized in a vague sentence inspired by the reference [2] with a not very logical link to the next paragraph. The header seems completely of no use especially when you extend to segwit/bech32 since you just have to check that related compressed key matches. Gilliard did not invent any of this, he is just documenting what people actually seem to do because he had to verify signatures as part of a project he's working on. He would have liked to have had this document when he started the project so he thought it might be useful to others since as far as he can tell this was not specified anywhere.


Updated on: 2023-06-13T17:06:29.467823+00:00