-
Notifications
You must be signed in to change notification settings - Fork 269
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
indexeddb: expose new method IndexeddbCryptoStore::open_with_key
#3423
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3423 +/- ##
==========================================
- Coverage 82.97% 82.96% -0.01%
==========================================
Files 246 246
Lines 25022 25029 +7
==========================================
+ Hits 20761 20765 +4
- Misses 4261 4264 +3 ☔ View full report in Codecov by Sentry. |
Allow applications which already have a cryptographically-secure key to avoid PBKDF, by passing that key in directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of nits, looks good otherwise.
Co-authored-by: Damir Jelić <[email protected]> Signed-off-by: Richard van der Hoff <[email protected]>
Part of a resolution to element-hq/element-web#26821: allow applications to skip the PBKDF2 operation if they already have a cryptographically secure key.
In order to maintain compatibility for existing element-web sessions, if we discover that we have an existing store that was encrypted with a key derived from PBKDF2, then we reconstruct what element-web used to do: specifically, we base64-encode the key to obtain the "passphrase" that was previously passed in. If that matches, we know we've got the right key, and can update the meta store accordingly.