Dear all,
Maybe it's too late to add something as the last message in this thread was more than one year old!
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.
What I find:
- the whole database is protected by one unique password (passphrase)
- 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
- the encryption of the pages are done using the RC4 algorithm using a default 128 bits key size (which is quite secure if well used like in SSL) in CBC mode (Chain Bloc Cipher stream mode).
- 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 a page)
- 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.
- 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.
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.
I hope I didn't do any errors in my code analysis, and I hope Robert will correct me if this is the case!
Sebastien RAILLARD.