Matrix: verifying a device means comparing emoji, never scanning #163

Closed
opened 2026-09-10 15:45:11 -04:00 by Salastil · 1 comment
Owner

Verification is SAS only — nobilis/src/backend/matrix/verification.rs implements
"compare emoji" and nothing else. Element offers QR-code verification (MSC1544)
alongside it, and it is the one most people actually use: point one device at the
other rather than reading seven pictures aloud.

What is needed

  • The m.qr_code.scan.v1 / m.reciprocate.v1 methods, which matrix-sdk-crypto
    already implements — this is mostly surfacing what the crate has.
  • A QR code to show, and a camera or an image to read one from. The showing half is
    worth having on its own: moho can display the code for a phone to scan, without
    needing to scan anything itself.

Done looks like: verifying moho from Element works the way Element expects.

Verification is SAS only — `nobilis/src/backend/matrix/verification.rs` implements "compare emoji" and nothing else. Element offers QR-code verification (MSC1544) alongside it, and it is the one most people actually use: point one device at the other rather than reading seven pictures aloud. **What is needed** - The `m.qr_code.scan.v1` / `m.reciprocate.v1` methods, which `matrix-sdk-crypto` already implements — this is mostly surfacing what the crate has. - A QR code to show, and a camera or an image to read one from. The showing half is worth having on its own: moho can display the code for a phone to scan, without needing to scan anything itself. **Done looks like:** verifying moho from Element works the way Element expects.
Salastil added the featureprotocol labels 2026-09-10 15:45:11 -04:00
Salastil removed the protocol label 2026-09-10 15:53:25 -04:00
Author
Owner

Done in nobilis 2929ff7 and moho 715f999.

The showing half, which is what the ticket identified as worth having on its own — and on a desktop it is the useful half, because the device holding the camera is the phone. Scanning one needs a camera or a picture to read and remains undone.

generate_qr_code on the verification request, rendered to SVG rather than a bitmap: the daemon has no idea how large it will be drawn, and a code scaled up from a fixed pixel grid is one a camera has to work harder to read. The qrcode crate was already a dependency for reading Discord's login code — this is the same crate pointed the other way, plus the qrcode feature on matrix-sdk-crypto.

It answers nothing rather than an error where a code cannot be made, because that is an ordinary state: a QR code proves an identity the other side can already check, so it needs cross-signing set up. Without one there is nothing to encode and the emoji remain the way through — which is why the dialog draws the code beside the existing flow rather than instead of it.

Drawn as an image from a data URI rather than injected as markup. The SVG is the daemon's own drawing and carries nothing from anywhere else, so injecting it would have been safe; not making the exception is the habit worth keeping.

Done in nobilis [2929ff7](https://git.salastil.com/Salastil/nobilis/commit/2929ff7) and moho [715f999](https://git.salastil.com/Salastil/moho/commit/715f999). The showing half, which is what the ticket identified as worth having on its own — and on a desktop it is the useful half, because the device holding the camera is the phone. Scanning one needs a camera or a picture to read and remains undone. `generate_qr_code` on the verification request, rendered to SVG rather than a bitmap: the daemon has no idea how large it will be drawn, and a code scaled up from a fixed pixel grid is one a camera has to work harder to read. The `qrcode` crate was already a dependency for reading Discord's login code — this is the same crate pointed the other way, plus the `qrcode` feature on matrix-sdk-crypto. It answers **nothing rather than an error** where a code cannot be made, because that is an ordinary state: a QR code proves an identity the other side can already check, so it needs cross-signing set up. Without one there is nothing to encode and the emoji remain the way through — which is why the dialog draws the code *beside* the existing flow rather than instead of it. Drawn as an image from a data URI rather than injected as markup. The SVG is the daemon's own drawing and carries nothing from anywhere else, so injecting it would have been safe; not making the exception is the habit worth keeping.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#163