|
|||||||||||
|
Re: Database Encryption -- Sql Injection
From: Kevin Spett <kspett(at)spidynamics.com>
Date: Thu Apr 24 2003 - 10:52:58 EDT I do agree that keeping it in the application is the best choice. However, it should be noted that if the crypto is being used correctly, ultimately, it doesn't matter too much. The security should rely on the secrecy of the key. In a well-implemented system, an attacker should be able to have the algorithm and still not have a chance at deciphering the data. You should be using an industry standard cipher and not rolling your own.
Kevin Spett
Dave,
Logan
-----Original Message-----
Does any one have any comments on where best to incorporate Column level encryption in a Database field? At the Database Server level (via a User Defined Function) or at the Application Level. Which would be less impervious to SQL Injection? I am on a MS-SQL 2000 and IIS Platform.
If I had a User Defined Function for example:
Select decrypt(AccountNumber, "key") from tblTable where User =
If SQL Injection occurs:
In this case if SQL injection occurs the encrypted field will be automatically decrypted by the UDF... Showing all accountNumbers... If I had the Decryption handled at the Application: Select encryptedAccountNumber from tblTable where User = 'someuser'
And had the application call:
If SQL Injection occurs, the only way data could be seen if through whatever mechanism the application displays the AccountNumber (Are these scenarios identical ?)
I know that encryption is not a substitution for good input sanity
validation.
Regards,
This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:07:50 EDT |
||||||||||
|
|||||||||||