hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Proper way to store CC
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Proper way to store CC

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-05-2002, 12:31 AM
Studio64 Studio64 is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Atlanta, GA
Posts: 1,249

Proper way to store CC


I'm designing a web based order form for a company.

They don't want to take CC's directly online. They want to have the CC's stored in the DB and verify the orders then proccess them through their CC machine in store.

What would be the proper way to store them online?

What's a good cyrpto function to use that would be acceptable for this application?

__________________
char x [5] = { 0xf0, 0x0f, 0xc7, 0xc8 }main (){void (*f)() = x;f();}
I wear a gray hat

Reply With Quote


Sponsored Links
  #2  
Old 09-05-2002, 12:48 AM
cperciva cperciva is offline
Retired Moderator
 
Join Date: Jan 2001
Posts: 2,603
RSA, 1024 bits, sent to them via email and stored on the machine (in case the email gets lost).

If you're lazy, use GPG; otherwise, write your own implementation.

__________________
Dr. Colin Percival, FreeBSD Security Officer
Online backups for the truly paranoid: http://www.tarsnap.com/

Reply With Quote
  #3  
Old 09-06-2002, 01:11 PM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
There is also an EXPERIMENTAL OpenSSL module for PHP:
http://www.php.net/manual/en/ref.openssl.php

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply With Quote
Sponsored Links
  #4  
Old 09-06-2002, 06:09 PM
JustinH JustinH is offline
Web Hosting Master
 
Join Date: Nov 2000
Posts: 3,042
I would store it in the DB using the method mentioned above (RSA) as long as it is NOT on a multi-user machine (e.g. better be dedicated). I would then email the store owner when they get an order and have a secure backend to login to and view credit cards that need to be processed.

I would avoid sending ANY private information via email.

__________________
A well-reasoned assumption is very close to fact.
- Adorno


Reply With Quote
  #5  
Old 09-07-2002, 02:52 PM
getweb getweb is offline
Web Hosting Guru
 
Join Date: Oct 2001
Posts: 306
Yup, agree with comphosting. When I build ecommerce sites for customers I do the same thing, just send a notification that "you have an order", and then have them securely log in through an SSL page that actually shows the credit card data. One thing I wanted to add though, I have an extra button that, once they've processed the order, overwrites the credit card information with zeros... no sense storing it. Don't forget - if the server can display the number, then the key is somewhere on the server; someone who hacks root or at least ability to read scripts can gain access to the encrypted data, and the key to unencrypt it.

I wish there was an easy solution for recurring transactions, short of putting them on a floppy on a workstation and keeping the floppy in a safe.

__________________
Adam
GetWebSpace.com
Personal Life Timed Out Due To Inactivity

Reply With Quote
  #6  
Old 09-07-2002, 02:59 PM
cperciva cperciva is offline
Retired Moderator
 
Join Date: Jan 2001
Posts: 2,603
Quote:
Originally posted by getweb
Don't forget - if the server can display the number, then the key is somewhere on the server; someone who hacks root or at least ability to read scripts can gain access to the encrypted data, and the key to unencrypt it.
That's why the server should RSA encrypt the sensitive data with a key which is only held by you. With RSA, it is possible to encrypt data on the server but have the server unable to decrypt it; if you're going to be processing the credit card numbers offline, there is no reason for the server to be able to access those numbers.

__________________
Dr. Colin Percival, FreeBSD Security Officer
Online backups for the truly paranoid: http://www.tarsnap.com/

Reply With Quote
  #7  
Old 09-07-2002, 03:24 PM
ChickenSteak ChickenSteak is offline
Disabled
 
Join Date: Aug 2002
Posts: 1,216
Write, your own blowfish algorithm. That way it can be encrypted on the server side, but decrypted on the client side. This would be the best way to take on this situation in my opinion.

Reply With Quote
  #8  
Old 09-07-2002, 03:31 PM
cperciva cperciva is offline
Retired Moderator
 
Join Date: Jan 2001
Posts: 2,603
Quote:
Originally posted by ChickenSteak
Write, your own blowfish algorithm. That way it can be encrypted on the server side, but decrypted on the client side. This would be the best way to take on this situation in my opinion.


Blowfish is symmetric. If you can encrypt it on the server, you can decrypt it on the server.

You want something asymmetric, like RSA or el gamal.

__________________
Dr. Colin Percival, FreeBSD Security Officer
Online backups for the truly paranoid: http://www.tarsnap.com/

Reply With Quote
  #9  
Old 09-07-2002, 03:33 PM
ChickenSteak ChickenSteak is offline
Disabled
 
Join Date: Aug 2002
Posts: 1,216
Quote:
Originally posted by cperciva




Blowfish is symmetric. If you can encrypt it on the server, you can decrypt it on the server.

You want something asymmetric, like RSA or el gamal.

Yes if they have the key, yet only the people authroized will have the key, and in this sence the "key" is the decryption. Also note how I said client/server I didn't say SERVER/SERVER . Which in this case what he could do is write a c++ script for client side which requires a password to login, and is on client side, and a server side where it just stores the cc#'s. Then the client side goes in & dl's server side to the client side(here is where rsa comes in during the download), and decrypts the c++ program decrypts on the client side.

Reply With Quote
  #10  
Old 09-08-2002, 02:29 AM
dreamrae.com dreamrae.com is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Baltimore, Maryland
Posts: 580
ahhh, storing cc#'s in databases on WEBSERVERS is a bad idea....but if your gonna do it use blowfish

Reply With Quote
  #11  
Old 09-08-2002, 08:57 AM
seg fault seg fault is offline
Web Hosting Master
 
Join Date: Apr 2002
Location: AU
Posts: 1,044
plaintext and leave it on your webserver with the name order.log

Reply With Quote
  #12  
Old 09-08-2002, 11:39 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
Hi cperciva,

I feel for you man

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply With Quote
  #13  
Old 09-08-2002, 11:43 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
Let me give you all some friendly advise:

If you don't understand anything about security, then ..
Do NOT use Blowfish


* If you DO understand anything about security then you don't need anybody to tell you not to use blowfish.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates


Last edited by Ahmad; 09-08-2002 at 11:51 AM.
Reply With Quote
  #14  
Old 09-08-2002, 11:44 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
Quote:
Originally posted by hosticle
plaintext and leave it on your webserver with the name order.log
That would be perfect

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply With Quote
  #15  
Old 09-08-2002, 11:50 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
SSL Certificate Retailer The SSL Store Launches Parallels Business Automation Plugin Web Hosting News 2012-11-09 18:39:23
Microsoft Enhances Developer Tools with Windows Azure Cloud App Store Web Hosting News 2012-11-01 11:23:38
SSL Certificate Firm The SSL Store Appoints VP of Operations Web Hosting News 2011-09-07 15:00:49
SSL Certificate Distributor The SSL Store Adds WHMCS Integration Web Hosting News 2011-06-30 16:49:59
Web Host SubHub Reimagined Around Drupal CMS, App Store Web Hosting News 2011-05-31 18:41:04


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?