So I was thinking on my commute this morning about how to implement this securely. We currently use 100% cold wallets but when importing a private key it must then be spent to another address to provide double spend protection. That requires the use of a hot wallet. My first though it is to put a hot wallet on the site which will never keep a balance. Instead it would receive a private key, import it, lookup the value, and then create a tx sending it the deposit address for the order in question.
The attack profile would be very small. I imagine most users won't use private keys so it would be a subset of our total volume. If the server is compromised the attacker would be limited to diverting private keys until the attack is detected.
Any alternatives? Thoughts? ideas?
The easiest way to do this in small quantity is to just do it manually through BlockChain.info. Simply send a transaction to an address you control and then pretend that you received the coins externally.
Despite not liking to use third party wallet services, BlockChain.info is well situated to importing a private key and sending the funds onward for a few reasons. First, importing keys is instant - you can literally spend the funds the second you import them. Second, the transaction that emitted is the actual transaction of sending the private key's funds directly to the destination address - there is no commingling of funds with their own, no waiting for confirmations, and typically no transaction fees. (The outgoing transaction gets fee credit for all the confirmations that accumulated while the funds sat idle on the paper wallet, which in most cases is enough for a no-fee transaction with decent priority). Finally, I have little problem with using a third party wallet service just for the purpose of getting my funds in and out within a single minute - it's leaving the funds there that I'm less upbeat about.
To me, the biggest foreseeable risk is that the customer has malware and ends up getting their own funds stolen by a keylogger while entering the private key on a FastCash4Bitcoins web form, and blames FastCash4Bitcoins for being culpable in some way in getting the funds stolen. Of course, this risk exists even if they're sending the funds from their computer the normal way, the only difference being that if it gets stolen at this point, it's at least more provable (to the perspective of the customer) that you weren't at fault. An alternative would be to take the private key over the phone, but this could get cumbersome and uninteresting especially for low dollar transactions.
Any time I pass private keys or MtGox codes between myself and others, I generally ask for half the code in an e-mail (in your case, webform) and the other half in a text message to my cell phone. That way, someone would have to have control over both channels to be able to swipe the funds out from under me. All that matters is that you can redeem it faster than any attacker. By systematically discouraging complete private keys to be sent to your server, you remove an incentive for hackers to try to hack you in the first place.