{"type":"rich","version":"1.0","author_name":"npub1e7vdq905zr4xjr5nxuz58l9jcvffxq728ysl6m2xxgr024mjy5vq4fg307","author_url":"https://nostr.ae/npub1e7vdq905zr4xjr5nxuz58l9jcvffxq728ysl6m2xxgr024mjy5vq4fg307","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 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)."}
