Credit card details

Last post 07-04-2009 11:54 PM by RickNZ. 2 replies.

Sort Posts:

  • Credit card details

    07-04-2009, 5:14 AM
    • Member
      293 point Member
    • Nicsam
    • Member since 08-24-2007, 5:55 AM
    • Kozhikode , Kerala , India
    • Posts 126

    Hi friends

    I have an application where i need to accept the Credit card details from the user and it is processed only after a time period. So i doubts how securely i should store this sensitive information in the database.

    Can anyone put forward any ideas for the same would be much appreciated,


    Thanks

    Sujith PV

    Regards
    Nicsam

    [!!!!!!!Hopes this helps you!!!!!!!]





  • Re: Credit card details

    07-04-2009, 10:54 PM
    Answer
    • All-Star
      62,543 point All-Star
    • TATWORTH
    • Member since 02-04-2003, 8:34 AM
    • England
    • Posts 12,210
    • TrustedFriends-MVPs

    Is your server:

    • a dedicated server?
    • bolted to the floor?

    You will need to store the credit card number in an encrypted format and log all access to it.

    These are just a few of the PCI rules: for full details see

    Don't forget to click "Mark as Answer" on the post that helped you.
    This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
  • Re: Credit card details

    07-04-2009, 11:54 PM
    Answer
    • Contributor
      5,110 point Contributor
    • RickNZ
    • Member since 01-01-2009, 3:43 AM
    • Nelson, New Zealand
    • Posts 856

    Key management is usually the sticking point for this type of security.

    You might consider using SQL symmetric keys and certificates.  That way, SQL will do much of the key management for you.

    Example:

    CREATE CERTIFICATE [CCCert]
        AUTHORIZATION [ccuser]
        WITH SUBJECT = N'CC Certificate',
        START_DATE = N'1/1/2008 12:00:00 AM', EXPIRY_DATE = N'12/31/2010 12:00:00 AM'
        ACTIVE FOR BEGIN_DIALOG = ON;
    
    CREATE SYMMETRIC KEY [CCKey]
        AUTHORIZATION [dbo]
        WITH ALGORITHM = AES_128
        ENCRYPTION BY CERTIFICATE [CCCert];
    
    begin transaction
    	open symmetric key CCKey decryption by certificate CCCert
    	insert into [CCSchema].[CCData]
    		(UserId, CCNumber)
    		values
    		(@id, encryptByKey(Key_GUID('CCKey'), @ccnumber))
            close all symmetric keys
    commit transaction
    
    


    If your DB isn't on the same machine as your web app, you should be sure to use IPSec to protect the link.

    In the example above, only the DB user "ccuser" will be able to encrypt or decrypt the data.



Page 1 of 1 (3 items)