About to know that Table-Level Encryption is possible in SQLite or not.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

About to know that Table-Level Encryption is possible in SQLite or not.

crest iOS
Hi Sir,

I want to know that Table-Level Encryption is possible in SQLite or not.

Thanks,
Sachin Patil
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: About to know that Table-Level Encryption is possible in SQLite or not.

Richard Hipp-3
On 2/12/18, crest iOS <[hidden email]> wrote:
> Hi Sir,
>
> I want to know that Table-Level Encryption is possible in SQLite or not.
>

The SQLite Encryption Extension [1] encrypts an entire database.
There is no option to encryption some tables and not others.  This is
because SEE operates at the pager layer and the pager does not know
what table a particular page belongs to.

But what you can do is separate your data into two separate database
files.  One file is encrypted and the other is not.  Then open your
database connection on the unencrypted file and ATTACH the encrypted
file, or vice versa.  SQLite does allow connections where there are
multiple attached databases, some of which are encrypted and others
not.

[1] https://www.hwaci.com/sw/sqlite/see.html

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: About to know that Table-Level Encryption is possible in SQLite or not.

Simon Slavin-3
In reply to this post by crest iOS


On 12 Feb 2018, at 8:03am, crest iOS <[hidden email]> wrote:

> I want to know that Table-Level Encryption is possible in SQLite or not.

It is a bad idea to do table-level encryption in SQLite because indexes are stored separately from the table.  Your data in the table might be encrypted but data in index columns would be stored in plaintext.

Encryption in SQLite is usually done over the entire databases and encrypts not only the data but the names of the tables and other information.

For one method of database encryption please see

<https://www.hwaci.com/sw/sqlite/see.html>

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users