-
Notifications
You must be signed in to change notification settings - Fork 258
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
Secret storage support in the main crate #2621
Conversation
dc7ea73
to
7ac24eb
Compare
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.
I like this PR. The code is clean, there is plenty of doc', really good job.
I believe that it may be useful to be able to remove a secret from the store though. What do you think?
cd84f74
to
11342f7
Compare
cda9ed1
to
ae5b3a2
Compare
11342f7
to
a2c6954
Compare
e351222
to
9aaba44
Compare
a2c6954
to
2dd385a
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2621 +/- ##
========================================
Coverage 81.35% 81.36%
========================================
Files 204 207 +3
Lines 21051 21172 +121
========================================
+ Hits 17126 17226 +100
- Misses 3925 3946 +21
☔ View full report in Codecov by Sentry. |
680f0ee
to
821b140
Compare
f81fb48
to
7ff4592
Compare
I rebased this now and changed the base branch to #2758. |
f96590e
to
107bdc7
Compare
7ff4592
to
a45f575
Compare
a45f575
to
0bfd13e
Compare
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.
Discussed on a call with poljar out-of-band. Left some minor comments and suggestions but this otherwise looks really good. There is one important suggestion, which is a zeroization fix.
After the suggestions are resolved, LGTM.
crates/matrix-sdk/src/encryption/secret_storage/secret_store.rs
Outdated
Show resolved
Hide resolved
acf4b02
to
9c60e32
Compare
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.
Some suggestions.
EDIT: It seems that Github is bugged and has eaten my suggestions alive :(
9c60e32
to
371c546
Compare
371c546
to
38e10db
Compare
Sorry this is taking too long. If you still remember the suggestions feel free to provide them as a patch. |
This PR utilizes the cryptographic primitives for secret storage support introduced in #2591, and adds a convenient and easy to use API on top of it. As such, this PR depends on #2591.
We're now able to import the private cross-signing keys and verify our own device by entering the secret storage key or passphrase.
The PR should be reviewed commit by commit. An example, in case somebody wants to play around with this as part of the review, is provided as well.