Key management #145

issue rkfg opened this issue on April 6, 2011
  1. rkfg commented at 7:43 AM on April 6, 2011: none

    For now the entire PKI in bitcoin is closed for users. I propose make it more clear at least for JSON-RPC. It will be possible to create bitcoin paycards and such. All is required is to convert private (and maybe public, too) keys to base64 encoding and printing them to stdout and also implement creating private key in wallet.dat by importing such base64-encoded value. I guess public key may be easily calculated from private so when you export private you have no need to export public.

    The purpose of this feature is to make possible creating deferred payments when you don't know (or don't want to know) whom to pay to. You give or leave the private key which has some amount of coins somewhere and recipient then withdraws money to his own wallet. With such functionality one can make a competition and the winner gets that key and receives money so you shouldn't worry about that. You send money to the new address, export its private key and place it to the page which is shown to the winner. And so on.

  2. sipa commented at 12:05 AM on April 7, 2011: member

    See the dumpprivkey and importprivkey rpc calls in this branch: https://github.com/sipa/bitcoin/tree/walletdump

    Disclaimer: not ready for production use :)

  3. rkfg commented at 5:34 AM on April 7, 2011: none

    Wow, glad you're working on it. Do you plan to release it for 0.3.21?

  4. rkfg closed this on Apr 7, 2011

  5. rkfg reopened this on Apr 10, 2011

  6. rkfg commented at 10:14 PM on April 10, 2011: none

    Well, I didn't want to close this issue, sorry. I have one idea to implement. Instead of importing private keys a transaction is created which sends money from supplied private key to any of user's address. That's how retrieving of bitcoin paycards may work. Party A generates a new address and sends money to it. Then it exports the private key, creates QR-code and prints it on pretty background. Then party A gives that piece of paper to party B. B makes a photo with its phone, webcam or any other device, recognizes QR-code and gets the private key. Then B executes the retrieval procedure (either via interface or via daemon) and fills in the form with two fields, the private key it got and the address it wants to receive money to. Bitcoin sends a regular transaction using this data, B gets the money and this private key become pretty unusable. I see no need to import the private key in the wallet, it's much safer to send all money from that address to yourself rather than just use it, because party A may get it back at any time. The shorter period between getting the key and retrieving the money the better.

    Of course, if there are use cases of importing your own keys into wallet it may be implemented but for now it's easier to just send money from one wallet to another.

  7. sipa commented at 8:29 AM on April 11, 2011: member

    What you're suggesting is partially implemented already, see http://www.bitcoin.org/smf/index.php?topic=4555.0 and http://bitcoin.modernjob.info/print.html

    What I'm working on now is a export/import function for entire wallets (or selected parts thereof). I can imagine some use cases: backups, shared wallets (though that's still asking murphy to visit you), debugging (quite useful to be able to see the contents of your wallet, and per-key available funds), recovery (exporting and importing a corrupt wallet file will often get you your funds back), ...

    Maybe later it can be combined with jgarzic's scratchoff patch to have a "send funds to new address, and export that" and a "send all available funds in imported file to own address" mode as well.

  8. alexwaters commented at 8:14 AM on September 30, 2011: contributor

    This issue has been flagged for inactivity, and will be closed in 15 days from this message if action is not taken.

    To prevent closure, kindly comment as to why the issue should remain open. If a time extension is needed to commit code, please respond to this comment or contact QA@BitcoinTesting.org.

  9. alexwaters commented at 5:53 AM on October 20, 2011: contributor

    Closed pending commits / additional commentary. The inactive label has been applied.

  10. alexwaters closed this on Oct 20, 2011

  11. sipa referenced this in commit ecae2acb06 on Dec 11, 2014
  12. glv2 referenced this in commit 0cf0117abd on Jan 17, 2015
  13. zathras-crypto referenced this in commit 9eae30e500 on Jul 26, 2015
  14. TheBlueMatt referenced this in commit 582b2934e6 on Oct 20, 2015
  15. ptschip referenced this in commit dc9ef1cdf2 on Nov 9, 2016
  16. rebroad referenced this in commit 4bf198f9ff on Dec 7, 2016
  17. deadalnix referenced this in commit 9000458677 on Jan 19, 2017
  18. cryptapus referenced this in commit 3597d7ff4d on Feb 20, 2019
  19. attilaaf referenced this in commit c535c01748 on Jan 13, 2020
  20. rajarshimaitra referenced this in commit b75a69e62e on Mar 23, 2021
  21. DrahtBot locked this on Sep 8, 2021

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-13 21:16 UTC

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