in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Unable to open encrypted file

Last post 02-11-2009 9:36 AM by Krayol. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-03-2009 2:10 PM

    Unable to open encrypted file

    So I have run into a small issue.  When I encrypt a file using changePassword I can no longer open it in any other environment.  For instance, I have Sqlite Maestro, which supports encrypted files.  If i specify the password i set, the connection still fails.  In the reverse, if i encrypt the file with Sqlite Maestro, I can't connect using System.Data.Sqlite.  I have also tested this with other development ide's and they all seem to work across each other, but for some reason not with the ado.net provider.  Any insight or help on this would be great as I would like to run batch inserts on the db with maestro and not have to unencrypt and re-encrypt every time.  thanks,

     

    Brian

  • 02-02-2009 11:46 AM In reply to

    Re: Unable to open encrypted file

    I am also running into this problem. Any help would be appreciated.

  • 02-11-2009 9:36 AM In reply to

    • Krayol
    • Top 500 Contributor
    • Joined on 12-19-2008
    • Posts 4

    Re: Unable to open encrypted file

    My understanding is as follows (my apologies if I am wrong!): 

    SQLite itself provides no encyption. 

    As an option, users can purchase a cryto module for $2000 from Dr Hipp's company http://www.hwaci.com/sw/sqlite/see.html.  This provides a robust security system to those users that hooks into SQLite, but those users are not allowed to redistribute this system (understandably).  This is based on AES encryption.

    System.Data.SQLite uses the built in "hooks" to implement a custom "lower grade" security system based upon Microsoft Crypto-API / RC4: http://sqlite.phxsoftware.com/forums/p/473/2005.aspx#2005.  In my opinion this provides excellent security for distributable databases on windows.  However, it is obviously not compatible with AES!

    I am not sure what SQLite Maestro uses - if self contained then it may use Dr Hipp's Crypto Module.  If not, then it is most likely another custom encryption scheme.  You can use it with other products that support the same scheme only.

    In summary: use  SQLite Maestro to read SQLite Maestro encrypted files.  Use System.Data.SQLite to read System.Data.SQLite encrypted files**. 

     ** There is an exception here: dhSQLite (for VB6) uses the same encryption scheme as System.Data.SQLite and I have found it to be compatible.  This means that I can generate files with System.Data.SQLite and then read them in VB6 programs (and vice versa).

Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems