# Where can see the encrypted data in db after encrypting db using the SQLCipher?

**URL:** <https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696>\
**Category:** SQLCipher\
**Created:** [March 6, 2018, 12:02pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696 "2018-03-06T12:02:37Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malyadri](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Malyadri](https://discuss.zetetic.net/u/Malyadri)\
**Post date:** [March 6, 2018, 12:02pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/1 "2018-03-06T12:02:37Z")

</div>

Using the SQLCipher am able to encrypt the db. When i open the db it is asking the password, once enter the password am able to see the decrypted data. Where i can see the encrypted data.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 6, 2018, 2:58pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/2 "2018-03-06T14:58:11Z")

</div>

Hello @Malyadri

We have already responded to your private support inquiry, but in case you see this first I will provide an answer here as well. To view the raw contents of an encrypted database file, you will first need to retrieve the database file from the device/machine the file exists on. Next, you can run a tool called `hexdump` which will display the raw file content in formatted in hexadecimal. Here is an example:

```auto
hexdump -C YourDatabase.db

```

You can find more information regarding the SQLCipher design [here](https://www.zetetic.net/sqlcipher/design/). Thanks!

---

<div class="post-metadata">

**Author:** ![Usharani](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@Usharani](https://discuss.zetetic.net/u/Usharani)\
**Post date:** [March 6, 2018, 5:21pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/3 "2018-03-06T17:21:11Z")

</div>

Hi,  
We are asking about path of Encrypted file where it will store.we are able to see decrypted file after enter the password.please provide solution on this

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 6, 2018, 7:54pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/4 "2018-03-06T19:54:29Z")

</div>

Hi @Usharani

SQLCipher decrypts the contents of the file in memory to resolve the results of a SQL query, it does not create a new file with decrypted content. The location of the database itself will vary by the platform that you target and where your application stores it. If you haven’t had the opportunity, you might consider reviewing our [design](https://www.zetetic.net/sqlcipher/design/) page covering many of the technical details to SQLCipher. Thanks!

---

<div class="post-metadata">

**Author:** ![Malyadri](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@Malyadri](https://discuss.zetetic.net/u/Malyadri)\
**Post date:** [March 7, 2018, 3:56am UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/5 "2018-03-07T03:56:21Z")

</div>

Thank you. Can i run this command through Terminal?

---

<div class="post-metadata">

**Author:** ![Usharani](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@Usharani](https://discuss.zetetic.net/u/Usharani)\
**Post date:** [March 7, 2018, 9:55am UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/6 "2018-03-07T09:55:13Z")

</div>

Thank you.  
In SQLCipher site they mentioned temporary files will generate .  
Where exactly the temporary will generate.when we run out application temporary files not generated.could you share the path where it will generate.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 7, 2018, 2:03pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/7 "2018-03-07T14:03:19Z")

</div>

Hi @Malyadri

> Thank you. Can i run this command through Terminal?

Yes, as long as your terminal application has `hexdump` on the `PATH` environment variable.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 7, 2018, 2:07pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/8 "2018-03-07T14:07:27Z")

</div>

Hi @Usharani

> [@Usharani](#):
>
> In SQLCipher site they mentioned temporary files will generate .
> 
> Where exactly the temporary will generate.when we run out application temporary files not generated.could you share the path where it will generate.

The temporary files will be generated within the same directory the database file exists within. As the are temporary, you will not always see them, however inserting data into the database within a transaction will create a temporary journal file until the transaction is completed.

---

<div class="post-metadata">

**Author:** ![Usharani](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@Usharani](https://discuss.zetetic.net/u/Usharani)\
**Post date:** [March 7, 2018, 5:28pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/9 "2018-03-07T17:28:47Z")

</div>

Thank you.

1. What is the best database page size?
2. Is SQLCipher Performance same for Xamarin.Android like Xamarin.IOS.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 7, 2018, 8:23pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/10 "2018-03-07T20:23:13Z")

</div>

Hi @Usharani

> [@Usharani](#):
>
> What is the best database page size?

This question was recently answered here:

> [@After encrypting the Db using the SQLCipher, every time password is required to open the database?](https://discuss.zetetic.net/t/after-encrypting-the-db-using-the-sqlcipher-every-time-password-is-required-to-open-the-database/2698/2):
>
> Hi @Malyadri Is Password/passphrase needed every time to open the DB connection ? Yes, the password is required every time you open a connection to the database. What is the best database pagesize We generally recommend the default page size, but you are welcome to experiment with alternative sizes for your application. Keep in mind that if you use a non-standard cipher page size that migrating from major version file formats will be more cumbersome. You may benefit from reviewing our g…

> [@Usharani](#):
>
> Is SQLCipher Performance same for Xamarin.Android like Xamarin.IOS.

The performance between iOS and Android will vary depending on many factors including the hardware which is different. I recently pointed @Malyadri to our general [SQLCipher Performance](https://discuss.zetetic.net/t/sqlcipher-performance/14) guidance, I would recommend you review.

---

<div class="post-metadata">

**Author:** ![Usharani](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@Usharani](https://discuss.zetetic.net/u/Usharani)\
**Post date:** [March 8, 2018, 12:25pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/11 "2018-03-08T12:25:09Z")

</div>

The default algorithm is 256-bit AES in CBC mode (cipher and mode can be changed at run time via PRAGMA cipher, though only when using a cryptography provider that supports multiple ciphers, i.e. OpenSSL).  
Could you please explain above point clearly

---

<div class="post-metadata">

**Author:** ![Usharani](https://avatars.discourse-cdn.com/v4/letter/u/4da419/32.png) [@Usharani](https://discuss.zetetic.net/u/Usharani)\
**Post date:** [March 8, 2018, 12:26pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/12 "2018-03-08T12:26:11Z")

</div>

Each database page is encrypted and decrypted individually. The default page size is 1024 bytes but this can be adjusted at runtime to improve performance for certain query types.

This also Could please explain above point clearly.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 8, 2018, 1:56pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/13 "2018-03-08T13:56:59Z")

</div>

Hi @Usharani

> [@Usharani](#):
>
> The default algorithm is 256-bit AES in CBC mode (cipher and mode can be changed at run time via PRAGMA cipher, though only when using a cryptography provider that supports multiple ciphers, i.e. OpenSSL).
> 
> Could you please explain above point clearly

SQLCipher uses crypto providers to provide cryptographic primitives within the library. The default cipher used by the library across all commercial and enterprise platforms in currently AES-256 in CBC mode). Please note that we have deprecated the `PRAGMA cipher` command which allows runtime adjustment of the cipher used, this feature will be going away in a future SQLCipher release. You can read more about the AES cipher [here](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard).

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [March 8, 2018, 1:59pm UTC](https://discuss.zetetic.net/t/where-can-see-the-encrypted-data-in-db-after-encrypting-db-using-the-sqlcipher/2696/14 "2018-03-08T13:59:28Z")

</div>

Hi @Usharani

> [@Usharani](#):
>
> Each database page is encrypted and decrypted individually. The default page size is 1024 bytes but this can be adjusted at runtime to improve performance for certain query types.
> 
> This also Could please explain above point clearly.

The database page is the unit of encryption that occurs within SQLCipher. We provide a PRAGMA that allows this page size to be adjusted. You can read more about this setting [here](https://www.zetetic.net/sqlcipher/sqlcipher-api/#cipher_page_size).
