Skip to content
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

Secret storage section needs cleanup #2040

Open
richvdh opened this issue Dec 19, 2024 · 0 comments
Open

Secret storage section needs cleanup #2040

richvdh opened this issue Dec 19, 2024 · 0 comments
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@richvdh
Copy link
Member

richvdh commented Dec 19, 2024

Link to problem area:

https://spec.matrix.org/v1.13/client-server-api/#storage

Issue

  • It ploughs straight in with "Key storage: Each key has an ID". When you first read this, you think it's talking about the keys that are stored in secret storage (eg, cross signing keys); it is actually talking about the master secret-storage key that is used to encrypt the secrets. This really needs clarifying.
  • The fact that, in practice, there is only one secret storage key that is used (the one referenced by m.secret_storage.default_key) at any given time could do with being made a lot more obvious.
  • Given that there is only one encryption system in use currently (m.secret_storage.v1.aes-hmac-sha2), the whole thing is unnecessarily confusing. The spec effectively mandates m.secret_storage.v1.aes-hmac-sha2 so let's stop saying "it depends on the algorithm" and dividing up the definitions into two parts. This is true both of "Key storage" and "Secret storage".
  • There are three different account-data payload definitions in this section (m.secret_storage.default_key, m.secret_storage.key.[key ID], org.example.some.secret), but they are all quite well hidden and do not use the standard, linkable, payload definition format. (See for example https://spec.matrix.org/v1.13/client-server-api/#midentity_server as an example of one that gets this right.)
  • The key storage section is oddly separated from the key representation and Deriving keys from passphrases sections by the "Secret storage" section. Why aren't all the things about SS keys grouped together.
@richvdh richvdh added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

1 participant