Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite encryption for android

i'm looking very hard for a possibility to encrypt my sqlite database on Android devices, but I was't able to find a satisfying solution.

I need something like a libary to reference, in order to have a "on the fly" encryption/decryption of my database, while using the normal sqlite functions.

I don't want to encrypt data before storing.

I don't want to encrypt the whole databasefile, in order to decrypt it before using.

I know about the following projects:

  • SEE
  • wxSQLite
  • SQLCipher
  • SQLiteCrypt
  • Botan

But I can't find any working example for this stuff.

Btw, I'm absolutly willing to purchase a commercial build, but I have to test ist before spending a few hundred dollars.

Did anyone solve this issue for his own?

like image 401
2red13 Avatar asked May 18 '11 11:05

2red13


People also ask

Can SQLite be encrypted?

SQLite doesn't support encrypting database files by default. Instead, you need to use a modified version of SQLite like SEE, SQLCipher, SQLiteCrypt, or wxSQLite3.

Is SQLite thread safe Android?

The simple answer is NO. Its not thread safe - that's it.

Can I use SQLite on Android?

Android SQLite is a very lightweight database which comes with Android OS. Android SQLite combines a clean SQL interface with a very small memory footprint and decent speed. For Android, SQLite is “baked into” the Android runtime, so every Android application can create its own SQLite databases.

What encryption does SQLite use?

SQLite has hooks built-in for encryption which are not used in the normal distribution, but here are a few implementations I know of: SEE - The official implementation. wxSQLite - A wxWidgets style C++ wrapper that also implements SQLite's encryption. SQLCipher - Uses openSSL's libcrypto to implement.


1 Answers

Try the SQLCipher port to Android instead of the regular SQLCipher.

like image 147
CommonsWare Avatar answered Oct 06 '22 02:10

CommonsWare