32
submitted 2 days ago by [email protected] to c/[email protected]

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?

top 17 comments
sorted by: hot top new old
[-] [email protected] 1 points 18 hours ago
[-] [email protected] 18 points 2 days ago

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

[-] [email protected] 11 points 2 days ago

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.

[-] [email protected] 11 points 2 days ago

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

[-] [email protected] 6 points 2 days ago* (last edited 2 days ago)

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

[-] [email protected] 5 points 2 days ago
[-] [email protected] 7 points 2 days ago
[-] [email protected] 2 points 2 days ago

For the low low price of $2000

[-] [email protected] 2 points 1 day ago* (last edited 1 day ago)

Which is a rounding error in any commercial business.

[-] [email protected] 6 points 2 days ago

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

[-] [email protected] 2 points 2 days ago
[-] [email protected] 4 points 2 days ago

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.

[-] [email protected] 2 points 2 days ago
[-] [email protected] 2 points 2 days ago

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

[-] [email protected] 2 points 2 days ago

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

[-] [email protected] 1 points 2 days ago

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.

[-] [email protected] 3 points 2 days ago

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

this post was submitted on 11 Jul 2025
32 points (92.1% liked)

Programming

21556 readers
302 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS