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

4S | Improve error feedback when users enters an incorrect Recovery Key by using the 4S key encryption key checks #27458

Open
BillCarsonFr opened this issue May 10, 2024 · 0 comments
Labels
A-E2EE A-E2EE-Key-Backup A-Element-R Issues affecting the port of Element's crypto layer to Rust S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement

Comments

@BillCarsonFr
Copy link
Member

As per spec: When adding a new key to the secret storage the client must encrypt a "zero"/dummy secret to allow for key checks.

Currently web is not using that information. That means that when we need to access the 4S we directly try to decrypt the secret without first checking if the key is correct.

For example if you try to import megolm keys from backup on a session that has not the key in cache, it will ask for the 4S recovery key, and if you enter a wrong key the current error is quite generic:
image
(this is an error due to fail to decrypt the master key secret)

Doing so could allow us to return a better error to the user.

Ref: https://github.com/element-hq/crypto-internal/issues/180
Ref: #26721

@dosubot dosubot bot added A-E2EE S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement labels May 10, 2024
@richvdh richvdh added the A-Element-R Issues affecting the port of Element's crypto layer to Rust label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-E2EE-Key-Backup A-Element-R Issues affecting the port of Element's crypto layer to Rust S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants