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

Use Plaintext Header for SQLite #1054

Merged
merged 18 commits into from
Sep 12, 2024
Merged

Use Plaintext Header for SQLite #1054

merged 18 commits into from
Sep 12, 2024

Conversation

insipx
Copy link
Contributor

@insipx insipx commented Sep 11, 2024

Closes #1029

  • adds new struct/file EncryptedConnection that customizes the SQLite3 connection for SqlCipher & WAL mode
  • SQLCipher salt is stored in a file next to sqlite3 db, in sqlite3.db3.sqlcipher_salt
  • Adds lots more validation around SqlCipher connections
  • removes some unused dependencies found with cargo machete
  • tests for sqlcipher plaintext header

Would like to hear what people think about how the salt is stored -- open to suggestions on any better ways. Maybe the SDK can pass a file in? how it is now creates problems if the database file is moved/renamed/etc, but it should be clear the salt needs to be paired with it in the same directory.

Copy link

graphite-app bot commented Sep 11, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@insipx insipx marked this pull request as ready for review September 11, 2024 21:38
@insipx insipx requested a review from a team as a code owner September 11, 2024 21:38
@insipx insipx requested a review from a team September 11, 2024 21:38
@insipx insipx marked this pull request as draft September 11, 2024 21:46
@insipx insipx removed request for a team September 11, 2024 21:46
@insipx insipx marked this pull request as ready for review September 12, 2024 02:44
@insipx insipx requested review from a team September 12, 2024 13:33
@insipx insipx enabled auto-merge (squash) September 12, 2024 17:41
@insipx insipx merged commit 6b7a163 into main Sep 12, 2024
9 checks passed
@insipx insipx deleted the insipx/plaintext-header-sqlite branch September 12, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use cipher_plaintext_header_size option for SQLCipher on iOS
2 participants