Skip to content

Expire the verification-property of QR codes #7111

@Hocuri

Description

@Hocuri

In the text below, "Alice" is the person who creates the QR code, "Bob" is the person who scans it.

Motivation

This will give verifications / green checkmarks a clearer meaning - today, a lot of contacts are verified, but many of them are verified by a bot, or via some QR code handed out a long time ago. Also, some people share their QR codes on Mastodon, which means that everyone could setup a "verified" contact with them, making the verification meaningless.

Details

  • This issue is only about expiring the verification-property of QR codes. The create-contact / invite-to-group property will not expire. I.e. if the QR code is expired, it will still create a contact / invite to the group, it just won't create a verification for either side.
  • Bots should never see anyone as verified.
  • Bob will still get a one-directional verification with Alice if he scans an expired QR code. Changing this is a future possibility (see below).
  • Core will need to generate a new QR code everytime the UI requests one.
  • We should probably reset all existing verifications in a migration, because "old" verifications are less strong then "new" verifications. This will also solve the problem that Already verified key-contacts are "re-verified" by a different contact #7107 created a lot of weird verifiers.

Future possibilities

Note: The plan is to quickly merge a simple improment; please don't discuss any of these future possibilities before this is implemented. I just collected and summarized all the future possibilities from the discussion in #5126. (or, if you do want to discuss about one of these already, create a new issue for it rather than discussing them here :))

  • Call it "verified by" rather than "introduced by" again, because this is what every other messenger calls this feature.
  • Add a button "Reset QR codes" that will reset all QR codes (all invite-contact QR codes, resp. all QR codes that invite to a particular group).
  • Limit the number of joiners per QR code in order to combat a possible spam wave and to prevent the online-leak.
  • Let QR codes' verification expire also on Bob's side
    • Pro: it's not clear where the QR code came from - it could have been manipulated in transit.
    • Contra: In order for Bob to notice that the QR code expired, this information needs to be put into a new parameter t=TIMESTAMP in the QR code. But an attacker who manipulates the QR code could just manipulate the t= parameter, too, assuming that the attacker knows when Bob will scan it. In general, if we want to save Bob from getting an unwanted verification if an attacker tricks him into scanning a QR code, we would need to use dynamic QR codes that only work if Bob scans Alice's screen in real-time.
    • Contra: It's a lot harder for an attacker to manipulate a QR code than to observe it - e.g. if someone puts their QR code on their website or into their SM profile, it's trivial to observe it, but hard to manipulate it.
    • Alternative: Somehow find out whether the QR code was transferred through a secure channel, and if so, mark Alice as verified.
    • Alternative: A dynamic QR code that changes, and only works if Bob directly scans it.
  • We can let QR codes expire completely (i.e. scanning them will only show an error message) after a day or so. Then, there should be a UI to get a longer-lived QR code. Then, we could also add UI for setting a custom name like "Cryptoparty" or "Onboarding Bob 4", which will then be shown at the start of the chat with Bob.
  • On Alice's side, we can add an info message to the chat "Bob scanned your QR code at DATE", for a bit of extra information where this new contact comes from. (proposed here).
  • After securejoin completes, open the edit-contact screen so that the user can rename the contact if they want to.

Further reading

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions