Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^4: Cryptology in the database

by patspam (Sexton)
on Mar 31, 2008 at 09:08 UTC ( #677475=note: print w/replies, xml ) Need Help??

in reply to Re^3: Cryptology in the database
in thread Cryptology in the database

Hi ikegami,

You're right, I'm not being specific enough. By "break into my db server" I really mean "obtain a copy of my database"
  • How would the attacker do that? Gaining shell access to my server and doing a live dump of the db (only I have access to the machine, no shared-hosting or anything), stealing my backups, etc..
  • Chance of the attack happening Hopefully very low but since I'm dealing with medical info I'm compelled to encrypt the database anyway
  • the cost of successful attack A whole lot of badness
  • the costs of the possible counter-measures and the effectiveness of the possible counter-measures The point of my post is to find out if any counter-measures exist, suggestions welcome!
I'm not so much concerned with SQL injection in regards to this question although I totally agree it's a really tough hole to protect against and something I'll also need to adrress in my code.



Replies are listed 'Best First'.
Re^5: Cryptology in the database
by andreas1234567 (Vicar) on Mar 31, 2008 at 10:28 UTC
    SQL injection [is] a really tough hole to protect against
    Not really. Revoke SELECT, INSERT, UPDATE, DELETE privileges from you application's user account and grant access to your data through stored procedures only (provided that the DBMS of your choice supports it). That's what I consider the most effective SQL injection prevention.

    See also Avoiding SQL Injection (

Re^5: Cryptology in the database
by jsegal (Friar) on Mar 31, 2008 at 23:23 UTC
    One potential thing encryption can guard against is theft of the database backup tapes. If the database backup tapes and the application server backup tapes are kept and stored in different locations, it is conceivable that someone could steal a database backup tape and thus obtain a copy of the database without a copy of your application. In this case, encryption could be a benefit.