Post
Topic
Board Development & Technical Discussion
Re: Post your SegWit questions here - open discussion - big week for Bitcoin!
by
TransaDox
on 21/12/2016, 16:42:47 UTC
That message cannot include the signature itself because the signature does not exist yet. Including the signature changes the message, thus changing the signature. Thus it is impossible for a signature to sign itself as doing so will inherently change the signature.
OK. Lets consider a trivial example/case.....

Let our message be a terse one of:
  
Code:
{
  Sig:
  Text:
 }
Where "Text" is expected to be an ASCII string and "Sig" is expected to be an MD5 hash of the message represented in hex.

1: We create a message
Code:
{Sig: 00000000000000000000000000000000,Text:"A text Message"}

2. We now find the MD5 of the entire message which gives us C9D4C59A1FEBA4D1BFE1ECE1EE7269B0. (I've included the brackets and quotes just because of copy and paste)

3. We insert the code back into the message and send - yielding
Code:
{Sig: C9D4C59A1FEBA4D1BFE1ECE1EE7269B0,Text:"A text Message"}

To check the sig we simply replace the sig field with zeros as before, calculate the MD5, and check against the original value in the sig field.

This seems far from "impossible".