<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlite.phxsoftware.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>http://sqlite.phxsoftware.com/forums/4.aspx</link><description>General discussions regarding the ADO.NET 2.0 Provider for SQLite</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/7888.aspx</link><pubDate>Tue, 28 Jul 2009 21:02:27 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:7888</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/7888.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=7888</wfw:commentRss><description>&lt;p&gt;The .NET provider uses RC4 encryption.&amp;nbsp; The entire file is encrypted, including the metadata.&amp;nbsp; SQLite the engine may store unencrypted pages in its internal cache, but I don&amp;#39;t really know for sure.&lt;/p&gt;
&lt;p&gt;The bottom line is that nothing is safe from a hacker who has your binaries and database on his/her computer and is determined to read your data.&lt;/p&gt;
&lt;p&gt;It is impossible to design an unhackable program&amp;nbsp;that is designed to run on a local computer.&amp;nbsp; Anytime a hacker has access to a debugger and locally-running code, you are vulnerable in some fashion or another.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/7887.aspx</link><pubDate>Tue, 28 Jul 2009 20:41:52 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:7887</guid><dc:creator>IronyofLife</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/7887.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=7887</wfw:commentRss><description>First of all, thanks to you for creating this wonderful package and making it available to all. I have successfully integrated your library into my application. 

I do realize that this thread is close to 2 years old. Hope you can reply to my question. 

Sqlite database is a flat file and as such does not offer much protection. Encrypting it makes it harder to read and depending on the strength of the encryption technology, it may or may not be possible to hack it by brute force. 

However, SQLite stores pages of data in memory and in the case of encrypted database, is the data in the pages encrypted and decryption happens when it is actually queried? In other words how secure is encryption for a determined hacker employing tools to read the data from memory. 

