Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Securing SQLite DB

102 views
Skip to first unread message

Alexandru

unread,
Feb 17, 2021, 5:35:32 AM2/17/21
to
When it comes to securing an SQLite DB against unwanted access, I thought it would be enough to set a password on the DB file.

Now I see there is SQLCipher package https://www.zetetic.net/sqlcipher/documentation/ that encrypts the DB file.

I don't know, if SQLCipher is available under Tcl but just a principle question: How sage is setting a password on the DB file?

Thanks
Alexandru

Rich

unread,
Feb 17, 2021, 9:01:32 AM2/17/21
to
Alexandru <alexandr...@meshparts.de> wrote:
> When it comes to securing an SQLite DB against unwanted access, I
> thought it would be enough to set a password on the DB file.

How are you setting a password on a sqlite file?

As far as I know, absent use of some extension, standard sqlite has no
"password" support.

Alexandru

unread,
Feb 17, 2021, 9:06:06 AM2/17/21
to
Good question. I thought I read something about it a few years ago.
If it's wrong, then that explains the SQLCipher package.
Is there a standard package known that wroks best within Tcl?

Rolf Ade

unread,
Feb 17, 2021, 11:38:39 AM2/17/21
to

Alexandru <alexandr...@meshparts.de> writes:
> When it comes to securing an SQLite DB against unwanted access, I thought it would be enough to set a password on the DB file.

There's nothing in the public domain sqlite that allows to set a
password on the DB file to prevent unlegitimate access, AFAIK.

Though, there is the SQLite Encryption Extension by Richard Hipp
himself. It's not free software.

See https://www.sqlite.org/see/doc/release/www/index.wiki

rolf

Thomas Schnurrenberger

unread,
Feb 17, 2021, 12:00:40 PM2/17/21
to
On 17.02.2021 11:35, Alexandru wrote:
> When it comes to securing an SQLite DB against unwanted access, I thought it would be enough to set a password on the DB file.

The SQLite3 Multiple Ciphers project looks quite promising.
As far as I know, it can be used with the Tcl Sqlite3 extension.

See https://utelle.github.io/SQLite3MultipleCiphers/

--
Thomas

Alexandru

unread,
Feb 17, 2021, 8:11:04 PM2/17/21
to
Thank you all for the great answers.
I'm looking for something open source.
The link provided by Thomas Schurrenberger does look promissing though it needs compilation.
Suppose I mange to compile the library, how to get it work with Tcl?

blacksqr

unread,
Feb 19, 2021, 5:07:40 PM2/19/21
to
On Wednesday, February 17, 2021 at 4:35:32 AM UTC-6, Alexandru wrote:
> Now I see there is SQLCipher package https://www.zetetic.net/sqlcipher/documentation/ that encrypts the DB file.
>
> I don't know, if SQLCipher is available under Tcl but just a principle question: How sage is setting a password on the DB file?

In my experience, the SQLCipher package works very well. It's open source, and the Tclsqlite extension compiles by default along with the rest of the package, so you can load it into a Tcl interpreter and get right to work. Working with it in Tcl is seamless once you execute the few encryption PRAGMAs
0 new messages