Repository navigation
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
Private key material is currently stored in individual groups and the consumer of the library has to manage CredentialBundles itself. I believe the storage of private key material (and the attached context) should really be handled by the library.
Describe the solution you'd like
There could be a Key Store component that stores private all key material. This allows us to store and manage it separately from the rest of the group states.
The Key Store is meant to be a part of OpenMLS, that interfaces with different components as follows:
- Every MLS client maintains one or more key stores
- Each
ManagedGroupgets a reference to a key store upon creation and uses it to store/load key material. This allows the use of key material across groups. Note that group-specific key material should be marked as belonging to a specific group.- Note, that currently, each
ManagedGroupmanages its own key material and in particular its leafKeyPackageBundle. This is problematic, as the KeyStore should be able to track whichCredentialis used by whom. This is so that the Key Store can ensure that no key material is deleted that is still in use.
- Note, that currently, each
- Generally, the Key Store should allow create, read, delete operations (no update) for the individual categories of key material.
- The Client could generate "init" KeyPackages for publication and later creation of a group, as well as Credentials. In both cases, the KeyStore would store the corresponding Bundles, such that the ManagedGroup can obtain the private key material when needed.
- Later, we could extend the Key Store such that it stores any private key material in a group, including symmetric secrets, making it available for use in other groups or the Client.
- The KeyStore should be thread safe, such that multiple groups can share CredentialBundles and still operate in parallel.
- The KeyStore should keep track of which key material is used by whom, when it expires and when it is safe to delete (i.e. when it's not used by anyone anymore, or when it's expired for a reasonable amount of time).
This could happen in individual steps:
- Introduce a simple key store that stores
CredentialBundles in memory. EachManagedGrouphas access to theKeyStore, enabling us to share individualCredentialBundles across groups. - Enable the key store to manage
KeyPackageBundles corresponding to prepublished "init"KeyPackages. - Make the KeyStore thread safe, such that it enables multiple concurrent reads.
- Implement a persistence layer that allows the KeyStore to keep key material in memory (i.e. cache it), but also persist it safely.
- We have to be careful to keep cached and persistent key material in sync. Since the Key Store doesn't provide a way to update key material, we don't have to worry about cached key material getting stale, at least as long as
deleteoperations delete both persisted and cached copies of the target. - The key store also manages other key material previously stored in the group (this is eventually going to have a few sub-points, but it should do as a goal for now).
- KeyPackageBundles of KeyPackages stored in the client's leaf
- Resumption Secrets
- PSKs
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
franziskuskiefer commentedon Feb 8, 2021
The key store should be for all key material (not only private). I think we need a description of the basic architecture how it should look in the end in order to guide the way. This includes in particular a rough description of the API and ownership.
[-][Feature request] Store private key material in a Key Store[/-][+][Feature request] Store key material in a Key Store[/+]franziskuskiefer commentedon Jan 5, 2023
Let's collect key store things here and clean up the description.
Here are some items