diff --git a/proto/mls/api/v1/mls.proto b/proto/mls/api/v1/mls.proto index 94e02d02..08827337 100644 --- a/proto/mls/api/v1/mls.proto +++ b/proto/mls/api/v1/mls.proto @@ -218,7 +218,8 @@ message GroupMessage { bytes data = 4; bytes sender_hmac = 5; bool should_push = 6; - bool is_commit = 7; + bool is_commit = 7 [deprecated = true]; + MessageType message_type = 8; } oneof version { @@ -226,6 +227,15 @@ message GroupMessage { } } +// Enum to specify the type of a message. +// Primarily used for ordering while retaining some metadata. +enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0; + MESSAGE_TYPE_APPLICATION = 1; + MESSAGE_TYPE_COMMIT = 2; + MESSAGE_TYPE_FORK_ADMIN_CHANGE = 3; +} + // Input type for a group message message GroupMessageInput { // Version 1 of the GroupMessageInput payload format diff --git a/proto/mls/message_contents/commit_log.proto b/proto/mls/message_contents/commit_log.proto index 29eb42c3..8b614dff 100644 --- a/proto/mls/message_contents/commit_log.proto +++ b/proto/mls/message_contents/commit_log.proto @@ -22,17 +22,34 @@ message PlaintextCommitLogEntry { // The sequence ID of the commit payload being validated. uint64 commit_sequence_id = 2; // The encryption state before the commit was applied. - bytes last_epoch_authenticator = 3; + bytes last_epoch_authenticator = 3 [deprecated = true]; // Indicates whether the commit was successful, or why it failed. CommitResult commit_result = 4; // The epoch number after the commit was applied, if successful. uint64 applied_epoch_number = 5; // The encryption state after the commit was applied, if successful. bytes applied_epoch_authenticator = 6; + + // The hmac of the installation_id that published this commit log entry. + // Value: hmac-sha256(salt, installation_id) + bytes installation_hmac = 7; } message CommitLogEntry { uint64 sequence_id = 1; bytes serialized_commit_log_entry = 2; - xmtp.identity.associations.RecoverableEd25519Signature signature = 3; + xmtp.identity.associations.RecoverableEd25519Signature deprecated_signature = 3 [deprecated = true]; + + // Installation cred signature on field 2 + group salt + bytes signature = 4; +} + +message ForkAdminChange { + // Used to protect against replays, and against replays for new members. + int64 sequence_id = 1; + // value: hmac-sha256(group salt, installation_id) + bytes fork_admin_hmac = 2; + // Installation cred signature on fields 1 + 2 + 4 + group salt + bytes signature = 3; + bytes group_id = 4; } diff --git a/proto/mls_validation/v1/service.proto b/proto/mls_validation/v1/service.proto index ae921cf3..8af7ebd0 100644 --- a/proto/mls_validation/v1/service.proto +++ b/proto/mls_validation/v1/service.proto @@ -5,6 +5,7 @@ package xmtp.mls_validation.v1; import "identity/api/v1/identity.proto"; import "identity/associations/association.proto"; import "identity/credential.proto"; +import "mls/api/v1/mls.proto"; option go_package = "github.com/xmtp/proto/v3/go/mls_validation/v1"; @@ -98,7 +99,8 @@ message ValidateGroupMessagesResponse { bool is_ok = 1; string error_message = 2; string group_id = 3; - bool is_commit = 4; + bool is_commit = 4 [deprecated = true]; + xmtp.mls.api.v1.MessageType message_type = 5; } repeated ValidationResponse responses = 1;