Karl Johan Alm [ARCHIVE] on Nostr: 📅 Original date posted:2018-03-14 📝 Original message:Hello, I am considering ...
📅 Original date posted:2018-03-14
📝 Original message:Hello,
I am considering writing a replacement for the message signing tools
that are currently broken for all but the legacy 1xx addresses. The
approach (suggested by Pieter Wuille) is to do a script based
approach. This does not seem to require a lot of effort for
implementing in Bitcoin Core*. Below is my proposal for this system:
A new structure SignatureProof is added, which is a simple scriptSig &
witnessProgram container that can be serialized. This is passed out
from/into the signer/verifier.
RPC commands:
sign <address> <message> [<prehashed>=false]
Generates a signature proof for <message> using the same method that
would be used to spend coins sent to <address>.**
verify <address> <message> <proof> [<prehashed>=false]
Deserializes and executes the proof using a custom signature checker
whose sighash is derived from <message>. Returns true if the check
succeeds, and false otherwise. The scriptPubKey is derived directly
from <address>.**
Feedback welcome.
-Kalle.
(*) Looks like you can simply use VerifyScript with a new signature
checker class. (h/t Nicolas Dorier)
(**) If <prehashed> is true, <message> is the sighash, otherwise
sighash=sha256d(message).
Published at
2023-06-07 18:11:12Event JSON
{
"id": "e5d1f6f4b41513103c043311381f3466c8626d6817e10809f382f72ea2d9e1fe",
"pubkey": "cf98d015f410ea690e93370543fcb2c3129303ca3921fd6d463206f557722518",
"created_at": 1686161472,
"kind": 1,
"tags": [
[
"e",
"fde6d8b8cd384fa838810364bd9a6edd18aea9246ae8127a644187087642ae18",
"",
"reply"
],
[
"p",
"a23dbf6c6cc83e14cc3df4e56cc71845f611908084cfe620e83e40c06ccdd3d0"
]
],
"content": "📅 Original date posted:2018-03-14\n📝 Original message:Hello,\n\nI am considering writing a replacement for the message signing tools\nthat are currently broken for all but the legacy 1xx addresses. The\napproach (suggested by Pieter Wuille) is to do a script based\napproach. This does not seem to require a lot of effort for\nimplementing in Bitcoin Core*. Below is my proposal for this system:\n\nA new structure SignatureProof is added, which is a simple scriptSig \u0026\nwitnessProgram container that can be serialized. This is passed out\nfrom/into the signer/verifier.\n\nRPC commands:\n\nsign \u003caddress\u003e \u003cmessage\u003e [\u003cprehashed\u003e=false]\n\nGenerates a signature proof for \u003cmessage\u003e using the same method that\nwould be used to spend coins sent to \u003caddress\u003e.**\n\nverify \u003caddress\u003e \u003cmessage\u003e \u003cproof\u003e [\u003cprehashed\u003e=false]\n\nDeserializes and executes the proof using a custom signature checker\nwhose sighash is derived from \u003cmessage\u003e. Returns true if the check\nsucceeds, and false otherwise. The scriptPubKey is derived directly\nfrom \u003caddress\u003e.**\n\nFeedback welcome.\n\n-Kalle.\n\n(*) Looks like you can simply use VerifyScript with a new signature\nchecker class. (h/t Nicolas Dorier)\n(**) If \u003cprehashed\u003e is true, \u003cmessage\u003e is the sighash, otherwise\nsighash=sha256d(message).",
"sig": "7d808c7c686e3cbbeca50a2ce651e02e4e63c3ede05d8f65a5fb30a875d178e035e21a729a3544e96d8a02ef60480f42aa31073afa8c9e37d0a52cc41b5be14b"
}