Ok, true internet security is a multi-layered issue, not usually very friendly to non-programmers or security novices. The little I’ve done, it’s been tricky to feel good about.
What you need:
1. HTTPS and POST operations for all posted forms with the sensitive data (check your host to see if they provide domain-specific certificates)
2. MySQL encryption is a specialty setup in most cases, so you must ask your provider if they support it; use PHP OpenSSL instead (preferable, or the mcrypt library if available)
3. Use AES encryption (look down at Other Languages, bottom of the page)
Beware of encode(), base64(), sha1(), md5/md3(), and crypt(); those are NOT very useful for what you’re doing. For AES, you will preferably like a 128-bit level encryption, but higher is better; 256 is a good standard.
EDIT: Ingmar’s comment below is accurate re: 128 being sufficient for nearly all needs. However, I believe MySQL data encryption needs to be carefully thought out and tested, especially if the database server is on another machine and cannot be called and delivered data through a secure port/tunnel. Localhost setups are usually sufficient, though. Still check to make sure AES function are available in your setup, as well.
Understanding what is happening and the way that it all works, in the end, is the hard part. Encrypting information is only one link in a chain of necessary steps.
I got started some years ago with this book (examples are in Java, but the concepts are the important part):
Web Services Security
Really, though, if you’re trying to actually secure data you’re putting in a server (personal information), and the job requires it, you need to get someone experienced in doing this, someone with solid references. This is not a plug for yours truly; to be honest, I’d not take on the hassle. I just don’t do it too often.
😉
Web security (encryption, transmission, confidentiality, validation, verification, veracity) is not “easy”; in most cases, people have to remodel their thinking just to figure out what’s going on, and the planning is complicated. You’re probably better off hiring a security consultant to hold your hand, or reading extensively on AES encryption/decryption using public/private keys.
There’s a lot of places where transmission and storage security can break down. Also, storing credit cards locally is probably a bad idea, but sending it without proper security protocols to another server can be just as problematic.
Interestingly, leaving a note for people to call a phone number with their credit information may lead to a significant security breakdown, using a really simple social engineering attack vector: Someone hacks the page with the phone number and changes it to another that calls them instead, where the clients happily hand it over.
Simple, effective. Weak FTP password security leads to a novel side-channel attack. Hmm…
No amount of encryption will save that scenario from happening; encryption is only one significant part of many significant parts. Not saying that’s likely, but you should get the idea that security is a matter of limiting or possibly mostly eliminating (like using HTTPS) known weaknesses along the roundtrip, as you can never rid yourself of all weaknesses altogether.
In financial controls, there is a phrase for that concept: Reasonable assurance.
Beware of people who claim absolute assurance, as that’s snake oil. To read more on this, check out Bruce Schneier:
http://www.schneier.com/
Snake Oil
At least read the snake-oil article. 😊
Security is, essentially, only reasonable in execution. The only secure bit of data anywhere is the bit that *no one* can decrypt. If that were rational, it would be really, really simple, and 100% effective.
And completely useless to mere mortals. 😉
The hard part about web security is proving it’s working, and that you don’t break it over time or think it’s working, only to accidentally publish your private key, for instance. This is why experience is useful. Chances are, you’re fine with the member data not being encrypted, unless the client demands it, in which case they should foot the cost of a reputable consultant.
PS: Subscribe to Bruce Schneier’s Crypto-Gram newsletter. Very entertaining, very challenging to common security understanding and orthodoxy (I love the movie-plot threats stuff he does), and he’s a great writer, so it’s not over most people’s heads, no matter your background.