Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android encrypt/decrypt sqlite database 100% secure

I am a new born baby in android security point of view. What I am trying to do is encrypt/decrypt Sqlite Database.

I have gone through multiple tutorial but nothing seems to work.I have gone through Sql Cipher link but here I code and I am getting issue given below:

Type Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lnet/sqlcipher/AbstractCursor$SelfContentObserver;

Also I don't need password protected file. I have use Cipher default class that Android library provide like below:

Cipher c = Cipher.getInstance("RSA");
            c.init(Cipher.ENCRYPT_MODE, privateKey);

But I doesn't find it secure. I suppose it can be decrypt by hackers. I need proper 100% encryption and decryption security of Sqlite Database.

like image 937
Santosh Kat Avatar asked Apr 20 '15 11:04

Santosh Kat


1 Answers

SQL Lite is a lightweight database system.Having said that it also has few hacks possible into the system to make it encrypted OR password protected. Here are few of them which I know :-

  1. SEE: The SQLite Encryption Extension (SEE) is an add-on to the public domain version of SQLite that allows an application to read and write encrypted database files. Four different encryption algorithms are supported:

    RC4

    AES-128 in OFB mode

    AES-128 in CCM mode

    AES-256 in OFB mode

  2. WxSQLite: A wxWidgets style c++ wrapper that also implements SQLite's encryption.

3.SQLCipher - SQLCipher has a small footprint and great performance so it’s ideal for protecting embedded application databases and is well suited for mobile development.

Personally I recommend as per your needs SQLCipher is the best one to go for.I have tried it.Its highly recommended Open-Source System.

like image 129
Chiradeep Avatar answered Sep 27 '22 18:09

Chiradeep