Bitcoin Forum
May 04, 2024, 03:11:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: getnewaddress encrypts priv-key?  (Read 976 times)
jonathan (OP)
Member
**
Offline Offline

Activity: 84
Merit: 14


View Profile
February 27, 2013, 08:28:51 AM
 #1

I am running bitcoind in linux. I have encrypted the wallet using 'walletpassphrase'. I then ran 'getnewaddress'. This generated a new keypair, and showed me the new address (call it '1address') in bash.

But getnewaddress never asked me for my wallet's encryption key though.

I then run 'dumpprivkey 1address'. And bash tells me it can't recover the priv-key.

Now, i decrypt the wallet using 'walletpassphrase'. I try 'dumpprivkey 1addressblahblah...' again and the priv-key comes up in bash.

My question is, How come the client knew the encryption key in such a way as to automatically encrypt the newly generated keypair's priv-key?
1714835487
Hero Member
*
Offline Offline

Posts: 1714835487

View Profile Personal Message (Offline)

Ignore
1714835487
Reply with quote  #2

1714835487
Report to moderator
1714835487
Hero Member
*
Offline Offline

Posts: 1714835487

View Profile Personal Message (Offline)

Ignore
1714835487
Reply with quote  #2

1714835487
Report to moderator
1714835487
Hero Member
*
Offline Offline

Posts: 1714835487

View Profile Personal Message (Offline)

Ignore
1714835487
Reply with quote  #2

1714835487
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Jouke
Sr. Member
****
Offline Offline

Activity: 426
Merit: 250



View Profile WWW
February 27, 2013, 08:34:39 AM
 #2

It pre-makes 100 addresses in your wallet and everytime you decrypt your wallet is automatically keeps that number of unused addresses up to date. When you ask for a new address it gives you one of those premade unused address.

Koop en verkoop snel en veilig bitcoins via iDeal op Bitonic.nl
jonathan (OP)
Member
**
Offline Offline

Activity: 84
Merit: 14


View Profile
February 27, 2013, 08:57:41 AM
 #3

ah yes, thanks Jouke. Smiley
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!