Bitcoin Forum
October 23, 2016, 12:07:08 PM *
News: Latest stable version of Bitcoin Core: 0.13.0  [Torrent].
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: [PATCH] remove private keys from wallet  (Read 1011 times)
Offline Offline

Activity: 73

View Profile
June 19, 2011, 03:49:12 PM

Disclaimer: I'm not very familiar with the bitcoin code or even C++ itself, so please correct me if I'm wrong and tell me what I missed Smiley

This adds a new RPC call "removeprivkey" which takes an address and removes the corresponding keys.
It's intended to be used after a key has been dumped (showwallet branch).

Currently, it removes the name and the key from the wallet and the private and public key from memory.

What it does NOT do is updating the coressponding account/transactions, so if you have spent transactions and you remove keys, you might get negative balances.
I'm not sure what to do about that, I tried to find and remove transactions, but couldn't figure out how. Rescan doesn't help either.
However, I think for some usecases (like my online-wallet) this won't even be a problem because a user never sees any balances until the keys are loaded.

Also, since this is obviously very dangerous, maybe there should be some safeguards like checking if the key has been dumped before, or at least a compile-time option.
Maybe even require the dumped key to be passed as input, for proof that the user has it?

Please look at the code and tell me what you think and if it might be worth a pull request.


Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!