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

MXRealmCryptoStore: Make sure secrets in the DB are encrypted #1027

Merged
merged 5 commits into from
Feb 23, 2021

Conversation

manuroe
Copy link
Contributor

@manuroe manuroe commented Feb 18, 2021

Fix element-hq/element-ios#3867
Require https://gitlab.matrix.org/matrix-org/olm/-/merge_requests/17.

It embeds the realm db migration code refactoring made in #973 even if no migration is required here.

We cannot use the built-in encryption offered by Realm because it does not support multi-process. So, let's encrypt every single thing in a clear Realm db.

  • Olm data (account, megolm keys, etc). Done by using v2 pickle of OLMKit which use single global pickle key the app can store in keychain
  • Secrets used for 4S (private keys for key backup, MSDK, USK, SSK)

Copy link
Contributor

@gileluard gileluard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manuroe manuroe merged commit 2598cea into develop Feb 23, 2021
@manuroe manuroe deleted the 3867_encrypted_crypto_store_2 branch February 23, 2021 10:28
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.

Enable encryption in MXRealmCryptoStore
2 participants