-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Bidirectional verification #5089
Conversation
0be7d58
to
0b5801e
Compare
0b5801e
to
5891fc5
Compare
8522b8c
to
c09e0e2
Compare
ae510f7
to
ba1c98c
Compare
2cb0335
to
562e59b
Compare
851739e
to
b2207e8
Compare
562e59b
to
10be15a
Compare
f88326d
to
c7d9eeb
Compare
10be15a
to
b2849b7
Compare
c7d9eeb
to
462f29f
Compare
b2849b7
to
74874de
Compare
462f29f
to
721e6ee
Compare
74874de
to
da8b5ee
Compare
721e6ee
to
bbff5e5
Compare
da8b5ee
to
38dd6f6
Compare
bbff5e5
to
3107a36
Compare
38dd6f6
to
42423ed
Compare
3107a36
to
d9621bc
Compare
42423ed
to
0207ffb
Compare
d9621bc
to
a02463b
Compare
The point of this PR is to split up verification into forward verification (i.e. I verified my contact) and backward verification (i.e. I think that my contact verified me). Leaving away the backward verification now would introduce new bugs; sure, we don't know how bad these bugs would be in practice, but I don't really want to try it out. E.g. if I have no indication that a contact verified me, then I shouldn't just add them to a verified group. Sure, sometimes this information is stale, but in many cases it's not. And as discussed in #4932, it would be nice to let QR codes expire; in this case, it will be nice that Bob can do a one-sided verification if he already knows Alice's key. TL;DR: I do think that we need backward verification, and this PR looks fine overall, even though I didn't have time for a detailed review. |
I'd not call it "bugs", but "probability of unwanted behaviour". I just worry that the backward verification may be restrictive and sometimes stay on the way of secure communication. E.g. impossibility of adding a contact to some chat if we missed a verification message. E.g. not showing a green checkmark when we actually can trust the contact (this may stop the user from communicating with the contact). But if we're ok with all this, then the only question remains for me:
So, from now we need to wait for any message from gossip-verified Alice to be sure we're backward-verified. Before this, Alice will be shown to us w/o a green checkmark (while being in the same protected chat), so we even can't contact them safely (at least we would think so). |
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.
Sorry, I'm still not fully done reviewing, but I'm almost through and don't think I will find anything else (what's left is verifying that the refactorings didn't introduce any accidental changes) - from my side, only #5089 (comment) ("This will break compatibility...") is actually a blocker, the others are more nice-to-haves.
9289de6
to
c2df003
Compare
This is really ready for review, would like to merge soon so we have time to test it before next release. |
The only question remaining for me -- if Alice adds Bob to a protected chat with Claire so that they become gossip-verified for Bob, what are we going to have as compared to the current behaviour? Can Bob safely communicate to Claire? I think that yes, but how the user should know that? |
See |
Mark 1:1 chat as verified as soon as Alice is forward-verified so Bob can already start sending Chat-Verified headers. This way Alice and Bob can scan each other's QR codes and even if all Secure-Join headers are dropped from the network, still get forward verifications via QR-code scans and backward verifications via Chat-Verified messages in 1:1 chat.
21084c4
to
20065d3
Compare
This PR separates the concepts of "forward verification" (moving the key into
verified_key
slot of the peerstate) and "backward verification" (getting an indication that contact has verified our key by receiving aChat-Verified
header,vc-contact-confirm
message orvc-request-with-auth
message).Forward verification is now set when fingerprint is checked. Bob forward-verifies Alice when
{vc,vg}-request-with-auth
is received or immediately after scanning the QR code when taking a shortcut.Bob sets backward verification when
vc-contact-confirm
is received orvg-member-added
adding Bob by Alice is received. This is not supposed to be secure, tricking Bob into believing that Alice has correct verified key for Bob is not very interesting. Backward verification is also set when a message with aChat-Verified
header is received to opportunistically recover from the case whenvc-contact-confirm
/vg-member-added
is lost, but in general Bob should just rescan if green checkmark did not appear.Alice sets both forward and backward verification when
{vc,vg}-request-with-auth
is received.Closes #1177
Closes #5062
Replaces #4914