<oembed><type>rich</type><version>1.0</version><author_name>npub1e7vdq905zr4xjr5nxuz58l9jcvffxq728ysl6m2xxgr024mjy5vq4fg307</author_name><author_url>https://nostr.ae/npub1e7vdq905zr4xjr5nxuz58l9jcvffxq728ysl6m2xxgr024mjy5vq4fg307</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-03-14&#xA;📝 Original message:Hello,&#xA;&#xA;I am considering writing a replacement for the message signing tools&#xA;that are currently broken for all but the legacy 1xx addresses. The&#xA;approach (suggested by Pieter Wuille) is to do a script based&#xA;approach. This does not seem to require a lot of effort for&#xA;implementing in Bitcoin Core*. Below is my proposal for this system:&#xA;&#xA;A new structure SignatureProof is added, which is a simple scriptSig &amp;&#xA;witnessProgram container that can be serialized. This is passed out&#xA;from/into the signer/verifier.&#xA;&#xA;RPC commands:&#xA;&#xA;sign &lt;address&gt; &lt;message&gt; [&lt;prehashed&gt;=false]&#xA;&#xA;Generates a signature proof for &lt;message&gt; using the same method that&#xA;would be used to spend coins sent to &lt;address&gt;.**&#xA;&#xA;verify &lt;address&gt; &lt;message&gt; &lt;proof&gt; [&lt;prehashed&gt;=false]&#xA;&#xA;Deserializes and executes the proof using a custom signature checker&#xA;whose sighash is derived from &lt;message&gt;. Returns true if the check&#xA;succeeds, and false otherwise. The scriptPubKey is derived directly&#xA;from &lt;address&gt;.**&#xA;&#xA;Feedback welcome.&#xA;&#xA;-Kalle.&#xA;&#xA;(*) Looks like you can simply use VerifyScript with a new signature&#xA;checker class. (h/t Nicolas Dorier)&#xA;(**) If &lt;prehashed&gt; is true, &lt;message&gt; is the sighash, otherwise&#xA;sighash=sha256d(message).</html></oembed>