Thanks very much in advance.</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/3938.aspx</link><pubDate>Mon, 15 Oct 2007 14:40:42 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:3938</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/3938.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=3938</wfw:commentRss><description>&lt;p&gt;The general idea is that the encryption used in this library should not detract or replace the encryption support offered via paid services by Dr. Hipp, which is generally stronger and uses an AES algorithm.&lt;/p&gt;
&lt;p&gt;A few notes on this ...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;The actual implementation of the encryption is done via hooks into the core library and is not something I can alter.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;The IV shouldn&amp;#39;t matter -- all pages of the database are encrypted completely, and I believe there are zero unencrypted bytes in a page&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;A passphrase can be supplied in a connection string, or binary bytes/passphrase can be called via a supplemental function on the connection object, which offers better security.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Robert&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/3937.aspx</link><pubDate>Mon, 15 Oct 2007 12:55:24 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:3937</guid><dc:creator>sraillard</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/3937.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=3937</wfw:commentRss><description>&lt;p&gt;Dear all,&lt;/p&gt;
&lt;p&gt;Maybe it&amp;#39;s too late to add something as the last message in this thread was more than one year old!&lt;/p&gt;
&lt;p&gt;Anyway, I had a look to the source code of the provider (crypt.c file version 1.0.46.0) to check how exactly the database encryption was done.&lt;/p&gt;
&lt;p&gt;What I find:&lt;/p&gt;
&lt;p&gt;- the whole database is protected by one unique password (passphrase)&lt;/p&gt;
&lt;p&gt;- the data in the database are arranged by pages, each page are encrypted when written and decrypted when read throught a hook registred in the sqlite3 engine&lt;/p&gt;
&lt;p&gt;- the encryption of the pages are done using the RC4 algorithm using a default 128 bits key size&amp;nbsp;(which is quite secure if well used like in SSL) in CBC mode (Chain Bloc Cipher stream mode).&lt;/p&gt;
&lt;p&gt;- each page encryption is starting with an IV (Initialization Vector) that always have a value of zero (that may facilitate some attacks if some clear data can be guess in&amp;nbsp;a page)&lt;/p&gt;
&lt;p&gt;- the RC4 128 key is derivated from a SHA-1 hash of the password provided (that acts as passphrase in fact): the first 128 bits of the SHA-1 256 bits result are used.&lt;/p&gt;
&lt;p&gt;- even if the Microsoft Crypto API is used, the crypto functions are very common (RC4/SHA-1) and can be easily ported to non-Windows platform.&lt;/p&gt;
&lt;p&gt;As a conclusion, I think that the offered proctection is quite nice, the only problem maybe the non-varying Initialisation Vector for each database data page. Also, the policy of having one unique passphrase for protecting the database make the calling application to safely protect this passphrase.&lt;/p&gt;
&lt;p&gt;I hope I didn&amp;#39;t do any errors in my code analysis, and I hope Robert will correct me if this is the case!&lt;/p&gt;
&lt;p&gt;Sebastien RAILLARD.&lt;/p&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2013.aspx</link><pubDate>Thu, 14 Sep 2006 14:34:18 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2013</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2013.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2013</wfw:commentRss><description>&lt;P&gt;One of the irreversable mistakes I made with the provider was to include the strong name key in the source code release.&amp;nbsp; I plan on fixing that mistake in the vNext provider.&amp;nbsp; Anyone wanting to compile the vNext provider will be forced to create their own strong name, as I won't be including my key in the source release.&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2012.aspx</link><pubDate>Thu, 14 Sep 2006 09:13:49 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2012</guid><dc:creator>r41n</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2012.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2012</wfw:commentRss><description>A very nice idea, i'll do that, thank you :)&lt;br&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2011.aspx</link><pubDate>Thu, 14 Sep 2006 07:32:51 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2011</guid><dc:creator>SqlRanger</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2011.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2011</wfw:commentRss><description>I think that doing the following:&lt;br&gt;&lt;ul&gt;&lt;li&gt;Create your own strong name key file&lt;/li&gt;&lt;li&gt;Keep the strong name key file secure.&lt;br&gt;&lt;/li&gt;&lt;li&gt;Compile System.Data.SQLite.dll strong naming it with your own key file&lt;/li&gt;&lt;li&gt;Reference this dll instead of that of SourceForge&lt;/li&gt;&lt;/ul&gt;Would make replacing the SQLite dll with a hacked dll much more difficult because it would cause load exceptions.&lt;br&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2010.aspx</link><pubDate>Wed, 13 Sep 2006 15:36:18 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2010</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2010.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2010</wfw:commentRss><description>&lt;P&gt;Dr. Hipp has a crypto module for SQLite, but it is proprietary, and costs $2,000 (I think) and is not public domain.&lt;/P&gt;
&lt;P&gt;However, due to the way he designed the library, all the "hooks" are in place inside the engine for one to build their own crypto module and plug it in.&amp;nbsp; None of the hooks are documented, but I managed to figure them out and designed my own module.&lt;/P&gt;
&lt;P&gt;I also didn't want to step on Dr. Hipp's toes, so I went with the Microsoft Crypto-API rather than use&amp;nbsp;3rd party cross-platform encryption&amp;nbsp; source code.&amp;nbsp; My encryption module works only on Windows-based platforms, which suits the goals of this particular provider just fine.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2009.aspx</link><pubDate>Wed, 13 Sep 2006 14:56:35 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2009</guid><dc:creator>r41n</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2009.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2009</wfw:commentRss><description>Yes it's a bit obscure what i'm doing :)&lt;br&gt;I try to consider all posibilities, for example there could be a rather small number of users knowing the password of a given database which is available on a website. Take a group of coworkers or a few friends who want to share something and keep unwanted guests outside. Ok there are other ways someone could do this, i'm just trying to give more options to the end user.&lt;br&gt;&lt;br&gt;BTW, i still don't get why you had to add this algorithm, doesn't SQLite have a built-in crypto algorithm?&lt;br&gt;&lt;br&gt;Thank you&lt;br&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2007.aspx</link><pubDate>Wed, 13 Sep 2006 14:42:43 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2007</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2007.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2007</wfw:commentRss><description>&lt;P&gt;I'm curious about your architecture, though.&amp;nbsp; You said:&lt;/P&gt;
&lt;P&gt;
&lt;HR&gt;

