Secure Data Base Research for Encrypted Data (Android Platform)

We decided to conduct an analysis equal to the one in the previous post for Android platform.

Databases with encryption

We chose three fastest Databases with encryption. Our task was to test their performance and choose the one most reliable, secure and fast for our project.

The first table describes databases’ names, their encryption algorithms, profits and lisencing and some useful links.

   Database Name    License Data Encryption Method Profits Descriptions
    Realm Apache 2.0 AES-256 RxJaxa, Change Listeners link1link2how to encrypt
    Firebase       database own, not open source RNCryptor Cloud sync how-tohow-to-2
  greenDAO Apache 2.0 AES-256 RxJava what-is, The fastest DB for Android
SQLChipher own, must read AES-256 Base link

Conducting our study

We created 100 000 encrypted elements and recorded them separately in the Databases. Checked the time nedeed to perform this actions (The second column).

Then we took one element from different parts of the Databases and monitored how much time it took to show that element (depending on its location within the database). The number of an element is indicated in brackets. In order to improve the results of the study we did several tests.

Below you can see average numbers.

Database Name 100000 Items Inserting Getting from 100000 Getting from 100000
Realm 17 min 50 sec
987 ms

38 ms
(34800 item)

45 ms
(34800 item)
Realm 17 min 17 sec
968 ms
10 ms
(78800 item)
22 ms
(78800 item)
Realm 17 min 07 sec
790 ms
10 ms
(93828 item)
15 ms
(93828 item)
Realm total 17 min 25 sec
921 ms
20 ms 28 ms
GreedDao 13 min 25 sec
822 ms
63 ms
(34800 item)
49 ms
(34800 item)
GreedDao 13 min 21 sec
481 ms
43 ms
(78800 item)
45 ms
(78800 item)
GreedDao 52 ms
(93828 item)
44 ms
(93828 item)
GreedDao total 13 min 23 sec
651 ms
53 ms 46 ms
SQLiteCipher 13 min 23 sec
822 ms
54 ms
(34800 item)
48 ms
(34800 item)
SQLiteCipher 13 min 16 sec
104 ms
55 ms
(78800 item)
46 ms
(78800 item)
SQLiteCipher 14 min 09 sec
068 ms
44 ms
(93828 item)
55 ms
(93828 item)
SQLiteCipher total 13 min 36 sec
331 ms
51 ms 50 ms

An evident winner — the fastest and most suitable for the encrypted data in our project Multy.io — is Realm!

 

The research was cinducted by Igor Paliashcuk, Android Developer, Multy.io.

Leave a Reply

Your email address will not be published.