Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sharing of txstatedb.json - can be signed and validated without bitcoind #6

Merged
merged 12 commits into from
Jan 23, 2014
Merged

Allow sharing of txstatedb.json - can be signed and validated without bitcoind #6

merged 12 commits into from
Jan 23, 2014

Conversation

ryanxcharles
Copy link

One person will need to use bitcoind to build the txstatedb.json using everyone's public key, but then once the transaction has been proposed, the txstatedb.json file can be shared amongst the signing parties, and they can sign the file without needing to connect to bitcoind. The txstatedb.json file contains the input transactions to make this possible. Basic validation can be performed on the transaction to make sure they are signing what they think they are signing. However, further validation should be included. The signer should be able to verify:

  • That they have the private key for one of the public keys (finished)
  • That the the redeem script is the one that matches nreq and the public keys (finished)
  • That the transaction matches the inputs, outputs, and redeem script (unfinished)
  • What the miner fees are (unfinished)
  • Whether the outputs have been previously spent (unfinished)
  • Whether the transaction has been fully signed and can be broadcast (unfinished)

A few other important features should be added:

  • The ability to type the password in a hidden input box
  • Non-mysterious error messages
  • Many, many more tests

More advanced features that should be added later:

  • Ability to send a certain amount, and the inputs will be automatically retrieved

Note that this pull request builds on my previous pull request, but develops a very different feature (ability to sign and verify the txstatedb.json without being connected to bitcoind) and that's why it has a new pull request.

@jgarzik
Copy link

jgarzik commented Jan 22, 2014

ACK (note comments on dependent pull req, before clicking merge...)

Ryan X. Charles added 12 commits January 22, 2014 20:27
...necessary for being able to sign p2sh multisig transactions
the public keys and nreq ought to be able to reproduce the redeem script.  when
people starting passing file around, they need to be able to validate that the
public keys can correctly reproduce the redeem script.
...if the user has used the inputtxs.get command, they can sign messages
without needing to connect to bitcoind to get the input transactions.
...just like the other command groups, like raw.*
When collaborating to build a multisig address, the user will want to be
absolutely certain that the p2sh address is correct, because they don't want to
accidentally send bitcoins into obvlivion.  Each user will want to be confident
that their public key is in the redeem script. This is part of that check. The
user can see that their public key is in the list, and this check is making
sure that the redeem script actually contains that public key. Another check
that I will implement shortly is that the user will want to be confident that
they actually have the privatate key corresponding to their public key.
It will be imortant for users to be able to confirm that they actually have the
private key corresponding to a public key in the p2sh redeem script. That is
what this commit does. Users can show a list of pubkeys in the db, and show
which pubkeys they have the privkey for. Checks are run both to make sure the
corresponding pubkey is in the user's wallet, AND that the corresponding
private key can actually rederive the public key correctly.
...other similar commands use the word "validate", so we should use that to be
consistent.
ryanxcharles pushed a commit that referenced this pull request Jan 23, 2014
Allow sharing of txstatedb.json - can be signed and validated without bitcoind
@ryanxcharles ryanxcharles merged commit b603057 into bitpay:master Jan 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants