Bitcoin Forum
March 29, 2024, 03:09:32 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: encrypt/decrypt wallet  (Read 1957 times)
jonas.schnelli (OP)
Member
**
Offline Offline

Activity: 66
Merit: 10

bitcoin core contributor


View Profile WWW
October 08, 2013, 02:59:20 PM
 #1

Hi

I'd like to understand the bitcoinj wallet encryption.

When i have a enrcypted wallet (enc with Wallet.encrypt()), when is the time to decyrpt/reencrypt the wallet?
Do i have to wallet.decrypt before sending/signing the coins?
Do i have to re-encrypt the wallet after decrypt/sign?

I did not play around with is yet (theory questions).
 

Thanks
--
</jonas>
1711724972
Hero Member
*
Offline Offline

Posts: 1711724972

View Profile Personal Message (Offline)

Ignore
1711724972
Reply with quote  #2

1711724972
Report to moderator
1711724972
Hero Member
*
Offline Offline

Posts: 1711724972

View Profile Personal Message (Offline)

Ignore
1711724972
Reply with quote  #2

1711724972
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Mike Hearn
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1128


View Profile
October 08, 2013, 04:49:02 PM
 #2

We need a documentation article on this feature.

You encrypt a wallet once. At that point, when creating spends, you can set SendRequest.aesKey and it will be used to decrypt keys as it signs.

Deriving an AES key from a users password is meant to be slow/intensive. So, the wallet takes the key directly and not the password (in case you wish to use it multiple times, cache it for a while, etc).  You can get the KeyParameter (which holds the key object) by using wallet.getKeyCrypter().derivePassword("password").
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!