0

I am developing an application that is using SQLite for the database. I am using Devart dotconnect (http://www.devart.com/dotconnect/sqlite/) for SQLite along with entity framework in .NET 4.5 to interface with the database. I am interested in securing the database with encryption. I have seen this other post (SQLite with encryption/password protection) too. At first glance it looks like the only encryption supported by Devart and entity framework is SEE, which costs $2000 for a license. Is anyone of aware of any open source solutions that would be compatible with this setup? I'm kind of new to entity framework, so I'm not even really sure all of what happens behind the scenes when entity framework decrypts a database... Maybe there is an alternative that I have not considered?

Community
  • 1
  • 1
akagixxer
  • 1,767
  • 3
  • 21
  • 35

3 Answers3

0

Well it has been 5 days and no one has answered so I'll put my findings up. I did not find any other encryption methods specifically supported by dotConnect SQLite other than SEE, CEROD, and SQLiteCrypt. SQLiteCrypt seems to be the least expensive but also has the least amount of features. I am assuming it is supported by dotConnect SQLite since there is an option for it (see here). From my research, it seems if you are on a tight budget and want to secure your database you will have to use SQLiteCrypt or secure the database by hiding it the best you can (this will probably only keep the average user from messing with the data). Keep in mind my requirements are using dotConnect SQLite along with Entity Framework. Without those constraints there are many more options available.

akagixxer
  • 1,767
  • 3
  • 21
  • 35
0

I have used the open source System.Data.SQLite provider in two small projects, both had as requirement to secure somehow the database. You can read the details mentioning:

Encrypted database support. Encrypted databases are fully encrypted and support both binary and cleartext password types

at project's features page.

Stef K
  • 469
  • 8
  • 13
0

For default encryption with System.Data.SQLite use: Create empty database and run program below, then use password property in connection string in your application.

void Main()
{
    // Connection strings:


   string sqliteDBFile = @"C:\temp\test.db";
        string connStr = @"data source=" + sqliteDBFile;
        string password = "password";

        // Query create all the tables in the database:
        string sql = @"CREATE TABLE...";

// Connection code:

        SQLiteConnection cnn = null;

        try {

            cnn = new SQLiteConnection (connStr);

            cnn.Open ();

            cnn.ChangePassword (password);

            SQLiteCommand myCommand = new SQLiteCommand (sql, cnn);

            myCommand.ExecuteNonQuery ();

        } catch (Exception e) {

            Console.WriteLine ("Caught exception: " + e.Message);
            Console.ReadLine();

        } finally {

            if (cnn != null) {

                cnn.Close ();

            }
        }
    }
stepandohnal
  • 457
  • 4
  • 13