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

Investigate ClientConfig.key_package_lifetime being used for cases other than KP creation. #197

Open
CaioSym opened this issue Oct 9, 2024 · 0 comments

Comments

@CaioSym
Copy link
Contributor

CaioSym commented Oct 9, 2024

Problem:

Splitting this from the discussion in https://github.com/awslabs/mls-rs/pull/196/files#r1786752471

The current implementation of mls-rs defines a ClientConfig.key_package_lifetime parameter which is intended to be used when creating KPs. Internally, however, this parameter seems to be used whenever a KemTree::Node is created. For example, when calling Client::create_group, that calls into Group::new which calls LeafNode::generate(..., config.lifetime())```. ClientConfig::lifetimeunder the hood uses theClientConfig.settings.lifetime_in_sto compute the returned value.ClientConfig.settings.lifetime_in_sis the backing value ofClientConfig.key_package_lifetime`.

Note that this is not the only place where ClientConfig::lifetime is passed to LeafNode::generate or other LN functions

Solution:

Potential solutions here are:

  • Renaming ClientConfig.key_package_lifetime and ClientConfig.key_package_not_before to something that indicates these are parameters driving the Node lifetimes instead. Ie ClientConfig.tree_node_lifetime and ClientConfig.tree_node_not_before
  • Splitting the lifetime params used for group creation / other non KP scenarios from the KP lifetimes. Extract the KP lifetimes to be parameters passed during KP generation.
  • Some other refactor?
  • Keep existing api to avoid breaking changes, Provide documentation to address potential confusion.

Requirements / Acceptance Criteria:

TBD based on what solution we chose

Out of scope:

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant