Basic support for encrypted push-based attachments.

1) Move the attachment structures into the encrypted message body.

2) Encrypt attachments with symmetric keys transmitted in the
   encryptd attachment pointer structure.

3) Correctly handle asynchronous decryption and categorization of
   encrypted push messages.

TODO: Correct notification process and network/interruption
      retries.
This commit is contained in:
Moxie Marlinspike
2013-09-08 18:19:05 -07:00
parent cddba2738f
commit 0dd36c64a4
47 changed files with 2381 additions and 1003 deletions

View File

@@ -7,13 +7,18 @@ message IncomingPushMessageSignal {
optional uint32 type = 1;
optional string source = 2;
repeated string destinations = 3;
optional bytes message = 4;
optional uint64 timestamp = 4;
optional bytes message = 5; // Contains an encrypted IncomingPushMessageContent
}
message PushMessageContent {
optional string body = 1;
message AttachmentPointer {
optional string contentType = 1;
optional string key = 2;
optional fixed64 id = 1;
optional string contentType = 2;
optional bytes key = 3;
}
repeated AttachmentPointer attachments = 5;
optional uint64 timestamp = 6;
repeated AttachmentPointer attachments = 2;
}