Skip to content

Conversation

@hughns
Copy link
Member

@hughns hughns commented Jun 3, 2024

Pull Request Checklist

Currently the spec is specific about the contents of the binary data to be present within a QR, but it does not specify how that data should be encoded within a QR.

I've checked the original MSC1544 but don't see any obvious discussion around this. Also, no discussion in the spec PR.

As such, I assume this is an oversight.

I do have a hesitation about linking out to the ISO spec as it is not "open".

Preview: https://pr1839--matrix-spec-previews.netlify.app

@hughns hughns force-pushed the hughns/qr-code-encoding branch from ce618c9 to 19f3e21 Compare June 3, 2024 08:48
@hughns hughns marked this pull request as ready for review June 3, 2024 08:49
@hughns hughns requested a review from a team as a code owner June 3, 2024 08:49
Copy link
Contributor

@sumnerevans sumnerevans left a comment

Choose a reason for hiding this comment

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

While you're in this area, you could clarify that the keys in key1 and key2 are public keys. For example:

  • the second key, as 32 bytes. The key to use depends on the mode field
    • if 0x00, then what the device thinks the other user's master cross-signing public key is
    • if 0x01, then what the device thinks the other device's Ed25519 signing public key is
    • if 0x02, then what the device thinks the user's master cross-signing public key is

Copy link
Contributor

@Johennes Johennes left a comment

Choose a reason for hiding this comment

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

Two minor suggestions with respect to #1782.

The QR codes to be displayed and scanned using this format will encode binary
strings in the general form:
The QR codes to be displayed and scanned must be
[ISO/IEC 18004:2015](https://www.iso.org/standard/62021.html) compatible and
Copy link
Member

Choose a reason for hiding this comment

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

[sadly yes, the spec for QR codes is copyrighted; this seems to be the best we can do.]

hughns and others added 3 commits June 12, 2024 16:57
Thank you!

Co-authored-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@hughns
Copy link
Member Author

hughns commented Jun 12, 2024

While you're in this area, you could clarify that the keys in key1 and key2 are public keys. For example:

Good thought. Now done.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@richvdh richvdh merged commit 4a280bc into matrix-org:main Jun 12, 2024
Copy link
Contributor

@sumnerevans sumnerevans left a comment

Choose a reason for hiding this comment

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

Thanks for getting these clarifications across the line!

@hughns hughns deleted the hughns/qr-code-encoding branch June 18, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants