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