If I am compelled to use SQLite3 rather than MySQL, what can I do to secure the database file's contents?
And, from a performance perspective, would it be better to encrypt the whole file (assuming that's a possibility) then decrypt each time I want to read the contents, or would it be better to encrypt/decrypt on a field by field basis?
Thanks for any help, or for pointers to external references.
SQLite security
Moderator: General Moderators
- kaisellgren
- DevNet Resident
- Posts: 1675
- Joined: Sat Jan 07, 2006 5:52 am
- Location: Lahti, Finland.
Re: SQLite security
Store the file outside the public folder. If someone can access it, he would have a complete filesystem access in which case it does not matter if he can read your database.greyhoundcode wrote:If I am compelled to use SQLite3 rather than MySQL, what can I do to secure the database file's contents?
And, from a performance perspective, would it be better to encrypt the whole file (assuming that's a possibility) then decrypt each time I want to read the contents, or would it be better to encrypt/decrypt on a field by field basis?
Thanks for any help, or for pointers to external references.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: SQLite security
As kaisellgren says, you should protest the file like you would protect any file on your server. If you cannot secure the filesystem then encrypting/decrypting will not be much use -- because if they can read the file, they can read your code.
(#10850)