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

Fully deprecate MXCryptoStore #1735

Merged
merged 1 commit into from
Mar 14, 2023
Merged

Fully deprecate MXCryptoStore #1735

merged 1 commit into from
Mar 14, 2023

Conversation

Anderas
Copy link
Contributor

@Anderas Anderas commented Mar 10, 2023

Resolves element-hq/element-ios#7419

Related rust-sdk change: matrix-org/matrix-rust-sdk#1460

Until now the rust-based Crypto V2 still required access to the legacy Realm crypto database to store the following data:

  • room algorithms
  • whether to block untrusted devices per room
  • whether to block untrusted devices globally

The rust-sdk can now store this data as well (after the above PR is merged) so we can fully deprecate the MXCryptoStore in the ios sdk.

Because there are already clients in production that have migrated from legacy to rust crypto we need to consider several use cases for migration of settings:

  • new login => no realm store, so nothing to migrate
  • user in legacy crypto => we can migrate settings via the existing migrate method
  • user in rust crypto => we must only migrate room settings, but none of the other data (otherwise we could override changes in the account)

This is achieved by adding another MXCryptoVersion case and migrating in steps depending on the current version.

@Anderas Anderas force-pushed the andy/legacy_store branch 3 times, most recently from 2e6bdc3 to 3b615b7 Compare March 10, 2023 14:00
@Anderas Anderas requested review from a team, flescio and BillCarsonFr and removed request for a team March 10, 2023 14:03
@Anderas
Copy link
Contributor Author

Anderas commented Mar 10, 2023

Note that the PR will not build as i've not yet published new rust crypto framework (waiting to merge the associated PR)

@Anderas Anderas force-pushed the andy/legacy_store branch from 3b615b7 to 65f1881 Compare March 10, 2023 15:21
Copy link
Contributor

@flescio flescio left a comment

Choose a reason for hiding this comment

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

LGTM!

@Anderas Anderas force-pushed the andy/legacy_store branch 2 times, most recently from a56ec0e to 79158f7 Compare March 14, 2023 15:22
@Anderas Anderas force-pushed the andy/legacy_store branch from 79158f7 to 6ed38f6 Compare March 14, 2023 16:45
@Anderas Anderas merged commit efdf2f4 into develop Mar 14, 2023
@Anderas Anderas deleted the andy/legacy_store branch March 14, 2023 19:20
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.

Integrate room encryption store
2 participants