SQLite alternative with encryption
from Zenlix@lemmy.ml to programming@programming.dev on 11 Jul 23:42
https://lemmy.ml/post/33032204

I am searching for an SQL lite alternative that implements encryption more or less or of the box and has rust bindings. Do you know of any database systems that fulfill that requirement?

#programming

threaded - newest

undefined@lemmy.hogru.ch on 11 Jul 23:56 next collapse

Depending on the application could you just mount a filesystem that supports encryption? Even if it’s just mounting a .tar file.

genau@europe.pub on 11 Jul 23:57 next collapse

Well, sqlite

yardy_sardley@lemmy.ca on 12 Jul 00:34 collapse

For the low low price of $2000

iamtherealwalrus@lemmy.world on 13 Jul 18:52 collapse

Which is a rounding error in any commercial business.

WhatAmLemmy@lemmy.world on 12 Jul 00:12 next collapse

Encryption is usually implemented in the server or client code. Why do you want the database to handle encryption?

Zenlix@lemmy.ml on 12 Jul 08:31 collapse

It is for as desktop app that stores data on a user drive.

WhatAmLemmy@lemmy.world on 12 Jul 11:17 collapse

Then the application should encrypt the data saved to the db.

I can’t think of any scenario where it would make sense for the db to handle encryption.

Zenlix@lemmy.ml on 12 Jul 15:02 collapse

Encryping by the application would kill the use of a lot of sql features such as SUM.

capuccino@lemmy.world on 12 Jul 00:34 next collapse

The application encrypts the data, you save in the database the data encrypted. When you retrieve the info, the app decrypt it.

deegeese@sopuli.xyz on 12 Jul 02:43 collapse

This makes it impossible to support any analytical SQL queries against the DB. Look into how to enable encryption at rest on whichever DB you choose.

TootSweet@lemmy.world on 12 Jul 02:45 collapse

So put an SQLite database on a Luks-encrypted partition or a Luks-encrypted filesystem in a file.

bacon_pdp@lemmy.world on 12 Jul 00:37 next collapse

Use an encryption library to decrypt the database in memory and encrypt it prior to writing it to disk. Assuming that you are not afraid of data loss due to power loss; that would be the most secure option and it works with the standard SQLite library

Or if you need more fault tolerance. The SQLite Encryption Extension (SEE) will read and write database files encrypted using 128-bit or 256-bit AES.

vane@lemmy.world on 12 Jul 02:01 next collapse

github.com/utelle/SQLite3MultipleCiphers/

treadful@lemmy.zip on 12 Jul 05:46 next collapse

SQLCipher fits that bill. I had some issues with language integration but depending on what you’re using it might work for you.

fubarx@lemmy.world on 12 Jul 06:15 next collapse

Turso: docs.turso.tech/libsql#encryption-at-rest

Also, DuckDB devs said it was planned: github.com/duckdb/duckdb/discussions/4512

postall@lemmy.world on 12 Jul 12:15 next collapse

Firebird: 13.8. Database Encryption firebirdsql.org/…/fblangref30-security-dbcrypt.ht…

hector@sh.itjust.works on 14 Jul 02:43 collapse

github.com/Tencent/wcdb

Using SQLCipher :)