Relatively secure way to encrypt local database?

Hi all!
 
I just finished my first year of Information Science in college, and am trying to continue advancing my programming knowledge throughout summer. I started a project in corona/lua that creates a database and stores in it websites that you enter, along with your username and password for the site. Once you enter the information, a button is created which, when clicked, opens the site and sends a notification with the associated username and password so you can have quick access to them both as you’re logging in.

I’m not sure how practical of an appication this is, but it’s mainly just meant as a programming exercise anyway. My question is, is there any way I can make this database relatively secure? If so, how would I go about doing that?

Thanks for listening!

You could look at Crypt library from Graham Ranson - http://www.grahamranson.co.uk/portfolio/crypt/

I used GGData from Graham and it was great. This should be just as nice if not better given that its his new library. Provides encryption support and with the small number of records you have to deal with it should be more than fast enough.

I have to be honest, I’m kind of lost on all of this encryption stuff. I looked at crypt, and I’m not sure I have the right idea of where to go with it. I demoed it in the corona simulator and I noticed in the project sandbox there’s a sample.crypt file. So I’m assuming when you do crypt:new(), it creates an encrypted file, and box:set() you are placing information in that encrypted file? Can I simply encrypt my entire database file then by doing box:set(database.db) ?

Also, I noticed in the build.settings, it has a portion that mentions openssl. I was under the impression that this was a pro and enterprise only feature. Can I use it as a starter user for personal use but not distribution?

Thank you very much for your help!

edit: As I suspected, when I tried to build for android, it notified me that I had to be subscribed to the pro package. Do I have any other options with this? As a noob I can’t be shelling out that kind of money for my silly projects

plugins = { ["plugin.openssl"] = { publisherId = "com.coronalabs", } },

I’m sorry but I don’t have any experience with this new library. Suggest writing to Graham Ranson. Or start a new thread with Crypt in the title so it catches his attention. 

I think GGData also offers some encryption and I’m pretty sure it does not need the OpenSSL plugin. You could try that. 

GGData does not allow you to store other files in it. It simply lets you store tables containing any information you throw at it. So my idea was that you could do away with SQLite for your project and simply store your information as text fields in a table. You can then use the encrypt feature in GGData and be done with it. 

Hope this helps. All the best.

You could look at Crypt library from Graham Ranson - http://www.grahamranson.co.uk/portfolio/crypt/

I used GGData from Graham and it was great. This should be just as nice if not better given that its his new library. Provides encryption support and with the small number of records you have to deal with it should be more than fast enough.

I have to be honest, I’m kind of lost on all of this encryption stuff. I looked at crypt, and I’m not sure I have the right idea of where to go with it. I demoed it in the corona simulator and I noticed in the project sandbox there’s a sample.crypt file. So I’m assuming when you do crypt:new(), it creates an encrypted file, and box:set() you are placing information in that encrypted file? Can I simply encrypt my entire database file then by doing box:set(database.db) ?

Also, I noticed in the build.settings, it has a portion that mentions openssl. I was under the impression that this was a pro and enterprise only feature. Can I use it as a starter user for personal use but not distribution?

Thank you very much for your help!

edit: As I suspected, when I tried to build for android, it notified me that I had to be subscribed to the pro package. Do I have any other options with this? As a noob I can’t be shelling out that kind of money for my silly projects

plugins = { ["plugin.openssl"] = { publisherId = "com.coronalabs", } },

I’m sorry but I don’t have any experience with this new library. Suggest writing to Graham Ranson. Or start a new thread with Crypt in the title so it catches his attention. 

I think GGData also offers some encryption and I’m pretty sure it does not need the OpenSSL plugin. You could try that. 

GGData does not allow you to store other files in it. It simply lets you store tables containing any information you throw at it. So my idea was that you could do away with SQLite for your project and simply store your information as text fields in a table. You can then use the encrypt feature in GGData and be done with it. 

Hope this helps. All the best.