Commit graph

8835 commits

Author SHA1 Message Date
Pieter Wuille
0efda1a79e Do not use obsolete CPrivKey for passing keys around 2011-07-13 02:11:25 +02:00
Matt Corallo
b6b039d84e Add Wallet Encryption section to README 2011-07-13 02:11:25 +02:00
Matt Corallo
fbeb5fb483 Add the walletlock RPC method to lock the wallet manually. 2011-07-13 02:11:25 +02:00
Matt Corallo
81598083e7 Dynamically remove/insert the Options for encryption in the menus. 2011-07-13 02:11:25 +02:00
Matt Corallo
98545d2cdf Push unlocked_until in getinfo. 2011-07-13 02:11:25 +02:00
Matt Corallo
ddebdd9a8f Set the number of SHA512 rounds based on the speed of the computer. 2011-07-13 02:11:25 +02:00
Matt Corallo
4e87d341f7 Add wallet privkey encryption.
This commit adds support for ckeys, or enCrypted private keys, to the wallet.
All keys are stored in memory in their encrypted form and thus the passphrase
is required from the user to spend coins, or to create new addresses.

Keys are encrypted with AES-256-CBC using OpenSSL's EVP library. The key is
calculated via EVP_BytesToKey using SHA512 with (by default) 25000 rounds and
a random salt.

By default, the user's wallet remains unencrypted until they call the RPC
command encryptwallet <passphrase> or, from the GUI menu, Options->
Encrypt Wallet.

When the user is attempting to call RPC functions which require the password
to unlock the wallet, an error will be returned unless they call
walletpassphrase <passphrase> <time to keep key in memory> first.

A keypoolrefill command has been added which tops up the users keypool
(requiring the passphrase via walletpassphrase first).
keypoolsize has been added to the output of getinfo to show the user the
number of keys left before they need to specify their passphrase (and call
keypoolrefill).

Note that walletpassphrase will automatically fill keypool in a separate
thread which it spawns when the passphrase is set. This could cause some
delays in other threads waiting for locks on the wallet passphrase, including
one which could cause the passphrase to be stored longer than expected,
however it will not allow the passphrase to be used longer than expected as
ThreadCleanWalletPassphrase will attempt to get a lock on the key as soon
as the specified lock time has arrived.

When the keypool runs out (and wallet is locked) GetOrReuseKeyFromPool
returns vchDefaultKey, meaning miners may start to generate many blocks to
vchDefaultKey instead of a new key each time.

A walletpassphrasechange <oldpassphrase> <newpassphrase> has been added to
allow the user to change their password via RPC.

