PDA

View Full Version : SQLITE - how to secure my tables ?


dmla
12-16-2004, 10:13 AM
SQLITE - how to secure my tables ?
I want to make examination program. I want to store question and answers in sqlite database. Could I secure my database against reading from anywhere (exept my auroplay)???
Who know, please share this information for me :)

Thanx

Worm
12-16-2004, 10:47 AM
Couple thought;

1. You could encrypt the file, which would probably be a little work, and while your app was running, there would be a decrypted database somewhere that would be accessible.

2. Encrypt the data that is being stored in the fields. Even if they open the DB with a DB editor, they wouldn't be able to understand what was there.

TJ_Tigger
12-16-2004, 02:28 PM
2. Encrypt the data that is being stored in the fields. Even if they open the DB with a DB editor, they wouldn't be able to understand what was there.

That was my thought. Although it may be a pain to encrypt everything. But at least it is safer.

dmla
12-17-2004, 12:26 AM
Thanx,
I thought so, I think that it is the best method for database in SQLite. Could you suggest any method for encryption. I think it will be function. But what method to put inside?
THNX, for answer.

rhosk
12-17-2004, 03:39 AM
You always have AMS' zip function as well. You could password protect the files and have AMS auto unzip with the password when called - a bit more processing, but should work.

dmla
12-20-2004, 12:25 AM
I think that the best way is to use Encryption plugin. But who can help me to find way to secure text string (not file, like in plugin) ???
How to secure text string with Blowfish by Encryption Plugin ????????????????

dmla
12-20-2004, 05:28 AM
I found. THNX to everybody
http://www.indigorose.com/forums/showthread.php?t=2636&highlight=text+encryption

markczajka
03-02-2005, 02:43 PM
Does SQLite support a username/password which could be passed by the application to open the database? If not, will this be added in the future?

Roboblue
03-05-2005, 03:44 PM
I experimented with using the zip and crypto p/i in a similiar project. Zip encrypt a folder with crypto encypted files. At app startup, zip decrypts the folder to the users temp directory. Then as the files are needed, crypto p/i decrypts the file to ANOTHER user temp/folder (And, with a little more code, generate random temp/folder names when decrypting the crypto files). Then when the entry action is done (or a save button accessed), re-encrypt the just used file back to the zip decrypted folder using crypto p/i and deleting the just used file and temp/folder. If the data is to be saved, just have a button to save it back to the app folder, then delete the zip decrypted folder from the hard drive on app exit. If it is not to be saved, then just delete the zip decrypted folder from the hard drive on app exit.
Sounds a little complcated. However, it's just a few lines of code. The zip is a little slower, so you only have to do it once. The crypto is fast and unless the files are huge, you wont even see a pause when it's doing it's thing. The benefit is that it gives the "hacker" two different encryptions to get through, and two different folders to find, and the crypto, with small files, can be modified and saved on the fly.
Just a thought.

swilk
03-07-2005, 07:32 AM
Do you have any sample code that I can look at?

Thanks
Steve

Corey
03-07-2005, 07:59 AM
Hi. FWIW Sqlite isn't currently a terribly secure database but no doubt there will be certain security features added in future versions. That being said it seems to me that it will be a fairly large task to make it fully secure though. Best solution for critical applications today is probably a remote database such as MySQL which you can interface to via your AMS app. Any typical $10 month hosting account can provide you with a reasonably secure back end for your AMS apps, such as the 4U account from http://www.tera-byte.com for example (that's what I use). Hope that helps somewhat. :yes

Roboblue
03-07-2005, 02:59 PM
My workbox is apart on the bench waiting for a new CPU to be delivered. Hopefully today, but for sure tomorrow. Once I get it going, I'll make a quick apz for you.

swilk
03-07-2005, 03:03 PM
Thanks Roboblue! Examples are much better for me to learn from.