@@ -34,7 +34,13 @@ Example flow:
34344 . Bob's client prompts Bob to verify Alice's key. The prompt includes a QR
3535 code that Alice can scan (if the ` m.key.verification.request ` message listed
3636 ` m.qr_code.scan.v1 ` ), and an option to scan Alice's QR code (if the
37- ` m.key.verification.request ` message listed ` m.qr_code.show.v1 ` ).
37+ ` m.key.verification.request ` message listed ` m.qr_code.show.v1 ` ). The QR
38+ code encodes:
39+ - Bob's Matrix user ID,
40+ - Bob's keys that he wants Alice to verify (should contain at least his
41+ master cross-signing key),
42+ - what Bob thinks Alice's master cross-signing key is,
43+ - a random shared secret.
38445 . Alice scans Bob's QR code.
39456 . Alice's device ensures that:
4046 - the user ID in the QR code is the same as the expected user ID (which it
@@ -45,14 +51,22 @@ Example flow:
4551 - Alice's cross-signing key matches the cross-signing key encoded in the QR
4652 code.
4753
48- If any of these checks fail, Alice's device displays an error message.
54+ If any of these checks fail, Alice's device displays an error message
55+ indicating that the code is incorrect, and sends a
56+ ` m.key.verification.cancel ` message to Bob's device.
57+
4958 Otherwise, at this point, Alice's device has now verified Bob's key, and her
5059 device will display a message saying that all is well.
51607 . Alice's device sends a ` m.key.verification.start ` message with ` method ` set
52- to ` m.reciprocate.v1 ` to Bob (see below).
53- 8 . Upon receipt of the ` m.key.verification.start ` message, Bob's device
54- presents a button for him to press /after/ he has checked that Alice's
55- device says that things match.
61+ to ` m.reciprocate.v1 ` to Bob (see below). The message includes the shared
62+ secret from the QR code.
63+ 8 . Upon receipt of the ` m.key.verification.start ` message, Bob's device ensures
64+ that the shared secret matches, and if so, presents a button for him to press
65+ /after/ he has checked that Alice's device says that things match, and a
66+ button for him to press if Alice's device indicates that the QR code is
67+ invalid or if Alice has not yet scanned. If the shared secret does not
68+ match, it should display an error message indicating that an attack was
69+ attempted. (This does not affect Alice's verification of Bob's keys.)
56709 . Bob sees Alice's device confirm that the key matches, and presses the button
5771 on his device to indicate that Alice's key is verified.
587210 . Both devices send an ` m.key.verification.done ` message.
0 commit comments