Author

Topic: Decrypting a wallet (Read 958 times)

newbie
Activity: 11
Merit: 0
May 17, 2012, 03:02:22 PM
#11
Thanks Stephen for the help.
Everything I need is available from the RPC interface (short of decrypting a wallet).  I was just looking at the command-line options and missed the functions you pointed out.
legendary
Activity: 2506
Merit: 1010
May 16, 2012, 10:54:00 PM
#10
When it is encrypted it is all binary and not easily editable outside of the client.
But once it's encrypted I can't get the text version back again (by say "decrypting" it permanently)

I see.  There is not yet the feature to let you revert a wallet back to being unencrypted.

There is, however, an easy way to access the contents of the wallet using RPC.

Edit your bitcoin.conf  to put in rpcuser and rpcpassword entries.

 - https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_File

Run bitcoin as a server, e.g.,

$ ./bitcoin-qt -server

then

Open it for RPC

$ ./bitcoind walletpassphrase [passphrase] 1000

then you can

$ ./bitcoind dumpprivkey [bitcoin address]

or

$ ./bitcoind importprivkey [bitcoin address] [label]

 - http://en.bitcoin.it/wiki/Importprivkey


Does that help?

p.s., Editing wallet.dat with a text editor is a bad, bad idea.
newbie
Activity: 11
Merit: 0
May 16, 2012, 08:03:19 PM
#9
That's more sophisticated than what I was getting at.
When my wallet is unencrypted I can edit it with a text editor outside of the client.
When it is encrypted it is all binary and not easily editable outside of the client.
But once it's encrypted I can't get the text version back again (by say "decrypting" it permanently)
legendary
Activity: 2506
Merit: 1010
May 16, 2012, 07:26:14 PM
#8
So, I'm gathering from my surfing that it isn't easy to manipulate a wallet outside of the bitcoin client once it is encrypted.  And once it's encrypted it can't be easily decrypted.  Is this accurate as far as you know?

Well, the wallet itself isn't encrypted but the private keys needed for spending from the wallet are encrypted.  If you used a strong passphrase for that encryption, then your wallet.dat is useless to anyone except those who know your passphrase.  The client asks for this passphrase each time you either create a new address or make a spend transaction.

Of course, a compromised system could have a keylogger or other type of malware on it in which even a strong passphrase doesn't protect you.   So for amounts where greater security is warranted, there are things like "air-gapped" offline wallets (cold storage) and other approaches that can greatly help improve security.

newbie
Activity: 11
Merit: 0
May 16, 2012, 06:50:40 PM
#7
Thanks!  That makes sense.

So, I'm gathering from my surfing that it isn't easy to manipulate a wallet outside of the bitcoin client once it is encrypted.  And once it's encrypted it can't be easily decrypted.  Is this accurate as far as you know?
legendary
Activity: 2506
Merit: 1010
May 16, 2012, 06:22:25 PM
#6
Is the .099 BTC part of the transaction the "transaction fee" that goes to the miner who correctly hashed my transaction onto the chain?

Nope, there was no fee paid on that transaction (which explains why now several hours later it still has no confirmations).  It will eventually get included in a block, maybe another 24 hours though.

As far as what that 0.099 BTC is about, ... that is the change transaction that goes back to your wallet.   When you made the SatoshiDICE wager for 0.001 BTC, the "best" coin for that was your Deeptbit payout (1VayNert3x1KzbpzMGt2qdqrAThiRovi8) coin, which you received 0.1 BTC.  Because bitcoin transactions spend the entire INPUT, what it did was created two outputs.  One to SatoshiDICE for 0.001 BTC and one for 0.099 which is to a new address in your own wallet.

The Bitcoin client takes care of everything out of sight to handle this so users don't need to know what adresses are in the wallet.
newbie
Activity: 11
Merit: 0
May 16, 2012, 05:17:19 PM
#5
Thanks for looking that up. Smiley
I actually tried to do that earlier on blockchain, but figured I had done something wrong when it didn't show up.

Is the .099 BTC part of the transaction the "transaction fee" that goes to the miner who correctly hashed my transaction onto the chain?
legendary
Activity: 2506
Merit: 1010
May 16, 2012, 04:25:28 PM
#4
0a31c7472ca42c9e50db35d58fd0645440552c4769a992149bdcd3d401827016

[...]

I didn't know that the client retransmitted the transaction.

Looks like it just made it to the blockchain:
 - http://blockchain.info/tx-index/5921848/0a31c7472ca42c9e50db35d58fd0645440552c4769a992149bdcd3d401827016
newbie
Activity: 11
Merit: 0
May 16, 2012, 04:21:09 PM
#3
The transaction is in my wallet, but it hasn't been confirmed (24+ hours)
The transaction id is:
0a31c7472ca42c9e50db35d58fd0645440552c4769a992149bdcd3d401827016

I don't think it made it into the chain.

I didn't know that the client retransmitted the transaction.

It was a very small experimental transaction to SatoshiDice
legendary
Activity: 2506
Merit: 1010
May 16, 2012, 04:12:52 PM
#2
I have an unaccepted transaction in my wallet.
My wallet is encrypted.
Is there a way that I can resubmit the transaction or decrypt my wallet so that I can edit out the transaction?

Are you saying it is a spend transaction that should be valid but that it hasn't been included in a block yet (such as the fee not being high enough)?   Or are you saying it could be a double spend (e.g., what could happen when using multiple copies of the same wallet.dat) and thus the transaction will never confirm and is a cosmetic nuisance/

If the former, does the transaction appear in the blockchain, even as unconfirmed?
 - http://www.blockchain.com

If not, have you given the client time to rebroadcast the transaction?  (i..e, leave it running for an hour or so)?
newbie
Activity: 11
Merit: 0
May 16, 2012, 03:25:19 PM
#1
I have an unaccepted transaction in my wallet.
My wallet is encrypted.
Is there a way that I can resubmit the transaction or decrypt my wallet so that I can edit out the transaction?
Jump to: