openmls icon indicating copy to clipboard operation
openmls copied to clipboard

[MLS Spec change] Clean up struct names and references to them (#706)

Open raphaelrobert opened this issue 3 years ago • 2 comments

Link to the exact changes https://github.com/mlswg/mls-protocol/pull/706

Description of the changes

Closes #673 Closes #674

With regard to #674: I searched for references to MLSPlaintext and Credential that were obsolete in light of the change to the MLSMessage framework. (In particular, we used to have the idea that you would encode things as MLSPlaintext, then tranform them to MLSCiphertext if needed; now you encode to AuthenticatedContent and then convert that to MLSPlaintext/MLSCiphertext before sending.) There were a few fixes for MLSPlaintext; I didn't find anything that needed fixing for Credentia, largely thanks to some PRs that have landed since I did the review that resulted in #674.

raphaelrobert avatar Aug 08 '22 08:08 raphaelrobert

Changes ("L..." at end of URL is line number):

Renames

  • MLSMessageAuth --> MLSContentAuthData
  • MLSMessageContent --> MLSContent
  • MLSMessageContentAuth --> MLSAuthenticatedContent
  • MLSMessageContentTBS --> MLSContentTBS
  • MLSMessageContentTBM --> MLSContentTBM

--> None of them appear in OpenMLS code.

Changes to structs

  • Change GroupInfo https://github.com/mlswg/mls-protocol/pull/706/files#diff-7c369b85b26a746a7e70cd2884037896defe03b3098bec976f79c994d22a604aL3930

--> Extract fields, rename other_extensions --> extensions.

struct {
    CipherSuite cipher_suite;
-    opaque group_id<V>;
-    uint64 epoch;
-    opaque tree_hash<V>;
-    opaque confirmed_transcript_hash<V>;
-    Extension group_context_extensions<V>;
-    Extension other_extensions<V>;
+    GroupContext group_context;
+    Extension extensions<V>;
    MAC confirmation_tag;
    uint32 signer;
    // SignWithLabel(., "GroupInfoTBS", GroupInfoTBS)
    opaque signature<V>;
} GroupInfo;
struct {
    opaque group_id<V>;
    uint64 epoch;
    opaque tree_hash<V>;
    opaque confirmed_transcript_hash<V>;
    Extension extensions<V>;
} GroupContext;
  • Change GroupInfoTBS https://github.com/mlswg/mls-protocol/pull/706/files#diff-7c369b85b26a746a7e70cd2884037896defe03b3098bec976f79c994d22a604aL3952

Unclear implications (to me)

  • https://github.com/mlswg/mls-protocol/pull/706/files#diff-7c369b85b26a746a7e70cd2884037896defe03b3098bec976f79c994d22a604aL3785
  • https://github.com/mlswg/mls-protocol/pull/706/files#diff-7c369b85b26a746a7e70cd2884037896defe03b3098bec976f79c994d22a604aL3831
  • Many instances of MLSPlaintext --> MLSAuthenticatedContent Implication?

duesee avatar Oct 11 '22 10:10 duesee

Tracked in #979

franziskuskiefer avatar Oct 11 '22 12:10 franziskuskiefer