Skip to content
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

MSC2366: Key verification flow additions: m.key.verification.ready and m.key.verification.done #2366

Merged
merged 9 commits into from
Jan 31, 2021

Conversation

uhoreg
Copy link
Member

@uhoreg uhoreg commented Nov 25, 2019

@turt2live turt2live changed the title initial proposal of m.key.verification.accept MSC2336: Initial proposal of m.key.verification.accept Nov 25, 2019
@turt2live turt2live added the proposal A matrix spec change proposal label Nov 25, 2019
@uhoreg uhoreg changed the title MSC2336: Initial proposal of m.key.verification.accept MSC2336: Key verification flow addition: m.key.verification.accept Nov 25, 2019
Copy link
Contributor

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

proposals/2366-key-verification-accept.md Outdated Show resolved Hide resolved
proposals/2366-key-verification-accept.md Outdated Show resolved Hide resolved
@turt2live turt2live self-requested a review November 26, 2019 18:02
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems sensible

@turt2live turt2live changed the title MSC2336: Key verification flow addition: m.key.verification.accept MSC2336: Key verification flow addition: m.key.verification.ready Nov 29, 2019
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this MSC could do with a TL;DR as I'm failing to parse how the new event type helps achieve the "more experienced user helping the less experienced user" story.

Could you put in a quick example of this please?

@uhoreg
Copy link
Member Author

uhoreg commented Dec 4, 2019

@anoadragon453 I've added an example.

@turt2live turt2live changed the title MSC2336: Key verification flow addition: m.key.verification.ready [WIP] MSC2336: Key verification flow addition: m.key.verification.ready Dec 7, 2019
@turt2live turt2live added the kind:core MSC which is critical to the protocol's success label Apr 20, 2020
@uhoreg uhoreg changed the title [WIP] MSC2336: Key verification flow addition: m.key.verification.ready [WIP] MSC2336: Key verification flow additions: m.key.verification.ready and m.key.verification.done Apr 22, 2020
@uhoreg uhoreg changed the title [WIP] MSC2336: Key verification flow additions: m.key.verification.ready and m.key.verification.done MSC2336: Key verification flow additions: m.key.verification.ready and m.key.verification.done Apr 22, 2020
@uhoreg
Copy link
Member Author

uhoreg commented Apr 22, 2020

@mscbot fcp merge

@mscbot
Copy link
Collaborator

mscbot commented Apr 22, 2020

Team member @richvdh has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • what about existing clients?

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added disposition-merge proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. labels Apr 22, 2020
@uhoreg uhoreg changed the title MSC2336: Key verification flow additions: m.key.verification.ready and m.key.verification.done MSC2366: Key verification flow additions: m.key.verification.ready and m.key.verification.done Apr 23, 2020
proposals/2366-key-verification-accept.md Outdated Show resolved Hide resolved
and in to-device messages to accept verifications requested using an
`m.key.verification.request` event.

The second event type is `m.key.verification.done`, which has no fields other
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long should the other client wait until it receives a done, as old clients won't send that? The normal timeout of 10min sounds pretty long.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same question. Riot doesn't send this, when you are not verifying in DMs it seems. So we kinda need a behaviour for the transition phase, when a client follows the current spec.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely should be sent in DMs.
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you are not verifying in DMs

It seems to be only sent, when verifying via DMs. So it seems like it is not sent in to_device messaging. This proposal suggests, that clients would be sending them already, but they don't. Unless I am missing something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. I read your sentence several times, and managed to miss the "not" every time. :-/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried in Element Web in a non-DM self-verification, and it does send an m.key.verification.ready in response to m.key.verification.request. Trying to directly verify another user's device seems to send an m.key.verification.start directly, so it is not affected by this case.

I haven't tried Element Android or Element iOS yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that matches my tests as well. It can deal with request, but if you start it from Element, it uses start (for to_device verifications).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested Element Web, and it sent an m.key.verification.done after verifying using to-device. I haven't tested Android or iOS. In response to the original question in this thread:

How long should the other client wait until it receives a done, as old clients won't send that?

I think that we're at the point where we don't need to worry about "old" clients (it looks like Element is doing this, and just waiting until the normal timeout), but if you do want to worry about old clients, you could 1) wait for the .done, but allow the user to exit the verification UI, or 2) exit the verification UI once it's completed on your side, without waiting for the .done to come in from the other user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does element-web also send a .done if you don't initiate verification via popup but via the device menu on the right? The device menu on the right also skips the .request and starts directly with a .start, so yeah

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I tested initialting verification both via the popup and via the device menu. In both situations, it sent the .done in my tests. (I also noticed that initiating from the device menu skipped the .request step.)

`m.key.verification.start` event to begin the verification. If both parties
send an `m.key.verification.start` event, and they both specify the same
verification method, then the event sent by the user whose user ID is the
lexicographically smallest is used, and the other `m.key.verification.start` event is ignored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not immediately obvious that this algorithm solves the glare proble. I think it is robust, but when it lands in the specit would be good to clairify exactly what "used" means here, and to add some walk throughs and/or sequence diagrams.

@richvdh richvdh added this to Awaiting FCP ticks in Spec Core Team Backlog Sep 10, 2020
@anoadragon453 anoadragon453 added this to Ready for FCP ticks in Spec Core Team Backlog Sep 11, 2020
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An implementation of this proposal is currently available in Element Web.

LGTM.

@mscbot
Copy link
Collaborator

mscbot commented Jan 26, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@mscbot mscbot added final-comment-period This MSC has entered a final comment period in interest to approval, postpone, or delete in 5 days. and removed proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. labels Jan 26, 2021
@anoadragon453 anoadragon453 moved this from Ready for FCP ticks to In FCP in Spec Core Team Backlog Jan 26, 2021
@mscbot
Copy link
Collaborator

mscbot commented Jan 31, 2021

The final comment period, with a disposition to merge, as per the review above, is now complete.

@mscbot mscbot added finished-final-comment-period and removed disposition-merge final-comment-period This MSC has entered a final comment period in interest to approval, postpone, or delete in 5 days. labels Jan 31, 2021
@turt2live turt2live merged commit 315cf67 into matrix-org:master Jan 31, 2021
@turt2live turt2live added spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec and removed finished-final-comment-period labels Jan 31, 2021
@turt2live turt2live moved this from In FCP to Done to some definition in Spec Core Team Backlog Jan 31, 2021
@turt2live turt2live added spec-pr-in-review A proposal which has been PR'd against the spec and is in review and removed spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec labels Apr 21, 2021
@uhoreg uhoreg added merged A proposal whose PR has merged into the spec! and removed spec-pr-in-review A proposal which has been PR'd against the spec and is in review labels Apr 22, 2021
@uhoreg
Copy link
Member Author

uhoreg commented Apr 22, 2021

Merged! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:core MSC which is critical to the protocol's success merged A proposal whose PR has merged into the spec! proposal A matrix spec change proposal
Projects
Archived in project
Spec Core Team Backlog
  
Done to some definition
Development

Successfully merging this pull request may close these issues.

None yet

10 participants