Commit Graph

87 Commits

Author SHA1 Message Date
Moxie Marlinspike
2d083208cc Handle negative directory case and unlisted contacts. 2014-01-06 14:35:54 -08:00
Moxie Marlinspike
75cca3add1 Resign ourselves to a less sophisticated contact intersection method. 2014-01-06 14:35:53 -08:00
Moxie Marlinspike
073b1f69e3 Rollbacks, v2 sms-transport key exchanges, push identity conflicts.
1) Stop protocol rollbacks.

2) Handle v2 version key exchange messages.

3) Handle identity key conflicts on prekeybundle messages.
2014-01-06 14:35:53 -08:00
Moxie Marlinspike
8f6590b738 Handle notifications and receiving push when locked. 2014-01-06 14:35:53 -08:00
Moxie Marlinspike
0dd36c64a4 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.
2014-01-06 14:35:53 -08:00
Moxie Marlinspike
cddba2738f Make encoding/decoding more explicit. 2014-01-06 14:35:53 -08:00
Moxie Marlinspike
0cc5837d7f Support encrypted transport, properly handle multiple recipients.
1) Add encryption support for the transport layer.  This obscures
   metadata from the push messaging provider.

2) Better support the direction multiple destination messages is
   headed (one unique message per recipient).
2014-01-06 14:35:53 -08:00
Moxie Marlinspike
68ec0a3727 Add last resort key and signaling key. 2014-01-06 14:35:53 -08:00
Moxie Marlinspike
45e380a5bb move constants into library 2014-01-06 14:35:52 -08:00
Moxie Marlinspike
7f642666dd Basic support for prekeybundle message delivery and receipt. 2014-01-06 14:35:52 -08:00
Moxie Marlinspike
d1969412fb Move PreKey ids to be Mediums, generate in circular buffer. 2014-01-06 14:35:51 -08:00
Moxie Marlinspike
edb89ee3e9 Encode prekey as full JSON rather than protobuf blobs.
1) Split prekey messages out into full JSON.

2) Add support for retrieving prekeys.
2014-01-06 14:35:51 -08:00
Moxie Marlinspike
499de2d2bf Move prekey jsonifcation into the push code, add identity key. 2014-01-06 14:35:51 -08:00
Moxie Marlinspike
b8f663b69c Move common crypto classes into TextSecureLibrary.
1) Move all the crypto classes from securesms.crypto.

2) Move all the crypto storage from securesms.database.keys

3) Replace the old imported BC code with spongycastle.
2014-01-06 14:35:51 -08:00
Moxie Marlinspike
2042ca6cb7 Generate "prekeys" at push registration time.
This generates a large number of key exchange messages and
registers them with the server during signup.
2014-01-06 14:34:47 -08:00
Moxie Marlinspike
fb378a6e00 Change attachment retrieval interface 2014-01-06 14:33:53 -08:00
Moxie Marlinspike
9287d413ac Support for incoming attachments.
1) Refactored MMS layer to use abstracted types.

2) Added support for retrieving attachment IDs.
2014-01-06 14:33:52 -08:00
Moxie Marlinspike
4bb337a3a0 Revised support for outgoing attachments 2014-01-06 14:33:52 -08:00
Moxie Marlinspike
fd045f2354 Refactor MMS send/download to be synchronous.
1) Make the radio change a synchronous action with a timeout.

2) Move the send logic into an MmsTransport, in preparation for
   UniversalTransport composition.

3) Move the download logic into a synchronous receiver.
2014-01-06 14:33:52 -08:00
Moxie Marlinspike
d7070e7ecf Inserted the Registration activity into initial setup flow.
1) Added push messaging toggle to preferences.

2) Added push messaging registration screen to setup flow.

3) Migrated rest of SharedPreferences accessors to
   TextSecurePreferences.
2014-01-06 14:30:03 -08:00
Moxie Marlinspike
52e5274a2f Add registration notification support. 2014-01-06 14:21:51 -08:00
Moxie Marlinspike
0ed9da9a2c Strings and slight cleanup 2014-01-06 14:21:50 -08:00
Moxie Marlinspike
26dadfcb7a Move trust store to raw resource from asset. 2014-01-06 14:21:50 -08:00
Moxie Marlinspike
1ac06312a0 Move directory and push service socket into library. 2014-01-06 14:21:50 -08:00
Moxie Marlinspike
a200d29514 Move most of Util into library 2014-01-06 14:21:50 -08:00
Moxie Marlinspike
21eee19380 Split into library project and add shared preferences layer of indirection. 2014-01-06 14:20:59 -08:00
Moxie Marlinspike
3634ba0b55 Registration with voice verification. 2014-01-06 14:18:30 -08:00
Veeti Paananen
eb1b762a76 Improve password caching notification UI & UX
On Jelly Bean and above:

- Use the standard notification style for a better and consistent visual
  appearance

- Use the JB notification actions API for the locking action

- Use a lower notification priority to prioritize other notifications
  over TextSecure

On ICS:

- Use the existing custom notification layout

Everywhere:

- Allow opening the app itself from the notification

- Simplify strings: don't talk about a "cached passphrase" but about the
  app being "unlocked"/"locked"
2013-12-22 04:48:39 +02:00
Moxie Marlinspike
7c2fb74af4 Fix for bug that could drop unencrypted MMS on KitKat. 2013-12-07 11:03:26 -08:00
Moxie Marlinspike
e0aa7fd359 Let unencrypted messages through. 2013-12-03 08:10:58 -08:00
Moxie Marlinspike
aad82e314d Fix duplicate MMS bug in KitKat.
1) Fix for typo that caused duplicate incoming MMS.

