Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to SQLCipher cipher #893

Open
penberg opened this issue Jan 12, 2024 · 2 comments
Open

Switch to SQLCipher cipher #893

penberg opened this issue Jan 12, 2024 · 2 comments
Labels
encryption at rest enhancement New feature or request question Further information is requested

Comments

@penberg
Copy link
Collaborator

penberg commented Jan 12, 2024

We integrated https://github.com/utelle/SQLite3MultipleCiphers into the libSQL source tree, but we should really pick one cipher and stick to that. The best one seems to be SQLCipher.

@penberg penberg added enhancement New feature or request question Further information is requested encryption at rest labels Jan 12, 2024
@utelle
Copy link

utelle commented Jan 22, 2024

We integrated https://github.com/utelle/SQLite3MultipleCiphers into the libSQL source tree, but we should really pick one cipher and stick to that. The best one seems to be SQLCipher.

Which cipher is the best is debatable. It depends on the goals you want to fulfill - compatibility with SQLite tools and/or applications, speed ...

Actually, PR #894 does NOT select SQLCipher, but wxSQLite3 AES 256.

Under security aspects you should reconsider your decision: you should choose one of the cipher schemes SQLCipher, ChaCha20, or Ascon128, if you don't want to add the ability to choose the cipher scheme at runtime. Use SQLCipher, if you want compatibility with other tools and applications, ChaCha20 if you want speed, or Ascon128 if you want high speed and the smallest amount of additional code.

@linear linear bot changed the title Switch to SQLCipher cipher for encryption at rest? Switch to SQLCipher cipher Feb 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 19, 2024
…1038)

* libsql: Make encryption cipher configurable

Introduce a `EncryptionConfig` struct to configure both encrytion cipher
and key. Needed to support multiple ciphers.

Fixes #951

* libsql-ffi: Switch to SQLCipher as the default cipher

Fixes #893
@linear linear bot closed this as completed Mar 28, 2024
@penberg
Copy link
Collaborator Author

penberg commented Mar 28, 2024

Linear bot was overly eager, reopening.

@penberg penberg reopened this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encryption at rest enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants