Author

Topic: encrypt/decrypt wallet (Read 1971 times)

legendary
Activity: 1526
Merit: 1134
October 08, 2013, 11:49:02 AM
#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").
member
Activity: 66
Merit: 16
bitcoin core contributor
October 08, 2013, 09:59:20 AM
#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
--
Jump to: