I've been thinking of ways to store credit cards securely, I thought of this:
- Take the users credit card info
- Put the card info in a standard format
"Full Name/Card Num/Security Num/Expiry Date"
- Then encrypt the data using a 512 bit private key:
Then I'll have something like this:
Then my idea would be to store that encrypted string with the public key in a database.
Then when the user tries to pay for something with their card they just pay like you would with PayPal, but instead of logging in, the user provides their private key.
Would this be useful? Or is there already better alternatives?
I thought of this because even if the database was compromised the credit card data stored within the database would be completely useless, even to the people who run the service.