Storing Credit Cards Online
Hi,I have been reading extensively on this topic, and my knee-jerk reaction to this thought has always been : Dont do it for the love of God!!!!!
I would ask those reading this to temporarily set that aside, and instead ask: How could it be done? I am not really interested in the reasons WHY, just from a HOW perspective. I use the example of credit cards, but we can extrapolate that to ANY sensitive data.
It seems to me that this shouldnt be so hard. Is it not possible to use public key encryption (2048bit) to encode this sensitive information before it is stored in mysql database?
This way, only the private keyholder, who would never ever store his key on the server, could access this information. It would naturally be a requirement to use SSL to submit the password (private key) for verification and subsequent revealing the sensitive data.
A potential issue is that someone could read your php scripts to obtain database login/password used to insert the data. I do not see this as a big issue because:
1) Encode your php DBscript - ioncube, zend, etc
2) Even *if* they can get the encrypted CC details - So what? They would have to bruteforce the password, and trying to bruteforce a 2048-bit key with a strong MD5-hashed passcode would take eons.
*I am NOT advocating storing sensitive data on a shared server, as that would be in direct violation of CISP rules, etc. I am simply being devils advocate here.
Seen in this light, one could argue that even if someone managed to root the box, the data should be reasonably safe.
Now for the kicker. This setup will preclude you from doing automated billing, as rule #1 says we cannot store the private key on the server (might as well be plaintext otherwise). How do billing softwares like modernbill, etc securely get around this?
Or, am I making an assumption that automated recurring billing is secure using modernbill, etc?
I havent come across great information on this topic recently, and it seems nobody wants to step out and say WHY NOT instead of DONT DO THAT, so I hope this stimulates some discussion.