-
Notifications
You must be signed in to change notification settings - Fork 389
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
MSC4161: Crypto terminology for non-technical users #4161
base: main
Are you sure you want to change the base?
Changes from 25 commits
5f08ae9
32f386b
cd26b70
a7b5a77
a79b289
89412cc
d15576e
af70e43
720cdeb
de285aa
57fc5c1
a4b95b4
0499900
b919630
007a15f
45928bb
3a2d012
56b5daf
fba4f5c
9246021
0c9d812
705f7bb
4bcee33
f654c2e
3c7695f
7a789c5
3ed51ec
b44397b
04df819
bdbd7b4
7a9a84b
c13bd45
d087885
a938372
9cacbe7
0a449f6
f4de07d
2954056
ecfd1ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall review: The MSC appears to describe features and requirements of Element, and assumes that all clients in the ecosystem have similar or comparable features/needs. The assumptions read fine when applying this MSC to an Element client, but when comparing to the spec there feels like there's a gap in understanding. Significant review from other client authors/developers, and their respective product/design teams, I think would be extremely valuable to help ensure this MSC does not solely apply to Element. This kind of review may need to be chased down as it's somewhat uncommon for a product-y MSC to be in the spec process. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,308 @@ | ||
# MSC4161: Crypto terminology for non-technical users | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me start with the positive note - I believe that, at this stage in Matrix evolution, this initiative is very worth while. I think that we need to unify and clean up the language used throughout Matrix, and that is not specific to the cryptography part. That being said, I think we have to answer a fundamental question before we go for this. This is one of the first, if not the first, MSC that entirely focuses on recommendations to user interfaces and user experience rather than APIs and call flows. If we are to enter the UI/UX guidelines territory, I would prefer that we first agree whether the SCT remit and capability extends there, and how far. A few comments below have what I think needs further discussion. TL;DR (but please respond under specific comments):
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see this MSC as a comprehensive document really covering the ground - and that's fine. I don't believe we should even focus on cryptography, it's just one of more technically advanced areas where we ended up exposing too much of protocol internals to the users. I'm totally happy to start with this but I don't want this MSC to be the start and the end. It would be great to see more effort, from the entire community, on improving UX in Matrix for different user categories. It would be disappointing if this MSC becomes a lonely shot in the direction of UI/UX guidelines. I don't have a clear path but I know it should be more than an appendix, linked to from the CS API spec. We'll probably have to do some advocacy to raise awareness; we'll also need to think about i18n and l10n to extend good wording to other languages than English (we have prior experience on that!); probably there are more areas. I recognise that everybody signals There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we at SCT have experience and expertise on the subject. Being one of those covering the clients domain area, I may have to go for some research and self-education before I can responsibly make decisions on this. And/or we might have to call someone in who has appropriate background. Fortunately, Matrix is used by some UI-conscious communities (GNOME, in particular) so we might not need to search too far away. This is especially critical given how much bike-shedding this subject may cause - particularly around the words and phrases shown in the UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Speaking of this MSC: I would appreciate having more external references. So far the MSC looks like a result of the original research breaking new ground, with minimal prior art. There's probably just a couple of places where other platforms are mentioned, and there are no references to decentralised platforms like E-mail or Web (GMail is not decentralised). It would be great to make sure at least some research has been done if we are to officially endorse specific terms. For example: next to others, I'm not a fan of "devices", I really believe it's a misnomer we borrowed from centralised mobile-first platforms. I can still grudgingly accept it if we couldn't find a better alternative. But the only discussed alternative was "session", which I agree is (even) weaker. I was surprised that "clients" (taken from e-mail), or "applications/apps" (desktop and mobile environments) are not even namechecked. Or consider "identity" - I don't know if it's good or bad because I don't see the research behind the choice. I only know it's difficult to translate it to Russian and a few other Slavic languages and, separately, that it confused me when I stumbled on "the identity has changed" wording in WhatsApp. Maybe there's something better, maybe there isn't - it's not clear from the MSC. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can adjust phrases but the fundamental vocabulary is not something we can "iterate" easily on; once end users (especially non-technical) get used to it, they won't appreciate changes if/when we discover that something doesn't really work. I would suggest that we actually spec the glossary, leaving specific phrases to a lighter "implementation guide" kind of a document. The implication here is that the glossary is something we actively promote as the standard way to express things in Matrix (and tbh I would really consider it being universal, without "technical/non-technical" separation), while the phrases would be a sort of reference for client authors that we can change quicker, probably without MSCs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lots to think about here but I wanted to say straight away: thank you - you raise lots of very important points and I think I agree with almost everything you've said. |
||
|
||
## Background | ||
|
||
Matrix makes use of advanced cryptographic techniques to provide secure | ||
messaging. These techniques often involve precise and detailed language that is | ||
unfamiliar to non-technical users. | ||
|
||
This document provides a list of concepts and explanations that are intended to | ||
be suitable for use in Matrix clients that are aimed at non-technical users. | ||
|
||
Ideally, encryption in Matrix should be entirely invisible to end-users (much as | ||
WhatsApp or Signal users are not exposed to encryption specifics). This | ||
initiative is referred to as "Invisible Cryptography" and is tracked as: | ||
|
||
* [MSC4153](https://github.com/matrix-org/matrix-spec-proposals/pull/4153) - | ||
Exclude non-cross-signed devices, | ||
* [MSC4048](https://github.com/matrix-org/matrix-spec-proposals/pull/4048) - | ||
Authenticated key backup, | ||
* [MSC4147](https://github.com/matrix-org/matrix-spec-proposals/pull/4147) - | ||
Including device keys with Olm-encrypted events, and | ||
* MSC4161 - this document | ||
|
||
## Goals | ||
|
||
We hope that Matrix client developers will like the terms and wording we | ||
provide, and adapt their user interfaces and documentation to use them. (If this | ||
MSC is accepted, Element will use it as a reference for English wording in its | ||
clients.) | ||
|
||
Where concepts and terms exactly match existing terms in the Matrix spec, we | ||
propose changing the spec to use the terms from this document. Where they do not | ||
match, we are very comfortable with different words being used in the spec, | ||
given it is a highly technical document, as opposed to a client user interface. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it makes total sense to see harmonised but different vocabularies in the API specifications and UI guidelines. In case of UI I would suggest providing some acceptable alternatives to primary key words, as well as known-bad options (this MSC already has those in a few places). Having these helps translators a lot to find the best equivalent in other languages. |
||
|
||
We hope that this MSC will: | ||
|
||
* Cause small changes in the spec (as described in the previous paragraph), and | ||
* Become an appendix in the spec, with a description that makes clear that the | ||
intended audience is different from most of the spec, meaning different words | ||
are used from the main spec body. | ||
|
||
Clients may, of course, choose to use different language. Some clients may | ||
deliberately choose to use more technical language, to suit the profiles of | ||
their users. This document is aimed at clients targeting non-technical users. | ||
Comment on lines
+66
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's unclear if this is part of the proposal, or accepting fate. If it's part of the proposal, I suggest moving it down to the normative sections (under "Proposal"). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wrote some words in 56b5daf - let me know what you think. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @turt2live are you happy to resolve this thread? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that the proposed language is actually aimed solely at non-technical users. I'm sure it will bring better Matrix experience to technical users who haven't seen the protocol specifications, just as well. |
||
|
||
Where changes are made in the spec, we suggest that notes be added mentioning | ||
the old name, as in [this | ||
example](https://github.com/matrix-org/matrix-spec/pull/1819/files#diff-8b25d378e077f18eb06ebdb9c376e194c8a4c8b95cf909fca6448659a627f283R1326). | ||
|
||
## Proposal | ||
|
||
When communicating about cryptography with non-technical users, we propose using | ||
the following terms and concepts. | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
When referring to concepts outlined in this document in their user interface, | ||
clients SHOULD use the language specified, except where their own users are | ||
known to understand different terms more easily. When making such exceptions, | ||
clients SHOULD document how they deviate from this document, and why. | ||
|
||
### Devices | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Instances of a client are called 'devices' (not 'sessions'). Aligned with | ||
[MSC4153](https://github.com/matrix-org/matrix-spec-proposals/pull/4153), we take it as granted that all devices have been cross-signed by the | ||
user who owns them, and we call these **devices**. | ||
|
||
Devices which have not been cross-signed by the user are considered an error | ||
state, primarily to be encountered during the transition to MSC4153 and/or due | ||
richvdh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
to buggy/incomplete/outdated clients. These devices are referred to as **not | ||
secure** or **insecure** and their existence is considered a serious and dangerous error | ||
condition, similar to an invalid TLS certificate. | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> "This device is not secure. Please verify it to continue." | ||
|
||
> "Ignoring 5 messages that were sent from a device that is not secure." | ||
|
||
> "Confirm it's you" (when asking to verify a device during login) | ||
|
||
⚠️ Avoid saying "secure device". All devices are considered secure by default; | ||
the user doesn't typically need to worry about the fact that insecure devices | ||
are a thing, given they should only ever occur in error (or transitional) | ||
scenarios. | ||
|
||
⚠️ Avoid saying "trusted device" or "verified device". Devices are not users, | ||
and it is helpful to use different language for users vs. devices. (However, we | ||
do use the verb "verify" to describe how to make a device secure. By using the | ||
same verb, we help users understand the confusing fact that verifying devices | ||
and verifying users are similar processes, but with different outcomes.) | ||
|
||
⚠️ Avoid using "cross-signing", which requires a deeper knowledge of | ||
cryptography to understand. | ||
|
||
⚠️ Avoid mentioning "device keys" - a device is just secure or not. | ||
|
||
⚠️ Avoid "session" to mean device. Device better describes what most users | ||
encounter, and is more commonly used in other products. | ||
|
||
### Verified user | ||
|
||
When you verify a user they become **verified**. This means that you have | ||
cryptographic proof that no-one is listening in on your conversations. (You need | ||
this if you suspect someone in a room may be using a malicious homeserver.) | ||
|
||
In many contexts, most users are **not verified**: verification is a manual | ||
step (scanning a QR code or comparing emojis). (In future, verification will | ||
probably become more common thanks to "transitive trust" or "key transparency"). | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
When an unverified user resets their cryptographic identity, we should warn | ||
the user, so they are aware of the change. | ||
|
||
If Alice is verified with Bob, and then Alice's cryptographic identity changes | ||
(i.e. Alice resets their master cross-signing key) then this is very important to | ||
Bob: Bob verified Alice because they care about proof that no-one is listening, | ||
and now someone could be. Bob can choose to **withdraw verification** (i.e. | ||
"demote" Alice from being verified), or **re-verify** with Alice. Until Bob does | ||
one or the other, Bob's communication with Alice should contain a prominent and | ||
serious warning that Alice's **verified identity has changed**. | ||
|
||
> "This user is verified." | ||
|
||
> "WARNING: Bob's verified identity has changed!" | ||
|
||
> "You verified this user's identity, but it has changed. Please choose to | ||
> re-verify them or withdraw verification." | ||
|
||
⚠️ Avoid using "cross-signing", which requires a deeper understanding of | ||
cryptography to understand. | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
⚠️ Avoid using "trust on first use (TOFU)", which is a colloquial name for noting | ||
the identity of users who are not verified so that we can notify the user if it | ||
changes. (This is a kind of "light" form of verification where we assume that | ||
the first identity we can see is trusted.) | ||
|
||
⚠️ Avoid confusing verification of users with verification of devices: the | ||
mechanism is similar but the purpose is different. Devices must be verified to | ||
make them secure, but users can optionally be verified to ensure no-one is | ||
listening in or tampering with communications. | ||
|
||
⚠️ Avoid talking about "mismatch" or "verification mismatch" which is very | ||
jargony - it is the identity which is mismatched, not the verification process. | ||
Just say "Bob's verified identity has changed". | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
⚠️ Avoid talking about "cryptographic identity" which is very jargony. Just call | ||
it "identity" where possible - i.e. the non-technical dictionary definition of | ||
identity such that someone is who they claim they are, not someone else. The | ||
fact we confirm identity cryptographically is irrelevant to the user; | ||
cryptography should be invisible. | ||
|
||
### Identity | ||
|
||
A user's **identity** is proof of who they are, and, if they are verified, | ||
proof that you have a secure communication channel with them. | ||
|
||
> "Warning: Alice's identity appears to have changed" (when a non-verified | ||
> user resets their recovery key) | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> "WARNING: Bob's verified identity has changed!" (when a verified user resets | ||
> their recovery key) | ||
|
||
(During login, at the "Confirm it's you" stage): | ||
|
||
> "If you don't have any other device and you have lost your recovery key, you | ||
> can create a new identity. (Warning: you will lose access to your old | ||
> messages!)" button text (in red or similar): "Reset my identity" | ||
|
||
⚠️ Avoid saying "master key" - this is an implementation detail. | ||
|
||
⚠️ Avoid saying "reset their encryption" - the reason that Alice's identity | ||
changed could be due to attack rather than because they reset their encryption | ||
(plus "encryption" is jargony). | ||
|
||
### Message key | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
A **message key** is used to decrypt a message. The metaphor is that messages | ||
are "locked in a box" by encrypting them, and "unlocked" by decrypting them. | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> "Store message keys on the server." | ||
|
||
⚠️ Avoid saying "key" without a previous word saying what type of key it is. | ||
|
||
⚠️ Avoid using "room key". These keys are used to decrypt messages, not rooms. | ||
|
||
Note: this clashes with the term "message key" in the double ratchet. Since the | ||
double ratchet algorithm is for a very different audience, we think that this is | ||
not a problem. | ||
|
||
### Unable to decrypt | ||
|
||
When we have an encrypted message but no message key to decrypt it, we are | ||
unable to decrypt it. | ||
|
||
When we expect the key to arrive, we are **waiting for this message**. | ||
|
||
> "Waiting for this message" with a button: "learn more" that explains that the message key for | ||
this message has not yet been received, but that we expect it to | ||
> arrive shortly. Further detail may be provided, for instance explaining that | ||
> connectivity issues between the sender's homeserver and our own can cause | ||
> key delivery delays. | ||
|
||
When the user does not have the message key for a permanent and well-understood | ||
reason, for example if it was sent before they joined the room, we say **you | ||
don't have access to this message**. | ||
|
||
> "You don't have access to this message" e.g. if it was sent before the user | ||
> entered the room, or the user does not have key storage set up. | ||
|
||
### Message history | ||
|
||
Your **message history** is a record of every message you have received or sent, | ||
and is particularly used to describe messages that are stored on the server | ||
rather than your device(s) | ||
|
||
### Key storage | ||
richvdh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**Key storage** means keeping cryptographic information on the server. This | ||
includes the user's cryptographic identity, and/or the message keys needed to | ||
decrypt messages. | ||
richvdh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If a user loses their recovery key, they may **reset** their key storage. Unless | ||
they have old devices, they will not be able to access old encrypted messages | ||
because the message keys are stored in key storage, and their cryptographic | ||
identity will change, because it too is stored in key storage. | ||
|
||
> "Allow key storage" | ||
|
||
> "Key storage holds your cryptographic identity on the server along with the | ||
> keys that allow you to read your message history." | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> "Message history is unavailable because key storage is disabled." | ||
|
||
⚠️ Avoid distinguishing between "secret storage" and "key backup" - these are | ||
both part of key storage. | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
⚠️ Avoid talking about more keys: "the backup key is stored in the secret | ||
storage, and this allows us to decrypt the messages keys from key backup". | ||
Instead, we simply say that both cryptographic identity and message keys are | ||
stored in key storage. | ||
|
||
⚠️ Avoid using "key backup" to talk about storing message keys: this is too | ||
easily confused with exporting keys or messages to an external system. | ||
|
||
⚠️ Avoid "4S" or "quad-S" - these are not descriptive terms. | ||
|
||
### Recovery key (and recovery passphrase) | ||
|
||
A **recovery key** is a way of regaining access to key storage if the user loses | ||
all their devices. Using key storage, they can preserve their cryptographic | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
identity (meaning other users don't see "Alice's identity appears to have | ||
changed" messages), and also read old messages using the stored message keys. | ||
|
||
A **recovery passphrase** is an easier-to-remember way of accessing the recovery | ||
key and has the same purpose as the recovery key. | ||
|
||
> "Write down your recovery key in a safe place" | ||
|
||
> "If you lose access to your devices and your recovery key, you will need to | ||
> reset your message key storage, which will create a new identity" | ||
|
||
> "If you lose your recovery key you can generate a new one if you are signed in | ||
> elsewhere" | ||
|
||
⚠️ Avoid using "security key", "security code", "recovery code", "master key". A | ||
recovery key allows "unlocking" the key storage, which is a "box" that is on the | ||
server, containing your cryptographic identity and message keys. It is used to | ||
recover the situation if you lose access to your devices. None of these other | ||
terms express this concept so clearly. | ||
|
||
⚠️ Remember that users may have historically been trained to refer to these | ||
concepts as "security key" or "security passphrase", and so user interfaces | ||
should provide a way for users to be educated on the terminology change (e.g. a | ||
tooltip or help link): e.g. "Your recovery key may also have been referred to as | ||
a security key in the past" | ||
|
||
⚠️ Be aware that at time of writing the spec uses | ||
["recovery key"](https://spec.matrix.org/v1.8/client-server-api/#recovery-key) | ||
to refer to the private half of the backup encryption key, which is different | ||
from the usage here. The recovery key described in this section is referred to | ||
andybalaam marked this conversation as resolved.
Show resolved
Hide resolved
|
||
in the spec as the | ||
[secret storage key](https://spec.matrix.org/v1.8/client-server-api/#secret-storage). | ||
|
||
## Potential issues | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MSC should address why it's important that all clients use the same language, and why the language of the MSC is generic enough to fit the language and feel of all client applications. An app which has a less professional feel may prefer to use different terms for brand identity/recognition, for example. This MSC feels a bit too prescriptive for all audiences. A common language feels important to me, regardless of audience impact, but the MSC does not really tell me why I should feel that way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had a go here: b44397b . Is that something like what you hoped for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @turt2live are you happy to resolve this thread? |
||
|
||
Lots of existing clients use a whole variety of different terminology, and many | ||
users are familiar with different terms. Nevertheless we believe that working | ||
together to agree on a common language is the only way to address this issue | ||
over time. | ||
|
||
## Further work | ||
|
||
Several other concepts might benefit from similar treatment. Within | ||
cryptography, "device dehydration" is a prime candidate. Outside cryptography, | ||
many other terms could be agreed, including "export chat" (particularly in | ||
contrast to "export message keys"). | ||
|
||
## Security considerations | ||
|
||
In order for good security practices to work, users need to understand the | ||
implications of their actions, so this MSC should be reviewed by security | ||
experts to ensure it is not misleading. | ||
|
||
## Dependencies | ||
|
||
None | ||
|
||
## Credits | ||
|
||
Written by Andy Balaam, Aaron Thornburgh and Patrick Maier as part of our work | ||
for Element. Richard van der Hoff, Matthew Hodgson and Denis Kasak contributed | ||
many improvements before the first draft was published. |
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.
Implementation requirements (in my opinion):
The research may be done through studies or deployment to a portion of the user base with analytics to show "easier" use of the app.