awslabs / mls-rs

An implementation of Messaging Layer Security (RFC 9420)
Apache License 2.0
104 stars 19 forks source link

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

Open CaioSym opened 1 month ago

CaioSym commented 1 month ago

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:

Requirements / Acceptance Criteria:

TBD based on what solution we chose

Out of scope:

N/A