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

[Prep] Support for encrypting Rust stores with key data. #2265

Open
3 tasks
pixlwave opened this issue Jan 12, 2024 · 0 comments
Open
3 tasks

[Prep] Support for encrypting Rust stores with key data. #2265

pixlwave opened this issue Jan 12, 2024 · 0 comments

Comments

@pixlwave
Copy link
Member

pixlwave commented Jan 12, 2024

Description

Currently the Rust SDK expects a passphrase to encrypt the stores when creating a client. This string is run through password based key derivation (PBKDF2, with 200k iterations or so) to get a 256bits key which is fine, but for EX clients we can generate that key directly, and as pbkdf is slow by design this hurts the performance when opening the stores. Ideally we should add an API to pass the key directly.

(Related web issue: element-hq/element-web#26821)

EXI and EXA are about to implement database encryption with the passphrase for Nightly users, but we would prefer not to roll this out to everyone until the API accepts key data, otherwise we'll have to deal with 2 different types of keys going forward (we're happy for Nightly users to be signed out at some point).

Acceptance criteria

  • EXI and EXA can pass a key directly to the SDK instead of converting it to a string first.

Size estimate

M (might be small, but looking through the Rust code, there appears to be a lot of levels involved to me)

Dependencies

  • None

Out of scope

Subtasks

Android

Preview Give feedback

iOS

Preview Give feedback

Rust

Preview Give feedback

Other

Preview Give feedback
No tasks being tracked yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant