diff --git a/proto/umbra/base.proto b/proto/umbra/base.proto index ee5bb87..8b9d7de 100644 --- a/proto/umbra/base.proto +++ b/proto/umbra/base.proto @@ -24,35 +24,10 @@ message ReliabilityInfo { /////////////////////////////////////////////////////////////////////////////// -// TODO: This also encompasses plaintexts, is there a better name? -// Alternatives: ??? - -message EncryptedBytes { - - oneof encryption { - bytes encrypted_bytes=1; - Plaintext plaintext = 2; - Ecies ecies = 3; - } - - - message Ecies { - bytes encrypted_bytes=1; - bytes ephemeral_pubkey = 2; - bytes tag = 3; - - } - - message Plaintext { - bytes payload=1; - } -} - - message UmbraEnvelopeV1 { string conversation_hint = 1; uint32 nonce = 2; - EncryptedBytes encrypted_bytes = 100; + bytes encrypted_bytes = 100; } \ No newline at end of file diff --git a/proto/umbra/encryption.proto b/proto/umbra/encryption.proto new file mode 100644 index 0000000..80d96ca --- /dev/null +++ b/proto/umbra/encryption.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package umbra.encryption; + + +message Plaintext { + bytes payload=1; +} + +message Ecies { + bytes encrypted_bytes=1; + bytes ephemeral_pubkey = 2; + bytes tag = 3; +} + +// TODO: This also encompasses plaintexts, is there a better name? +// Alternatives: ??? +message EncryptedBytes { + + oneof encryption { + Plaintext plaintext = 1; + Ecies ecies = 2; + } +}