Bitcoin Forum
May 07, 2024, 07:02:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Decrypting a wallet  (Read 941 times)
djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 16, 2012, 08: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?
1715108527
Hero Member
*
Offline Offline

Posts: 1715108527

View Profile Personal Message (Offline)

Ignore
1715108527
Reply with quote  #2

1715108527
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715108527
Hero Member
*
Offline Offline

Posts: 1715108527

View Profile Personal Message (Offline)

Ignore
1715108527
Reply with quote  #2

1715108527
Report to moderator
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 16, 2012, 09: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)?

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 16, 2012, 09: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
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 16, 2012, 09: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

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 16, 2012, 10: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?
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 16, 2012, 11: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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 16, 2012, 11: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?
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 17, 2012, 12:26:14 AM
 #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.


Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 17, 2012, 01:03:19 AM
 #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)
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
May 17, 2012, 03:54:00 AM
 #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.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


djp3 (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0



View Profile
May 17, 2012, 08: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!