sync a libsql encrypted database ?
i have encrypted libsql database .. is there any chance i can provide the key used and start transferring ?
See my SQLcipher integration for the WAL version of litestream. I'm using this with a Swift Vapor app backing up to S3-compatible storage.
New LTX litestream uses a different underlying SQLite driver. Dunno whether that supports SQLcipher.
So, LTX uses modernc-sqlite, and the work to add SQLcipher to it appears to be substantially more than adding to mattn-sqlite3 which the WAL version uses.
libsql uses SQLite3 Multiple Ciphers, not SQLcipher.
SQLite3 Multiple Ciphers uses SQLite's VFS mechanism, unlike SQLcipher which uses SQLite's old codec hooks. The question becomes: Does modernc-sqlite support SQLite3 Multiple Ciphers?
@benbjohnson - wanted to get your input on this one before closing or pursuing.
Current situation:
- Litestream v0.5+ uses
modernc-sqlite(pure Go SQLite) which doesn't support SQLcipher or SQLite3 Multiple Ciphers - libsql uses SQLite3 Multiple Ciphers for encryption
- The upstream issue for adding cipher support to modernc-sqlite is: https://gitlab.com/cznic/sqlite/-/issues/138
Question: Is this something worth pursuing? With AI assistance, creating a PR for the upstream modernc-sqlite project to add cipher support might be more feasible than it would have been previously. It would still be a significant undertaking, but potentially doable.
Options:
- Close as won't fix - encryption support is out of scope
- Keep open as long-term - track as dependent on upstream changes
- Actively pursue - we could attempt to contribute cipher support upstream to modernc-sqlite
What's your preference?