2) Only pay attention to "use for all" properties in < KitKat.
2013-12-02 21:39:09 -08:00
Moxie Marlinspike
b0216e1494 Finish KitKat compatibility details.
1) The system does actually enforce having a BROADCAST_SMS
   permission on the SMS receiver. Break out the "delivered"
   parts of this into a separate Receiver, so the permission
   won't trip up GB devices.

2) The system does actually enforce having "quick response"
   intents.  Add a no-op for now.

3) Add a "make default" prompt.

4) Update settings to reflect what's going on in KitKat.
2013-12-02 12:31:59 -08:00
Gabe Conradi
e81756f443 Proper SMS support for KitKat. 2013-12-02 08:32:34 -08:00
rhodey
2c2a03e5e2 Enhanced MMS configuration prompts and processing.
1) Added a new message status to MmsDatabase to
   signify a pending MMS download which requires
   APN settings.

2) Added a database method to query MMS messages
   based on status.

3) Added login to SendReceiveService for processing
   of MMS pending APN information.

4) Moved all APN/MMS settings into ApnPreferencesActivity
   and transformed PromptApnActivity into a simple
   informational activity.

5) Added logic to check for APN settings on send and
   receive of all MMS (media, group, email) and direct
   user to PromptApnActivity then ApnPreferencesActivity
   if necessary.

6) Vocab/grammar adjustments.
2013-10-20 16:56:34 -07:00
Moxie Marlinspike
f49c62793b Merge pull request #377 from meskio/resend_message_on_fail2
Allow to resend a failed message
2013-10-15 06:32:12 -07:00
Ruben Pollan
04eafd5fab Allow to resend a failed message
Add an option to the context menu of the message to resend it if it has
failed.
2013-10-13 15:39:15 +02:00
Ruben Pollan
4826dbcc34 Upgrade notification KeyCachingService code to NotificationCompat.Builder 2013-10-12 15:04:16 +02:00
joeykrim
8464bc775a Removed extra comparisons by converting original phrase to uppercase, then comparing
Removed previous multiple comparisons that were variations of capitalizing the same phrase by converting the original phrase to all uppercase and then comparing
2013-07-13 16:41:09 -04:00
joeykrim
87e8214bae Small clarification in the comments on the types of SMS to ignore 2013-07-08 10:16:25 -04:00
Moxie Marlinspike
d97252d8d6 Add ability to disable local encryption passphrase. 2013-07-01 10:15:36 -07:00
Moxie Marlinspike
8524cc5598 Resolved a few MMS issues.
1) Fixed the "Unsupported Encoding!" problem.

2) Workaround for the Sprint issue, where the MMSC is adding a single
   extra byte to the end of each encrypted message.

3) Fixed the "large blob of base64 text" on encrypted MMS problem.
2013-06-15 09:06:15 -07:00
Moxie Marlinspike
24fc93e9ae Switch to a more heavily TOFU model for identity keys.
1) There is no longer a concept of "verified" or "unverified."
   Only "what we saw last time" and "different from last time."

2) Let's eliminate "verify session," since we're all about
   identity keys now.

3) Mark manually processed key exchanges as processed.
2013-05-23 16:36:24 -07:00
Moxie Marlinspike
be34f30719 Lower maximum size of cursor window on DB upgrade.
On some systems, the DB upgrade was failing because there were
too many rows for the cursor window.  This moves some looping
operations into single update statements by using the substr()
command, and chunks the rest using a series of LIMITs.
2013-05-16 13:16:42 -07:00
Moxie Marlinspike
ad6760b62c Correctly handle deferred processing of key exchange message when locked. 2013-05-15 14:09:13 -07:00
Moxie Marlinspike
e07c1a8e92 Handle failed MMS connectivity state appropriately. 2013-05-07 15:09:24 -07:00
Moxie Marlinspike
81107a98eb Send m-notifyresp-ind after retrieving MMS 2013-05-06 19:09:06 -07:00
Moxie Marlinspike
0b172cebce Use DB sending type rather than in-memory hashtable. 2013-05-06 08:40:56 -07:00
Moxie Marlinspike
723fb4ffdd MMS and Group Messaging Improvements
1) Display the individual sender name in a group conversation.

2) Add an "address" column to MmsDatabase and keep FROM there.

3) Remove all blocking operations from MmsDatabase.Reader path.

4) Strip SMIL and other undisplayable parts from part count.

5) Fix places where messages weren't being correctly decrypted.
2013-05-06 08:40:55 -07:00
Moxie Marlinspike
2305a648fb Minor refactoring 2013-05-06 08:40:55 -07:00
Moxie Marlinspike
7c47ea5cec Make MMS more asynchronous and consistent with new SMS types.
1) We now delay MMS notifications until a payload is received,
   or there's an error downloading the payload.  This makes
   group messages more consistent.

2) All "text" parts of an MMS are combined into a second text
   record, which is stored in the MMS row directly rather than
   as a distinct part.  This allows for immediate text loading,
   which means there's no chance a ConversationItem will resize.

   To do this, we need to include MMS in the big DB migration
   that's already staged for this application update.  It's also
   an "application-level" migration, because we need the MasterSecret
   to do it.

3) On conversation display, all image-based parts now have their
   thumbnails loaded asynchronously.  This allows for smooth-scrolling.
   The thumbnails are also scaled more accurately.
2013-05-06 08:40:55 -07:00