# SQLCipher Commerial

**URL:** <https://discuss.zetetic.net/t/sqlcipher-commerial/4876>\
**Category:** SQLCipher\
**Created:** [March 14, 2021, 3:23pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876 "2021-03-14T15:23:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellipse](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@ellipse](https://discuss.zetetic.net/u/ellipse)\
**Post date:** [March 14, 2021, 3:23pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/1 "2021-03-14T15:23:38Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/2X/4/48df5b4601076c7523c539d58ceea42a3a9de3b8.png)  
I have read this page about the value\_level encrytion!  
we know that SQLCipher database can be open with SQLite，it means that the attacker can copy one SQLCipher database and use SQLite to delete or update the original SQLCipher database.That’s right?

---

<div class="post-metadata">

**Author:** ![wgray](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/wgray/32/843_2.png) [@wgray](https://discuss.zetetic.net/u/wgray)\
**Post date:** [March 15, 2021, 2:40pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/2 "2021-03-15T14:40:46Z")

</div>

> [@ellipse](#):
>
> we know that SQLCipher database can be open with SQLite

No, it cannot. SQLite has no ability to decrypt an encrypted SQLCipher database, and regardless, even if it did, it would need the key material/password from you to do so.

> it means that the attacker can copy one SQLCipher database and use SQLite to delete or update the original SQLCipher database

No, that’s not the case, for the reason mentioned above.

---

<div class="post-metadata">

**Author:** ![wgray](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/wgray/32/843_2.png) [@wgray](https://discuss.zetetic.net/u/wgray)\
**Post date:** [March 16, 2021, 5:42pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/3 "2021-03-16T17:42:14Z")

</div>

Hello @ellipse,

After discussing it with the rest of the team, I thought I should provide a little more information to better answer your question and clarify the situation.

So, in the case of a database that is fully-encrypted by SQLCipher, that database cannot be opened by SQLite.

In the case of a database created by SQLCipher that is not fully-encrypted, but uses [the VLE features of SQLCipher](https://www.zetetic.net/sqlcipher/value-level-encryption/) to encrypt part of the data like a table, that database _can_ be opened up by SQLite, and SQLite could modify that database, for instance by updating or deleting the encrypted table. However, it would not be able to decrypt any of that encrypted data. If SQLite were used to modify or tamper with that encrypted data, it would then fail to decrypt when subsequently accessed by SQLCipher.

If access to and the integrity of the database file while using VLE features is a concern, it would be a good idea to also employ SQLCipher’s full-database encryption with a separate key.

Please let us know if you have any other questions!

---

<div class="post-metadata">

**Author:** ![ellipse](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@ellipse](https://discuss.zetetic.net/u/ellipse)\
**Post date:** [March 17, 2021, 1:01am UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/4 "2021-03-17T01:01:53Z")

</div>

Thanks for your answer!

---

<div class="post-metadata">

**Author:** ![ellipse](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@ellipse](https://discuss.zetetic.net/u/ellipse)\
**Post date:** [March 17, 2021, 1:17pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/5 "2021-03-17T13:17:19Z")

</div>

I think this is a problem need to solve for VLE!

---

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [March 17, 2021, 7:23pm UTC](https://discuss.zetetic.net/t/sqlcipher-commerial/4876/6 "2021-03-17T19:23:03Z")

</div>

Hello @ellipse - Thanks for the feedback. The scenario you described isn’t a problem that VLE is intended to solve. VLE provides secure encapsulation of data values. Thus, the scope of integrity checking is on the individual value itself (i.e. a single column value), not the database. If you need to ensure integrity of the entire database then Full Database Encryption is the appropriate choice. It is also worth noting that these can be combined, so if you’re requirements called for it you could use Full Database encryption with one key, and then VLE inside of an encrypted database with one or more separate keys.
