NebulousLabs/Sia — pull request #150 by lukechampine (2014-06-21 03:29:58+00:00)
Title: Script-based signature verification

This change implements `op_verify` and adds it to the default wallet script. The default script will now verify a signature before transferring control to the input. This essentially allows only the wallet creator to run arbitrary code on the wallet. The signature can be on any message, as long as both are transferred as one `SignedMessage` object. Currently, the bootstrap process uses a random slice of 8 bytes as its message.

As seen in the default script, the process for verifying a signature is still a bit clunky. It requires the script to append the public key to the script body and move the data pointer backwards to the beginning of the key before reading it. I'm exploring ways to make this less painful for script writers.