A few days ago I was thinking what we can do to make bitcoind safer for banks or exchange and than I came up with idea of multiwallet bitcoind.
To access to wallet by JSON RPC we must to predefine rpcuser and password. Also to secure wallet we must start bitcoind on separate server than web interface, moreover we must connect to it only by connection like VPN. In near future bitcoind will also have possibility to encrypt wallet by password known only to owner.
But what about accessing to bitcoind by JSON RPC in this way:
- rpcuser defines which wallet file to select (ex. for user zwierzak we select wallet_zwierzak.dat),
- password isn't written in any database, because verification of user is successful decryption of wallet.
In this way you can have bitcoind on the same server on which you have web interface (not recommended) and stole password for all users accounts would be much harder than stole 1 global user password or get access to separated server.
So advantages:
- every user is responsible of safety of his wallet file,
- we could allow user to download their wallets to hard disk if they want (every user have separate encrypted wallet) and insert it into bitcoin client
- easier to make sure that crackers can stole only part of bitcoins
We must take care about:
- make sure that user use hard password (libcrack)
- username can contain only some characters (regexp: [A-Za-z0-9\-_]) to not allow to write something like ../../../etc/passwd
But this makes 2 new problems:
- if user lost his password then it will be our fault that he lost his savings, because he can't decrypt his wallet
- exchange will not be in realtime, because if you use only one wallet and 1 address per user you calculate balance on your own. Outgoing money you can sign from everyone private key in wallet. But if you separate wallets that after transaction on site you need to transfer coins from one account to another. But this take time to conform transaction.
What do you think about it and will you be interested in this modification of bitcoind? Also do you have any idea how to solve this 2 problems? Or maybe you think that problems are somewhere else?