Subject: Re: [MLS] Turning mandatory extensions into fields

From: Théophile Wallez <[email-masked]>
Date: Mon, 21 Jun 2021 13:04:21 +0200

Hi and sorry for the late answer,

Is there any good reason to merge the two structures (init keys and leaf 
content) other than the overlap they have?
The overlap seems quite small to me (e.g. compared to the "Message 
Framing" section), it looks like it is only an HPKEPublicKey, a 
Credential and a signature.
The non-overlap seems quite big to me, for example:
- ProtocolVersion, CipherSuite only belong to init keys
- parent hash, lifetime only belong to leaf content

I think it would be a good idea to split the two structures again, I 
believe this would simplify the implementations by making parent hash 
easily accessible, and by removing unused values of the leaf content 
(what should we do with ProtocolVersion and CipherSuite, should we check 
that it is consistent with the group state? should we ignore them?)

Thank you for your comments,

Théophile.

On 22/05/2021 12:20, Raphael Robert wrote:
> Hi Théophile,
>
> The current scheme was introduced a while ago when we merged the the KeyPackages that clients publish ahead of time (previously called init keys) with the KeyPackages that clients use in their leaf nodes.
> The reason was that there was quite some overlap between the two structs and the logical consequence was that data that differs for the two use cases was expressed as extensions.
>
> I’d be open to discussing disambiguating this again and I think I’m not the only one. This would also pave the way for Joël’s proposal to have an additional public key in the init keys in order to improve FS for members who don’t update quickly.
>
> Thanks
>
> Raphael
>
>> On 21. May 2021, at 23:03, Théophile Wallez <[email-masked]> wrote:
>>
>> Hello All,
>>
>> The MLS spec includes some extensions that are mandatory.
>> Considering that this is v1 of the spec, why not just make these into fields and take them out of extensions?
>>
>> In particular, in the current draft, the parent hash is only an extension, but it is mandatory when the leaf is generating an UpdatePath.
>> Let us make it a field in KeyPackage?
>> Having it as an extension hides its importance for security, and makes the draft confusing to read.
>> Also, it is a bit weird that parent_hash is a field in ParentNode, and it is an extension in KeyPackage.
>>
>> We propose the following changes:
>>
>>> New structure:
>>> struct {
>>> opaque parent_hash_value<0..255>;
>>> } ParentHash;
>>>
>>> New field in KeyPackage:
>>> optional<ParentHash> parent_hash;
>>>
>>> This optional field must be present in the `leaf_key_package` of an UpdatePath (same constraints as the current extension).
>> Or:
>>
>>> New field in KeyPackage:
>>> opaque parent_hash<0..255>;
>>>
>>> `parent_hash` must be non-empty in the `leaf_key_package` of an UpdatePath (same constraints as the current extension).
>> Best regards,
>> Théophile, Benjamin, and Karthik_______________________________________________
>> MLS mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/mls

---

From: Konrad Kohbrok <[email-masked]>
Date: Mon, 21 Jun 2021 13:56:56 +0200 (CEST)

Hi Théophile,

thanks for bringing this up!

I believe splitting the two structures would be a good idea. It would also allow us to have a second private/public keypair in the init key struct for better FS as suggested in the past by Joël.

That being said, I believe we need the lifetime field/extension in both structs, as init key structs should also have an expiration date. If anything, the lifetime extension could be omitted in the leaf struct, as I'm not sure what the consequence would be if a leaf key package expired in an active group. (Would other group members still encrypt to the leaf key? Would they reject messages from that member that are not updates? This would have to be defined in the spec. Or is it already?)

Cheers,
Konrad

> Théophile Wallez <[email-masked]> hat am 21.06.2021 13:04 geschrieben:
> 
>  
> _______________________________________________
> MLS mailing list
> [email-masked]

---

From: Richard Barnes <[email-masked]>
Date: Fri, 25 Jun 2021 08:57:20 -0400

I would oppose such a big change this late in the game.  There is
substantial overlap in what is needed from KeyPackages and leaf nodes in
the tree, and designing some new leaf struct would require significant
reinvention and revalidation to ensure that we haven't damaged the
authentication properties of the protocol.

--RLB

On Mon, Jun 21, 2021 at 7:57 AM Konrad Kohbrok <[email-masked]>
wrote:

> I believe splitting the two structures would be a good idea. It would also
> allow us to have a second private/public keypair in the init key struct for
> better FS as suggested in the past by Joël.
>
> That being said, I believe we need the lifetime field/extension in both
> structs, as init key structs should also have an expiration date. If
> anything, the lifetime extension could be omitted in the leaf struct, as
> I'm not sure what the consequence would be if a leaf key package expired in
> an active group. (Would other group members still encrypt to the leaf key?
> Would they reject messages from that member that are not updates? This
> would have to be defined in the spec. Or is it already?)
>
> Cheers,
> Konrad
>
> > > The current scheme was introduced a while ago when we merged the the
> KeyPackages that clients publish ahead of time (previously called init
> keys) with the KeyPackages that clients use in their leaf nodes.
> > > The reason was that there was quite some overlap between the two
> structs and the logical consequence was that data that differs for the two
> use cases was expressed as extensions.
> > >
> > > I’d be open to discussing disambiguating this again and I think I’m
> not the only one. This would also pave the way for Joël’s proposal to have
> an additional public key in the init keys in order to improve FS for
> members who don’t update quickly.
> > >
> > > Thanks
> > >
> > > Raphael
> > >
> > >> In particular, in the current draft, the parent hash is only an
> extension, but it is mandatory when the leaf is generating an UpdatePath.
> > >>> This optional field must be present in the `leaf_key_package` of an
> UpdatePath (same constraints as the current extension).
> > >> Or:
> > >>
> > >>> New field in KeyPackage:
> > >>> `parent_hash` must be non-empty in the `leaf_key_package` of an
> UpdatePath (same constraints as the current extension).
> > >> Best regards,
> > >> Théophile, Benjamin, and
> Karthik_______________________________________________
> > >> MLS mailing list
> > >> [email-masked]