2 ms·
Use 2-of-3 multisig: https://gist.github.com/oleganza/9232293 https://gist.github.com/oleganza/9232293 User owns a key protected by his password and your serve
by oleganza 13y ago
Use 2-of-3 multisig: https://gist.github.com/oleganza/9232293 https://gist.github.com/oleganza/9232293
User owns a key protected by his password and your server never knows it. Another key is stored unencrypted on the web server (like in "hot" wallet). Third key is stored with your staff, encrypted by their personal password (like in "cold" wallet).
Normal withdrawal: user key and web server's key sign the transaction and it's instantly available.
Security analysis:
1. User forgot their password: he contacts staff that uses their key + web server's key to move funds to new destination.
2. Hackers have taken the web server: they see the key, but it's not enough to move anyone's funds.
3. Staff lost their keys: users still can access their funds if they still remember their passwords.
4. Hackers stole user's computer: they may instantly withdraw some amount up to an arbitrary daily limit. (Withdrawal can also be protected by 2-factor authentication.)
5. Hackers stole staff's keys (e.g. from a personal computer): they still need to break into web server. When staff realizes that keys are compromised, all funds must be moved immediately to new keys.
In other words, users have a hard proof of ownership of specific coins. All coins, no exception, are protected by two differently stored keys. So no need for hot/cold wallet difference.
If you want to block some BTC for trading, webserver will implement that easily: when you withdraw coins, it will move blocked portion to someone else's address.