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

Refactor Group Joining and fix External Inits #529

Merged
merged 7 commits into from
Jan 19, 2022

Conversation

kkohbrok
Copy link
Contributor

@kkohbrok kkohbrok commented Dec 17, 2021

This PR refactors the two sections on Group Joining (via Welcome and via External Init) by changing the GroupInfo struct that can be used for both cases. The external_pub used in the course of an External Init is added as an optional field. This PR also:

  • removes the redundant ProtocolVersion in the GroupInfo
  • adds a GroupInfoTBS struct to follow the convention of specifying a TBS struct for signed messages
  • implicitly, the confirmed_transcript_hash and confirmation_tag is now used for external inits instead of the interim_transcript_hash, which was not sufficient to create a valid commit

Copy link
Collaborator

@bifurcation bifurcation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically, we're converging the internal and external join cases as a result of fixing a bug in external join. Seems like a fine idea.

I will note that this promotes GroupInfo into a "public" / "on-the-wire" object, as opposed to always being wrapped in a Welcome. In the internal join case, the GroupInfo is always sent encrypted to the new joiner; in the external join case, it isn't necessarily encrypted (up to the application). Doesn't need to be a blocker, but might be worth elaborating on in an implementation document.

Marking as approved, but I would pretty strongly prefer that external_pub be in an extension vs. an optional field.

Extension group_context_extensions<0..2^32-1>;
Extension other_extensions<0..2^32-1>;
HPKEPublicKey external_pub;
MAC confirmation_tag;
optional<HPKEPublicKey> external_pub;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably make this an extension (in other_extensions, like ratchet_tree) instead of an optional field.

draft-ietf-mls-protocol.md Outdated Show resolved Hide resolved
@kkohbrok
Copy link
Contributor Author

Thanks for the suggestions! I agree that it's a bit nicer to have an extension rather then an optional field.

Extension group_context_extensions<0..2^32-1>;
Extension other_extensions<0..2^32-1>;
MAC confirmation_tag;
optional<HPKEPublicKey> external_pub;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's now an extension, do we still need it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry. Forgot to remove that one. Thanks!

@raphaelrobert
Copy link
Member

I agree it's good to align PublicGroupState and GroupInfo!

@kkohbrok kkohbrok mentioned this pull request Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants