-
-
Notifications
You must be signed in to change notification settings - Fork 119
[WIP] feat: Securejoin v3, encrypt all securejoin messages #7754
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
base: main
Are you sure you want to change the base?
Conversation
59957ed to
ef97a7e
Compare
807b8c4 to
afb7e2a
Compare
| Ok(secret) | ||
| }) | ||
| .await?; | ||
| secrets.extend(token::lookup_all(context, token::Namespace::Auth).await?); |
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.
TODO use a new table rather than reusing AUTH token. Sort it by id DESC, in order to try the most recently generated token first.
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.
Actually, not sure if that's worth it.
We need to be able to look up existing AUTH tokens in case someone scans a QR code that was generated before the upgrade. So, token::exists would need to check both tables.
At this point, the question is, why make a new table at all.
…rt() and set_content_type_to_encrypted() functions
afb7e2a to
81f79a9
Compare
Close #7396
TODO:
auth_tokenstable with a proper UNIQUE bound, or put a UNIQUE bound on thetokenstablerequest-pubkeyrather thanrequestandpubkeyrather thanauth-required- Could be done in a follow-upBackwards compatibility:
Everything works seamlessly in my tests. If both devices are updated, then the new protocol is used; otherwise, the old protocol is used. If there is a not-yet-updated second device, it will correctly observe the protocol, and mark the chat partner as verified.