1

I have an application will let user input their credit card information and store that information at Server side. Example : When they buy something, we will get money from them automatic. Do you know how to protect/encrypt user's information credit card at client and server side? Should we store user credit card information on database server? Or somewhere else?

Thank you.

Khoa Tran
  • 528
  • 6
  • 18
  • Use public-key cryptography and always store it encrypted. – gabriwinter May 16 '16 at 09:55
  • Do you have any algorithm suggestion for me? Best algorithm to enc/dec data of credit card? – Khoa Tran May 16 '16 at 09:57
  • 1
    It's simple, study few years security topics, research the credit card companies requirements, learn about the laws and improve your coding skills, I think if you work hard, in 2-5 years you may be ready for such task. Also don't forget to pay for external security review of the result, before you launch it. edit: please, don't do that. Also **nowadays the trend is to not store the full data, but only store special token - it doesn't contain any card data, it's just hash number issued by credit card API to identify your store + customer, so further request from your store will pass**. – Ped7g May 16 '16 at 10:16
  • 1
    *hint* There's an sdk available with paypal.... – t0mm13b May 16 '16 at 11:06

1 Answers1

6

Even before going down that route, think of security first and foremost.

Do not try to roll your own so-called-clever-hacks such as security by obscurity.

On the server side, there must be, requirements met, by credit card providers to verify that compliance tests have been met and passed.

Not to mention, there will be stringent compliance and regulations as well, all the way from beginning of project to end of project, and will carry over to support.

Do not, attempt to store that sort of credit card information on the client side, that is opening up to legal ramifications, who will be responsible for the theft, the owner on the client side, or the actual business operating behind the server side.

Use the tried and tested security algorithms, employ SSL certs that conform to standards.

The question reeks of very poor lack of knowledge and scope for requirements which were not clearly researched or undertaken. It is quite noticeable that this is something the OP will not be, clearly, able to do on their own, and would require third party consultations and solutions to manage the task.

Asking for code to protect credit card information, is, clearly, a warning sign, without any consideration for the above that is written.

t0mm13b
  • 34,087
  • 8
  • 78
  • 110