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

Rollout progressively the new Rust crypto SDK #901

Closed
odelcroi opened this issue Feb 12, 2024 · 6 comments
Closed

Rollout progressively the new Rust crypto SDK #901

odelcroi opened this issue Feb 12, 2024 · 6 comments
Labels
P2 Priority 2 web

Comments

@odelcroi
Copy link
Member

See : https://github.com/element-hq/element-web/blob/develop/docs/labs.md#use-the-rust-cryptography-implementation-feature_rust_crypto-in-development

This new crypto SDK is on by default but can be deployed progressively, what should we do?

@github-actions github-actions bot added the web label Feb 12, 2024
@estellecomment
Copy link
Contributor

From docs :

For administrators looking to transition existing users to the new stack, the RustCrypto.staged_rollout_percent configuration is available.
This configuration allows for a phased migration of users, represented as an integer percentage (0 to 100). By default, this value is set to 0,
which means no existing users will be migrated to the new stack. If you wish to migrate all users, you can adjust this value to 100.

This configuration should be placed under the setting_defaults section as shown:

    "setting_defaults": {
        "RustCrypto.staged_rollout_percent": 20
    },

@estellecomment
Copy link
Contributor

From comments in https://github.com/matrix-org/matrix-react-sdk/blob/v3.92.0/src/MatrixClientPeg.ts#L331
"At some point, we'll allow the user to enable the setting via labs, which will migrate their existing
// device to the rust-sdk implementation"

@estellecomment
Copy link
Contributor

Tests I made on tchap with 1.11.58 for behavior of flag :

  • add flag to disable crypto in config and test behavior
    • set flag to false : no changes in crypto (according to Aide et A propos), still olm
    • set flag to true, reload page : no changes in crypto, still olm
    • logout, login : crypto is now rust. Messages in various channels take a few seconds to arrive, but not long enough for me to do something about it.
    • set flag to false, reload page : current device stays in rust crypto.
    • logout, login (flag is still false) : crypto is back to olm

Any existing devices keep their crypto type (rust or olm), even if the server flag changes.
When the flag is true (or absent : default = true), any new logins will create a rust-crypto device.
When the flag is false, any new logins will create a olm-crypto device.

(this is exactly what the docs say, happily :) )

@odelcroi odelcroi added the P2 Priority 2 label Feb 28, 2024
@MarcWadai
Copy link
Contributor

MarcWadai commented May 27, 2024

Don't start the rollout until this issue is fix on element side: element-hq/element-web#27165

This problem has flooded our server. CPU charge of main worker works at 120% due to Element Web users in instance "social" and "finance"

@odelcroi
Copy link
Member Author

odelcroi commented Jun 4, 2024

@MarcWadai
Copy link
Contributor

MarcWadai commented Jul 22, 2024

  • Check the stats to see how many people have activated secure backup in web. To mitigate risk of messages loss during migration
  • Check no more blocking issues are open about rust crypto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority 2 web
Projects
Archived in project
Development

No branches or pull requests

3 participants