Remove xk0 references (#5)

* Remove XK0

* Update comments

* Generate code

* newlines
This commit is contained in:
Jazz Turner-Baggs 2026-01-22 00:52:16 +07:00 committed by GitHub
parent 615f856588
commit 21cd52b064
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 22 deletions

View File

@ -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<inbox_handshake_v1::InboxHeaderV1>,
#[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)

View File

@ -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;
}