Skip to content

Commit f7a397d

Browse files
committed
add proposal for Single SSSS
1 parent 940bb49 commit f7a397d

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

proposals/xxxx-single-ssss.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# MSCxxxx: Single SSSS
2+
3+
[Secure Secret Storage and
4+
Sharing](https://github.com/matrix-org/matrix-doc/pull/1946) (SSSS) was
5+
designed to allow the user to create multiple keys that would be able to
6+
decrypt different subsets of the secrets. However, the vast majority of users
7+
do not need this feature.
8+
9+
This proposal defines how clients should behave if they only wish to support a
10+
single key by defining which key clients should use if multiple keys are
11+
present. It also makes the `name` field in the `m.secret_storage.key.*` events
12+
optional, as this field was mainly added to allow a user to select between
13+
different keys.
14+
15+
## Proposal
16+
17+
If a client wants to present a simplified interface to users by not supporting
18+
multiple SSSS keys, then the client should use the default key (the key listed
19+
in the `m.secret_storage.default_key` account data event.) If there is no
20+
default key the client may behave as if there is no SSSS key at all. When such
21+
a client creates an SSSS key, it must mark that key as being the default key.
22+
23+
The `name` field in the `m.secret_storage.key.*` account data events is
24+
optional, rather than required. If a client wishes to display multiple keys to
25+
a user and a given key does not have a `name` field, the client may use a
26+
default name as the key's name, such as "Unnamed key", or "Default key" if the
27+
key is marked as default.
28+
29+
## Potential issues
30+
31+
If secrets are encrypted using a key that is not marked as default, a client
32+
might not decrypt the secrets, even if it would otherwise be able to.
33+
34+
## Alternatives
35+
36+
Rather than solely relying on the key marked as default, a client could guess
37+
at what key to use. For example, it could look at the secrets that it needs,
38+
see what keys they are encrypted with, and if there is only one common key,
39+
then it could use that. (This is what Element currently does.) Or if there
40+
are multiple keys, it could use some sort of heuristic to pick a key. However,
41+
this approach can be error-prone, and it is better to rely on an explicit
42+
marking.
43+
44+
## Security considerations
45+
46+
None
47+
48+
## Unstable prefix
49+
50+
An unstable prefix is not needed for a behaviour change in choosing the key to
51+
use as there are not event/endpoint changes.
52+
53+
Some clients already omit the `name` field (notably, matrix-js-sdk
54+
unintentionally does this -- mea culpa), and this does not seem to be causing
55+
issues, so an unstable prefix seems unnecessary for this.

0 commit comments

Comments
 (0)