SQLite Forum

Encryption
Login

Encryption

(1) By Daniel Steigerwald (steida) on 2024-02-21 12:18:46 [link] [source]

One of my customer needs encryption, is something like libSQL encryption planned?

https://blog.turso.tech/fully-open-source-encryption-for-sqlite-b3858225

(2) By Richard Hipp (drh) on 2024-02-21 12:23:40 in reply to 1 [link] [source]

The SQLite Encryption Extension is a product that has been available since 2007. SEE is found in consumer products that you likely use every day. Sales of the SQLite Encryption Extension is one of the ways that we fund this project.

(3) By Simon Slavin (slavin) on 2024-02-22 16:22:37 in reply to 1 [link] [source]

As well as the official answer, which DRH gave, there are other solutions.

SQLCipher: 256-bit AES encryption, open source.

https://www.zetetic.net/sqlcipher/

SQLite3 Multiple Ciphers:

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

A single library which can call many different encryption systems, including the above SQLCipher.

You can probably find other systems using a web search. Sorry, I don't keep up with them all.

DRH's solution SEE has the best support since it is maintained by the same team that developed SQLite itself. If you find anything unexpected, they have all the source code to everything involved, and a very good knowledge of how things work.

(4) By Stephan Beal (stephan) on 2024-02-22 17:18:49 in reply to 3 [link] [source]

DRH's solution SEE has the best support since it is maintained by the same team that developed SQLite itself.

There's a slight caveat worth mentioning here: if Daniel is interested in using it with WASM (which is my suspicion, as he has actively researched browser-side use of sqlite in the past), the SEE license is incompatible with a WASM distribution.

SEE's license prohibits distribution of SEE in a form which clients can then copy and re-use on their own, and that restriction is apparently impossible to impose in a browser-based (as opposed to server-side) WASM build. Anyone who visits a page with a WASM build of SEE could download it and (perhaps with a little bit of de/re-compilation) embed it into their own apps.

(5) By Daniel Steigerwald (steida) on 2024-02-23 10:58:51 in reply to 4 [link] [source]

Thank you for the clarification. So even if I would like to buy it, I can’t. I got it.

(6) By Aloys (aloys) on 2024-02-23 13:40:46 in reply to 5 [source]

The Open Source encryption extension SQLit33 Multiple Ciphers mentioned in Simon Slavin's post supports WASM - as described here: SQLite3 Multiple Ciphers for WASM. The latest release even contains a precompiled WASM binary.