Whenever keying material (unencrypted private keys, the user's passphrase,
the wallet's AES key) is stored unencrypted in memory, any reasonable attempt
is made to mlock/VirtualLock that memory before storing the keying material.
This is not true in several (commented) cases where mlock/VirtualLocking the
memory is not possible.

Although encryption of private keys in memory can be very useful on desktop
systems (as some small amount of protection against stupid viruses), on an
RPC server, the password is entered fairly insecurely. Thus, the only main
advantage encryption has for RPC servers is for RPC servers that do not spend
coins, except in rare cases, eg. a webserver of a merchant which only receives
payment except for cases of manual intervention.

Thanks to jgarzik for the original patch and sipa, gmaxwell and many others
for all their input.

Conflicts:

	src/wallet.cpp
2011-07-13 02:11:25 +02:00
Jay Weisskopf
aa0bcaaf2b Remove NSIS branding from bottom divider. 2011-07-12 01:18:57 -05:00
Jay Weisskopf
230b894779 Set default compression for NSIS installer to LZMA.
Use of LZMA (versus the current zlib) shaves a few MB off the installer.
2011-07-11 17:44:44 -05:00
Wladimir J. van der Laan
4a843976e0 also show balloon on sent transaction, to notify when coins sent 2011-07-11 21:01:53 +02:00
Wladimir J. van der Laan
df5ccbd2b2 Show unconfirmed balance on overview page 2011-07-11 20:42:10 +02:00
Wladimir J. van der Laan
eee0d2391c Make tooltip on refresh more clear 2011-07-11 19:35:08 +02:00
Jay Weisskopf
6c9498147f Add logos/branding currently found on bitcoin.org into NSIS installer. 2011-07-11 02:09:07 -05:00
Doug Huff
a48c671957 Make mlock() and munlock() portable to systems that require the address to be on a page boundary. 2011-07-10 18:15:05 +02:00
Jeff Garzik
354f2dd094 Merge pull request #392 from laanwj/antimagic
Remove another magic number: change threshold for nLockTime to constant
2011-07-09 10:09:13 -07:00
Wladimir J. van der Laan
c87cdc9160 wxp/mingw build fixes 2011-07-09 15:58:05 +02:00
Wladimir J. van der Laan
0b814f9ea3 add better windows7/vista look by nico_w 2011-07-09 15:26:57 +02:00
Wladimir J. van der Laan
7668631d1b remove placeholder text from ui form, code generator screws up on older qt 2011-07-09 14:00:00 +02:00
Wladimir J. van der Laan
ea8440d742 Add -fstack-protector to gcc CXX flags 2011-07-09 11:54:25 +02:00
Wladimir J. van der Laan
adad8e46c9 README update 2011-07-09 10:55:46 +02:00
Wladimir J. van der Laan
f54d59ba4a add export functionality for address book / receiving addresses 2011-07-09 10:54:17 +02:00
Wladimir J. van der Laan
2eace48d9a remove magic number: change threshold for nLockTime to constant 2011-07-09 10:30:23 +02:00
Wladimir J. van der Laan
fa989f42c1 remove magic number: change threshold for nLockTime to constant 2011-07-09 10:25:12 +02:00
Wladimir J. van der Laan
aa496b75c2 remove magic number: change threshold for nLockTime to constant 2011-07-09 10:11:28 +02:00
Wladimir J. van der Laan
460cd40aa5 Readme update 2011-07-08 22:45:15 +02:00
Wladimir J. van der Laan
51d7cc07f1 Add context menu on transaction list: copy label, copy address, edit label, show details 2011-07-08 22:27:36 +02:00
Wladimir J. van der Laan
35105534e7 Transaction list: less terse tooltip 2011-07-08 19:56:28 +02:00
Wladimir J. van der Laan
3ddf10e5ca send coins dialog: make sure send button remain default button (triggered with enter) 2011-07-08 19:51:24 +02:00
Jeff Garzik
f08736405e Compile 'sv' translation 2011-07-08 13:38:24 -04:00
Jeff Garzik
c05d011fba Merge pull request #376 from codler/translate
Minor translation changes for latest build (Swedish)
2011-07-08 10:36:49 -07:00
Wladimir J. van der Laan
83b8237046 forgot synced icons 2011-07-08 19:25:35 +02:00
Wladimir J. van der Laan
d8aeb8dd2a Reorganize "send coins" tab 2011-07-08 19:09:13 +02:00
Wladimir J. van der Laan
84c8506e90 Display a "freshness" indicator instead of nr of blocks 2011-07-08 18:05:23 +02:00
Dylan Noblesmith
c1aacf0be3 mlock() all private keys in memory
Inline comment and idea come from the encprivkeys branch
by Matt Corallo <matt@bluematt.me>.
2011-07-08 15:46:47 +02:00
Pieter Wuille
acd6501610 Prepare codebase for Encrypted Keys. 2011-07-08 15:46:47 +02:00
Wladimir J. van der Laan
8ffec99b07 update README 2011-07-07 21:26:46 +02:00
Wladimir J. van der Laan
610121480c "Status" doesn't fit into narrow first column in transaction history, make the header empty 2011-07-07 21:25:17 +02:00
Wladimir J. van der Laan
ba3d0255fc Add German translation by nico_w 2011-07-07 21:19:25 +02:00
Wladimir J. van der Laan
0002bdddfa add [testnet] to whatever the current window title is 2011-07-07 18:38:37 +02:00
Wladimir J. van der Laan
a7e506d698 clarify todo/dones in readme 2011-07-07 18:32:47 +02:00
Wladimir J. van der Laan
94fe42a945 Selection/tab navigation fixes 2011-07-07 18:25:27 +02:00
Wladimir J. van der Laan
3479849dc4 convert to full tab-based ui 2011-07-07 17:33:15 +02:00
Wladimir J. van der Laan
5eaa1b435c Qt handles the "..." for too long table rows. Remove this functionality from TransactionTableModel... 2011-07-07 16:57:19 +02:00
Wladimir J. van der Laan
ae3d0aba15 Sync to bitcoin git e94010b239 2011-07-07 15:22:54 +02:00
Wladimir J. van der Laan
42c405ad23 temp patch for qtui 2011-07-07 15:18:35 +02:00
Wladimir J. van der Laan
33c75fd9aa CKeyStore::AddKey must return a boolean 2011-07-07 15:16:26 +02:00
Wladimir J. van der Laan
fbaee7a853 Export functionality for transaction list 2011-07-07 14:27:16 +02:00
Wladimir J. van der Laan
d52a0f3bca Rename "History" tab to more logical "Transactions", move "Number of transactions" from status bar to overview page 2011-07-07 10:59:00 +02:00
Wladimir J. van der Laan
fac047480d minor language/text updates 2011-07-07 10:43:04 +02:00
Wladimir J. van der Laan
e599246803 Improve view of generated transactions (show clock icon when still maturing) 2011-07-07 10:29:07 +02:00