&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;EM&gt;Since the DB could be made available as download for whatever reasons access to the DB file itself will be pretty easy, but not to the PC the password-knowing-end user will use.&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;... but why would anyone want to download or make available the DB when it couldn't be read by anyone but the password-knowing user that made it?&lt;/P&gt;
&lt;P&gt;I haven't really done any research into the particular merits or weaknesses of RC4 ... Really all I did was try and find the most secure algorithm I could find that ran on both the desktop and the Pocket PC.&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2005.aspx</link><pubDate>Wed, 13 Sep 2006 09:40:52 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2005</guid><dc:creator>r41n</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2005.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2005</wfw:commentRss><description>Right, but i guess i wasn't very explicit. Since the DB could be made available as download for whatever reasons access to the DB file itself will be pretty easy, but not to the PC the password-knowing-end user will use. Hench my interest in a secure encryption of the DB itself. I guess the hacker will have a hard time (involving the use of backdoors ans such stuff) using a hacked dll on a password-knowing-end user PC to access the DB itself. I say "hard time" (which obviously is relative) compared to just using a brute force attack to guess the password of the DB, which will probably be the less painfull solution in case of a weak encryption algorithm.&lt;br&gt;&lt;br&gt;By no means i'm questioning your choices or skills, it's obvious you know what you're doing. Sure, there is no 100% secure way to keep data unreadable. I just wanted to know how secure RC4 is in terms of brute force attacks compared to algorithms like Rijndael. I red something about RC5 and RC6 so i guess RC4 is pretty old.&lt;br&gt;&lt;br&gt;Thank you for your time :)&lt;br&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2003.aspx</link><pubDate>Wed, 13 Sep 2006 01:02:16 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2003</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2003.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2003</wfw:commentRss><description>&lt;P&gt;That's not what I was saying.&amp;nbsp; It doesn't matter where the password comes from.&amp;nbsp; Somewhere in your program, a password is supplied to the database engine, and at some point, your program reads from the encrypted database.&amp;nbsp; Those two simple things your program must do, can be intercepted at the point at which you communicate with the engine, and hacked.&amp;nbsp; It doesn't matter if its RC4 or AES, as long as someone intercepts the function calls you make which supply the password and read from the database.&lt;/P&gt;
&lt;P&gt;If the data resides on a user's computer, and a program accesses the data, then that data can be compromised.&amp;nbsp; No exceptions.&amp;nbsp; There is no physical way to prevent it 100%, so all you can do is take reasonable precautions.&amp;nbsp; RC4 is a reasonable precaution, and works on the desktop as well as the Pocket PC -- which is why I chose it.&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2002.aspx</link><pubDate>Tue, 12 Sep 2006 23:32:37 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2002</guid><dc:creator>r41n</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2002.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2002</wfw:commentRss><description>Exactly, sine the password will not be hardcoded, generated by the software nor stored in anyway, but choosen by the end user this won't be an issue. There will be always the need for a brute force attack.&lt;br&gt;That's why i'm concerned about how secure RC4 is compared to AES, which seems to be tough enough to be used to encrypt Top Secret data.&lt;br&gt;&lt;br&gt;Anyway, thank you for your help robert :)&lt;br&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2001.aspx</link><pubDate>Tue, 12 Sep 2006 20:21:35 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2001</guid><dc:creator>Robert Simpson</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2001.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2001</wfw:commentRss><description>&lt;P&gt;Given only the database, a brute force attack would have to be made.&amp;nbsp; However, a program had to create the database initially.&amp;nbsp; Your hack goes into replacing the SQLite DLL with a hacked DLL and running your program or whatever program was used to create/modify the database to begin with.&amp;nbsp; With a hacked database engine DLL and your program running and accessing the database, I can read the blocks off the disk after your program has already supplied the necessary decryption password.&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: SQLite Encryption Strength?</title><link>http://sqlite.phxsoftware.com/forums/thread/2000.aspx</link><pubDate>Tue, 12 Sep 2006 19:52:57 GMT</pubDate><guid isPermaLink="false">fa762dca-388a-4e6a-93ef-b5a7a7439be2:2000</guid><dc:creator>r41n</dc:creator><slash:comments>0</slash:comments><comments>http://sqlite.phxsoftware.com/forums/thread/2000.aspx</comments><wfw:commentRss>http://sqlite.phxsoftware.com/forums/commentrss.aspx?SectionID=4&amp;PostID=2000</wfw:commentRss><description>Ok, you're the expert, but afaik if the password ain't stored anywhere nor hardcoded (and it is not) the dll itself shouldn't be able to decrypt the database. So i don't understand how a hacker could access the db by just hijacking the dll entry point, without any brute force attacks involved. Just like WinRAR can't unpack an encrypted archive without the password.&lt;br&gt;Am i wrong?&lt;br&gt;&lt;br&gt;</description></item></channel></rss>