Data Encryption

Discussion in 'PHP' started by crath, Jul 4, 2009.

  1. #1
    What do you use to encrypt your data? I am looking at different methods, but can't find one that I am interested in using.

    I will be storing alpha-numeric values in a database, and would like them encrypted while they are sitting in there.

    I was thinking base64, but wanted to see if there were any other paths.

    Thanks!
     
    crath, Jul 4, 2009 IP
  2. flakas123

    flakas123 Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Don't you think that base64 is easy to decode?
     
    flakas123, Jul 4, 2009 IP
  3. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #3
    Very easy, which is one of the reason I am asking here, hoping to get some more insight on good encryption methods :D
     
    crath, Jul 4, 2009 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    Base64 is not an encryption, it is simply changing the encoding of the data. It works somewhat for obfuscation and preventing certain types of malicious attacks, but is not a method to secure sensitive data.

    Mysql has the built in function AES_ENCRYPT which is suitable for sensitive data storage.

    http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html#function_aes-encrypt

    The problem with any sort of encryption is key management. Since you must provide a key to encrypt and decrypt data, keeping the key secure is just as or more important than the actual encryption.
     
    jestep, Jul 4, 2009 IP