sealed_sender.proto 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. syntax = "proto2";
  2. //
  3. // Copyright 2020 Signal Messenger, LLC.
  4. // SPDX-License-Identifier: AGPL-3.0-only
  5. //
  6. package signal.proto.sealed_sender;
  7. message ServerCertificate {
  8. message Certificate {
  9. optional uint32 id = 1;
  10. optional bytes key = 2;
  11. }
  12. optional bytes certificate = 1;
  13. optional bytes signature = 2;
  14. }
  15. message SenderCertificate {
  16. message Certificate {
  17. optional string senderE164 = 1;
  18. optional string senderUuid = 6;
  19. optional uint32 senderDevice = 2;
  20. optional fixed64 expires = 3;
  21. optional bytes identityKey = 4;
  22. optional ServerCertificate signer = 5;
  23. }
  24. optional bytes certificate = 1;
  25. optional bytes signature = 2;
  26. }
  27. message UnidentifiedSenderMessage {
  28. message Message {
  29. enum Type {
  30. PREKEY_MESSAGE = 1;
  31. MESSAGE = 2;
  32. // Further cases should line up with Envelope.Type, even though old cases don't.
  33. reserved 3 to 6;
  34. SENDERKEY_MESSAGE = 7;
  35. PLAINTEXT_CONTENT = 8;
  36. }
  37. enum ContentHint {
  38. reserved 0; // Default: sender will not resend; an error should be shown immediately
  39. RESENDABLE = 1; // Sender will try to resend; delay any error UI if possible
  40. IMPLICIT = 2; // Don't show any error UI at all; this is something sent implicitly like a typing message or a receipt
  41. }
  42. optional Type type = 1;
  43. optional bytes /*SenderCertificate*/ senderCertificate = 2;
  44. optional bytes content = 3;
  45. optional ContentHint contentHint = 4;
  46. optional bytes groupId = 5;
  47. }
  48. optional bytes ephemeralPublic = 1;
  49. optional bytes encryptedStatic = 2;
  50. optional bytes encryptedMessage = 3;
  51. }