News for hackers. Stuff that matters.
Re:Zero-Knowledge Contingent Payment by ryan-c on Sunday February 28, 2016 @10:34AM (#11191118)
Here's my attempt at explanatory comments - the ScriptPubkey is a program (written in Bitcoin Script) which is attached to an output of a Bitcoin transaction - parameters must be provided that make it return "true".

    # Compute the SHA256 of the value on the top of the stack (spender input),
    # then add the result to the top of the stack
    OP_SHA256
    # Check whether this value is equal to Y, the hash of the key under which
    # the solution was encrypted. 
    <Y> OP_EQUAL
    # If the correct key was provided, add the seller's public key to the stack
    OP_IF
      <Seller Pubkey>
    # Otherwise, if it has been 100 blocks or more, add the buyer's public key
    # to the stack so they may refund themselves if the seller does not complete
    # the protocol 
    OP_ELSE
      <block_height+100> OP_CHECKLOCKTIMEVERIFY OP_DROP
      <Buyer Pubkey>
    OP_ENDIF
    # Verify the signature against the public key on the top of the stack
    OP_CHECKSIG
Re:Zero-Knowledge Contingent Payment by jnbiche on Sunday February 28, 2016 @01:13PM (#11191713)
Good explanation. By way of background, I'll add that Bitcoin Script runs on a stack machine, similar to Forth (except Script is non-Turing complete).
Re:Zero-Knowledge Contingent Payment by bramblerose on Sunday February 28, 2016 @10:39AM (#11191131)
Thank you, that clarifies a lot.