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

[Feature] encrypted local SQLite database. #14

Closed
sunhuachuang opened this issue Jan 7, 2022 · 2 comments
Closed

[Feature] encrypted local SQLite database. #14

sunhuachuang opened this issue Jan 7, 2022 · 2 comments

Comments

@sunhuachuang
Copy link
Member

sunhuachuang commented Jan 7, 2022

What ?

Encrypted local SQLite database.

Why ?

Encrypted everywhere.

How ?

  • use sqlcipher to handle SQLite. use rusqlite and features bundled-sqlcipher-vendored-openssl. (better for cross-compile)
  • update tdn_storage API. use open(path: PathBuf, password: &str)
  • update ESSE
    • account.db: use device's local secret (every device drive it randomly when first launch) to encrypt/decrypt.
    • account's database: use user encrypt key (which is encrypted by user's PIN and secret) to encrypt/decrypt.
@sunhuachuang
Copy link
Member Author

If you find any security risk, welcome to report.

sunhuachuang added a commit that referenced this issue Jan 7, 2022
@sunhuachuang
Copy link
Member Author

LGTM.

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

No branches or pull requests

1 participant