R-Puzzles
An R-Puzzle is a new type of script that allows for the spending party to sign the input UTXO using any valid Bitcoin keypair. This can be used to sign Metanet node addresses or addresses that hold tokens, or be randomly generated. The R-puzzle itself uses a knowledge proof of a value called 'k' to allow the coins to be spent. 'k' must be known to the spender, and k-chains can be managed using the same deterministic techniques as Bitcoin keychains.
Generating an ECDSA signature involves a few steps.
Inputs to the signature:
- k value 'k'
- keypair 'P1' = 'S1' · G
- Message 'm'
Method:
- Calculate R = k · G
- Define r = x-coordinate of R
- Calculate s = k-1(H(m) + S1 * r)mod n
Signature is (r, s) plus 6 bytes of formatting