TextSecure.proto 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /**
  2. * Copyright 2013 Signal Messenger, LLC
  3. * SPDX-License-Identifier: AGPL-3.0-only
  4. */
  5. syntax = "proto2";
  6. package textsecure;
  7. option java_package = "org.whispersystems.textsecuregcm.entities";
  8. option java_outer_classname = "MessageProtos";
  9. message Envelope {
  10. enum Type {
  11. UNKNOWN = 0;
  12. CIPHERTEXT = 1;
  13. KEY_EXCHANGE = 2;
  14. PREKEY_BUNDLE = 3;
  15. SERVER_DELIVERY_RECEIPT = 5;
  16. UNIDENTIFIED_SENDER = 6;
  17. reserved 7;
  18. PLAINTEXT_CONTENT = 8; // for decryption error receipts
  19. }
  20. optional Type type = 1;
  21. optional string source_uuid = 11;
  22. optional uint32 source_device = 7;
  23. optional uint64 timestamp = 5;
  24. optional bytes content = 8; // Contains an encrypted Content
  25. optional string server_guid = 9;
  26. optional uint64 server_timestamp = 10;
  27. optional bool ephemeral = 12; // indicates that the message should not be persisted if the recipient is offline
  28. optional string destination_uuid = 13;
  29. optional bool urgent = 14 [default=true];
  30. optional string updated_pni = 15;
  31. optional bool story = 16; // indicates that the content is a story.
  32. optional bytes report_spam_token = 17; // token sent when reporting spam
  33. // next: 18
  34. }
  35. message ProvisioningUuid {
  36. optional string uuid = 1;
  37. }
  38. message ServerCertificate {
  39. message Certificate {
  40. optional uint32 id = 1;
  41. optional bytes key = 2;
  42. }
  43. optional bytes certificate = 1;
  44. optional bytes signature = 2;
  45. }
  46. message SenderCertificate {
  47. message Certificate {
  48. optional string sender = 1;
  49. optional string sender_uuid = 6;
  50. optional uint32 sender_device = 2;
  51. optional fixed64 expires = 3;
  52. optional bytes identity_key = 4;
  53. optional ServerCertificate signer = 5;
  54. }
  55. optional bytes certificate = 1;
  56. optional bytes signature = 2;
  57. }