Ability to sign transactions offline #271

issue davout opened this issue on May 26, 2011
  1. davout commented at 8:38 AM on May 26, 2011: none

    That would be a much needed feature for computers that will serve as safe for important amounts and are not to be connected to the internet at anytime.

    The blockchain could be updated from time to time using removable media and rescanned using existing functionality.

    So the client would need to create a transaction, sign it, serialize it and output it. It would also be necessary that the client is able to deserialize a transaction and broadcast it.

  2. nanotube commented at 11:09 PM on June 6, 2011: none

    Great idea - I was just thinking the same thing. This would be a very important feature allowing one to safeguard a high-value savings wallet.

  3. nanotube commented at 5:25 AM on June 14, 2011: none

    just some more clarifying comments.

    tx import/export is a useful feature, /in addition/ to address import/export. it allows one to keep 100% airgap on a savings wallet, by creating and exporting the transaction, then transferring just the tx data via usb key (or even a re-typing) over to an online computer.

    it is not possible to do the same with key import/export. not least because you have to get a list of coins available by key, which the client doesn't really tell you. if you, e.g., need to send out 10 coins, you need to know which of your keys has that many coins, but not too much more than that, to export and bring that over to an online wallet. that, for one, is not easy to do with current client, and for two, you're (potentially) compromising your actual private key.

    in contrast, with tx import/export, the only data that sees the broad internet, is just a signed transaction message, which is public info.

  4. sgornick commented at 6:13 AM on June 14, 2011: none

    This will likely become a priority item.

  5. ripper234 commented at 6:35 AM on June 14, 2011: none

    +1

  6. interfect commented at 6:59 AM on June 14, 2011: none

    +2

  7. davout commented at 8:08 AM on June 14, 2011: none

    @nanotube if i get you correctly, it's hardly possible for an offline client to just create a tx from thin air without knowing which outs it's allowed to pick-up since it's not always perfectly up to date with the blockchain ?

    I don't really get how the key import/export could be potentially dangerous in itself ? Maybe we could have an option that exports only public keys/only private keys/both.

    I guess the big picture of the general use cases for such a features needs a little more thought.

  8. nanotube commented at 12:03 PM on June 14, 2011: none

    @davout: obviously, you'll have to periodically insert the latest blockchain snapshot, and run -rescan. once you do that, it is perfectly fine to create transactions.

    danger of key import export: well, where are you exporting them /to/? obviously, to take them somewhere with an internet connection. thus opening them up to compromise which you were trying to protect against via the airgap. re: public/private: in order to create outgoing transactions, you need to export the private key (to sign the transaction). exporting public keys for this purpose is useless. so you would necessarily be exposing one of your private keys, if you were attempting to do this via key import/export, rather than transaction import/export.

    To me, the use case are quite clear and unambiguous. :)

  9. davout commented at 8:53 PM on June 15, 2011: none

    @nanotube take the example of bitcoin-central, one thing that would be great would be that the internet accessible client can generate addresses at will, only have knowledge of the pubkeys so it can track incoming transfers, and have an offline client which also has the private keys in order to be able to sign transactions.

    This would require a two way interaction :

    • When the internet client runs low on addresses you can feed it a bunch of public keys generated on the private client
    • Manually feed the blockchain to the private client

    So at any time the public client has a pool of 10 to 100k public keys for which the private client knows the private keys, and whenever you want to sign transactions you feed some blocks to the private client, create a tx, and feed it to the public client for broadcast. Hopefully I'm clear and making sense :)

    I think that would be an awesome level of security.

  10. nanotube commented at 3:50 PM on June 16, 2011: none

    @davout: The idea of having a wallet with 'only public keys', and thereby being able to monitor your balance while keeping your private keys secure, is a great idea :) but it is a /separate/ idea (and i think it deserves its own github issue).

    the ability to import/export transactions would be useful independent of this 'public wallet' functionality. the 'public wallet' functionality would also be useful (but somewhat less so) without the tx import/export functionality.

  11. CAFxX commented at 10:07 AM on June 23, 2011: none

    +1

  12. bbot commented at 4:10 AM on June 25, 2011: none

    +1

  13. vragnaroda commented at 4:43 AM on June 25, 2011: none

    This is a great idea. +1

  14. gmaxwell commented at 4:13 PM on June 28, 2011: contributor

    Er, hey. It's not desirable to have the blockchain on the airgapped wallet— god forbid someone figure out how to trigger a bug in its blockchain parsing. ... More importantly your airgapped wallet might be a dumb smart card.

    Instead the normal client should maintain your balances, create the transaction... but when it goes to sign it it will find out it doesn't have the private key. So it creates a signing request, which you shuttle over to the secure wallet (somehow). The secure wallet asks you to approve the transactions— showing you the outputs and values (perhaps supporting batches), then signs them all, and you shuttle them back over to the main client for injection into the network.

    Also— I described how to solve the running out of addresses problem here: http://forum.bitcoin.org/index.php?topic=19137.0 (the type-2 proposal)

  15. nanotube commented at 4:36 PM on June 28, 2011: none

    @gmaxwell: ok, and once they figure out how to trigger a bug in blockchain parsing... what are they going to do? the wallet is airgapped! even if they manage to create a bunch of txns to try to spend the coins, they won't go out to the network. so with a wiping of the wallet and a restoration of a backup, all your coins are still gonna be there safe and sound.

    but yes, as another complementary feature, running a public-keys-only mode has been suggested above. the tx import/export functionality, together with the public-keys-only wallet functionality, would bring us some good offline wallet capability. that said, tx import/export will be useful even without it.

  16. gmaxwell commented at 4:44 PM on June 28, 2011: contributor

    Step 1. Trojan on user's computer. (duh, this is what we're fighting against so its a given). Step 2. Create corrupted block data for airgap computer sync. Step 3. Airgap computer compromised, copies private key data into the signature fields instead of signing. Step 4. User dutifully carries data back to the computer where the trojan then runs off with the keys.

    Far out? A bit— but it's reduced to nothing not giving the airgap computer more non-trivial data than is required, which is just sound practice. The block chain is a complicated data-structure which has has triggered vulnerabilities before. I think of it this way: If someone did pull off this attack, would many people say (in retrospect) that it was obvious and your fault for not avoiding it? I think so. :)

    Also, lfm pointed out to me that you need to know the input transactions too— otherwise you might be sending lots of money away in fees if your system was compromised. But they can simply be packed up with the data to be signed. The secure wallet only needs to parse them for their output values an verify their hashes.

  17. nanotube commented at 5:09 PM on June 28, 2011: none

    @gmaxwell: aah, very nice - copying private keys into signature fields is nice and sneaky - and since a user cannot easily check by inspection whether it is a signature or private key data, since they both look like gibberish to the eye... bam, you're hosed. ok, i buy that.

    re: needing to know txins: yea they just need to be included with the data.

    still, getting tx import/export i think is a good first step. :)

  18. sgornick commented at 5:59 AM on April 24, 2012: none

    Related:

    BIP 10 describes a standard that guarantees interoperability of all programs that implement transactions that are broadcast:

  19. jgarzik commented at 9:31 PM on July 5, 2012: contributor

    raw TX RPC API covers this.

  20. jgarzik closed this on Jul 5, 2012

  21. dexX7 referenced this in commit 659be0627f on Jan 24, 2015
  22. sipa referenced this in commit 0350c7e4b8 on Jul 28, 2015
  23. sipa referenced this in commit 7863d105ea on Aug 4, 2015
  24. sipa referenced this in commit 780d5b3c7b on Aug 23, 2015
  25. TheBlueMatt referenced this in commit a671356e1f on Oct 20, 2015
  26. sipa referenced this in commit 9177950c74 on Oct 21, 2015
  27. sipa referenced this in commit f4787d1caf on Oct 21, 2015
  28. sipa referenced this in commit 6557a8cd46 on Oct 26, 2015
  29. sipa referenced this in commit ea06490d14 on Oct 27, 2015
  30. sipa referenced this in commit 003bb87153 on Nov 5, 2015
  31. sipa referenced this in commit bfd83199c3 on Nov 11, 2015
  32. sipa referenced this in commit b437ea7ec9 on Nov 12, 2015
  33. sipa referenced this in commit 1d84107924 on Nov 12, 2015
  34. rebroad referenced this in commit 40ead34fbe on Dec 7, 2016
  35. CodeShark referenced this in commit fb3fd0cf56 on Jan 18, 2017
  36. deadalnix referenced this in commit bdf0e0c268 on Jan 19, 2017
  37. classesjack referenced this in commit af970360dc on Jan 2, 2018
  38. nining referenced this in commit b64576ab51 on Jan 3, 2018
  39. bhattnaval commented at 4:38 AM on August 18, 2018: none

    We are working on this concept https://www.tsstoken.com/ but its more suitable for the big investors.

  40. fanquake locked this on Aug 18, 2018

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me