-
-
Notifications
You must be signed in to change notification settings - Fork 120
Refactor securejoin #5059
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
Refactor securejoin #5059
Conversation
We either need a securejoin or autocrypt key, there are no intermediate states.
Chat-Verified is going to be useful to upgrade one-way verification to bidirectional verification.
87d844d to
c87cea4
Compare
c87cea4 to
407a2ec
Compare
|
Another one thing to remove is Secure-Join-Fingerprint header from vc-contact-confirm/vg-member-added, see 4da9e39 |
This is from PR #4345 1.107.1 which does not require The other commit from #4345 is very close to the one in this PR, the difference is that #4345 |
BTW, I don't think this will be possible to do securely: Delta Chat can't just accept a
Note that Alice (the person), does know that the end-to-end encryption is verified if Bob tells her in a second channel that he has her verified, because if Eve wants to do a MitM attack, then she has to replace the keys in both ways. |
As long as
Worst case that happens here is that Bob marks Alice as thinking that Bob's key is verified. We are not going to mark Alice's key as verified based on Chat-Verified header. But even that is not going to happen as Chat-Verified header is not signed with a verified key of Alice at this point. |
This PR cleans up Securejoin protocol to better match currently refreshed https://securejoin.readthedocs.io/ documentation.
Steps
vc-contact-confirm-receivedandvg-member-added-receivedare removed. They are not used because Bob's observing device marks Alice as verified whenvc-request-with-authis observed and by the time*-receivedmessage is observed Alice is already verified.vc-request-with-authis not deleted (HandshakeMessage::Ignoreinstead ofHandshakeMessage::Done) from the server on receival, so it is observable.Unused
PeerstateVerifiedStatusenum is removed. I plan to reintroduce the concept of bidirectional verification in next PRs by storing the fingerprint of the key we think Alice has as verified rather than just marking Alice as bidirectionally verified. Public API is just going to tell if green checkmark is to be displayed, so nothing is going to change for UIs.Chat-Verifiedheaders are now sent in verified 1:1 chat. I plan to use it later to upgrade one-way verification to two-way verification.Securejoin processing is factored out of
add_partsand centralized, both primary device and observing device paths are next to each other now.add_partsis not even called for most messages, we simply create a single tombstone inmsgstable manually.