We have an Ubercart site that will be manually processing credit cards. There is a concern that if the server was compromised, a smart hacker could decrypt the credit card information. I don't see a way around this if the encryption key is the same as the decryption key. The only way to prevent this that I can see is to use an asymmetric encryption scheme (The key to encrypt is different than the key to decrypt). So, say using RSA encryption, the private key to decrypt can be kept on the clients home computer and never put on the server.
I have made a simple desktop application that generates RSA keys when it is first run. The public key info (1024 bit) can then be copied and pasted into a php encryption function. Then I believe all that is necessary to integrate into the cart is to call this encryption function just before Ubercart stores the credit card in the database:
$cc = encrypt($cc);
Then when the client wants to process an order they copy the encrypted cc info into the desktop app, where the private key is available, and it is decrypted. This seems to me perfectly secure as the decryption private key is never available on the server.
I have completed and tested the desktop app (to generate the keys and do the decrypting), and the php function to encrypt. I believe all that is left to integrate into ubercart is to add a line as mentioned above to encrypt the cc just before it is stored in the db (and change the column type in the table that stores the cc). Does anybody see these changes as potentially breaking anything in the cart? Are there any security considerations or anything else I may have overlooked?




Joined: 09/12/2007