diff --git a/gen/rust/src/logoschat/encryption/logoschat.encryption.rs b/gen/rust/src/logoschat/encryption/logoschat.encryption.rs index 9182844..dfb5773 100644 --- a/gen/rust/src/logoschat/encryption/logoschat.encryption.rs +++ b/gen/rust/src/logoschat/encryption/logoschat.encryption.rs @@ -1,7 +1,5 @@ // @generated // This file is @generated by prost-build. -/// TODO: This also encompasses plaintexts, is there a better name? -/// Alternatives: ??? #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct EncryptedPayload { #[prost(oneof="encrypted_payload::Encryption", tags="1, 2, 3")] @@ -16,7 +14,7 @@ pub mod encrypted_payload { #[prost(message, tag="2")] Doubleratchet(super::Doubleratchet), #[prost(message, tag="3")] - Xk0(super::Xk0), + InboxHandshake(super::InboxHandshakeV1), } } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] @@ -39,17 +37,25 @@ pub struct Doubleratchet { pub aux: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct Xk0 { - #[prost(bytes="bytes", tag="1")] - pub initiator_static: ::prost::bytes::Bytes, +pub struct InboxHandshakeV1 { + #[prost(message, optional, tag="1")] + pub header: ::core::option::Option, #[prost(bytes="bytes", tag="2")] - pub initiator_ephemeral: ::prost::bytes::Bytes, - #[prost(bytes="bytes", tag="3")] - pub responder_static: ::prost::bytes::Bytes, - /// Replace with RKI to save bytes - #[prost(bytes="bytes", tag="4")] - pub responder_ephemeral: ::prost::bytes::Bytes, - #[prost(bytes="bytes", tag="5")] pub payload: ::prost::bytes::Bytes, } +/// Nested message and enum types in `InboxHandshakeV1`. +pub mod inbox_handshake_v1 { + #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] + pub struct InboxHeaderV1 { + #[prost(bytes="bytes", tag="1")] + pub initiator_static: ::prost::bytes::Bytes, + #[prost(bytes="bytes", tag="2")] + pub initiator_ephemeral: ::prost::bytes::Bytes, + #[prost(bytes="bytes", tag="3")] + pub responder_static: ::prost::bytes::Bytes, + /// Replace with RKI to save bytes + #[prost(bytes="bytes", tag="4")] + pub responder_ephemeral: ::prost::bytes::Bytes, + } +} // @@protoc_insertion_point(module) diff --git a/protos/encryption.proto b/protos/encryption.proto index 58b7b43..1155bda 100644 --- a/protos/encryption.proto +++ b/protos/encryption.proto @@ -3,14 +3,12 @@ syntax = "proto3"; package logoschat.encryption; -// TODO: This also encompasses plaintexts, is there a better name? -// Alternatives: ??? message EncryptedPayload { oneof encryption { encryption.Plaintext plaintext = 1; encryption.Doubleratchet doubleratchet = 2; - encryption.XK0 xk0 = 3; + encryption.InboxHandshakeV1 inbox_handshake = 3; } } @@ -26,10 +24,14 @@ message Doubleratchet { string aux = 5; } -message XK0 { - bytes initiator_static = 1; - bytes initiator_ephemeral = 2; - bytes responder_static = 3; - bytes responder_ephemeral = 4; // Replace with RKI to save bytes - bytes payload = 5; +message InboxHandshakeV1 { + + message InboxHeaderV1 { + bytes initiator_static = 1; + bytes initiator_ephemeral = 2; + bytes responder_static = 3; + bytes responder_ephemeral = 4; // Replace with RKI to save bytes + } + InboxHeaderV1 header = 1; + bytes payload = 2; }