-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Define hkdf-hmac-sha256.v2 MAC method for SAS verification #1412
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I am struggling to keep up.
data/event-schemas/schema/m.key.verification.start$m.sas.v1.yaml
Outdated
Show resolved
Hide resolved
* the keys that they wish to verify (usually their device ed25519 key and | ||
their master cross-signing key) | ||
* the list of key IDs that they wish the other user to verify. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So as I understand it, Alice and Bob will each calculate 3 MACs:
- their device Ed25519 key
- their master cross-signing key
- the string consisting of
<ed25519 key id>,<MSK key id>
.
Is that correct? Is the key list just to stop people doing a switcheroo on which keys are being verified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the key list is to prevent people from adding or removing keys
If the key list is being MACed, the list is sorted lexicographically and | ||
comma-separated with no extra whitespace added, with each key written in the | ||
form `{algorithm}:{keyId}`. For example, the key list could look like: | ||
`ed25519:Cross+Signing+Key,ed25519:DEVICEID`. In this way, the recipient can | ||
reconstruct the list from the names in the `mac` property of the | ||
`m.key.verification.mac` message and ensure that no keys were added or removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still don't seem to say how to feed a key into the MAC.
Do we use the 43(?) bytes of Base64-encoded public key? Or the 32 bytes of binary public key? Or other?
Co-authored-by: Richard van der Hoff <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great now, thanks!
…g#1412) Co-authored-by: Richard van der Hoff <[email protected]>
Spec PR for matrix-org/matrix-spec-proposals#3783
Changes are in https://pr1412--matrix-spec-previews.netlify.app/client-server-api/#short-authentication-string-sas-verification
Preview: https://pr1412--matrix-spec-previews.netlify.app