Commit graph

31 commits

Author SHA1 Message Date
Moxie Marlinspike
5602a3dfc0 Update to latest version of libtextsecure for simplified interface.
1) Switch to new TextSecureAddress addressing, rather than mixing
   long-based recipient IDs into libtextsecure.

2) Get rid of RecipientFormattingException throws in calls to
   RecipientFactory.

Closes #2570
2015-03-03 12:25:09 -08:00
Moxie Marlinspike
00d7b5c284 Better UX handling on identity key mismatches.
1) Migrate from GSON to Jackson everywhere.

2) Add support for storing identity key conflicts on message rows.

3) Add limited support for surfacing identity key conflicts in UI.
2015-02-27 12:26:09 -08:00
Moxie Marlinspike
d4493e700e Add GroupId for received messages.
// FREEBIE
2015-02-23 09:53:32 -08:00
Jake McGinty
f092e85b62 Workaround for LGE-related NPEs
See: https://code.google.com/p/android/issues/detail?id=78154

Fixes #2424
Closes #2428

// FREEBIE
2015-02-09 09:15:44 -08:00
Jake McGinty
e8b947dfde Pass recipient ids, not recipient objects
Fixes #2233
// FREEBIE
2014-12-22 14:53:28 -08:00
Moxie Marlinspike
bea26e83da Correctly process push messages with identity key conflicts. 2014-11-12 15:42:43 -08:00
Moxie Marlinspike
08ed90c5ec Split out Util functions. 2014-11-12 15:42:43 -08:00
Moxie Marlinspike
a3f1d9cdfd Beginning of libtextsecure refactor.
1) Break out appropriate components.

2) Switch the incoming pipeline from SendReceiveService to
   the JobManager.
2014-11-12 15:21:32 -08:00
Moxie Marlinspike
819982af7b Rearrange decrypt API.
1) Change SessionBuilder to only establish sessions via
   KeyExchangeMessage and PreKeyBundles.

2) Change SessionCipher to decrypt either WhisperMessage
   or PreKeyWhisperMessage items, automatically building
   a session for the latter.

3) Change SessionCipher to tear down new sessions built
   with PreKeyWhisperMessages if the embedded WhsiperMessage
   fails to decrypt.
2014-10-20 12:25:38 -07:00
Moxie Marlinspike
931605a1c4 Move identity key verification into libaxolotol. With tests. 2014-10-20 12:14:18 -07:00
Moxie Marlinspike
72af8b11c2 Move session construction and KeyExchangeMessage into libaxolotl.
1) Add plain two-way key exchange support libaxolotl by moving
   all the KeyExchangeMessage code there.

2) Move the bulk of KeyExchangeProcessor code to libaxolotl
   for setting up sessions based on retrieved prekeys, received
   prekeybundles, or exchanged key exchange messages.
2014-10-20 12:14:17 -07:00
Moxie Marlinspike
a1db221caf Collapse KeyExchangeMessage and KeyExchangeProcessor interfaces. 2014-10-20 12:14:17 -07:00
Moxie Marlinspike
d902c12941 Break core ratchet out into libaxolotol.
1) Break the core cryptography functions out into libaxolotol.

2) The objective for this code is a Java library that isn't
   dependent on any Android functions.  However, while the
   code has been separated from any Android functionality,
   it is still an 'android library project' because of the
   JNI.
2014-10-20 12:10:02 -07:00
Moxie Marlinspike
1d07ca3e6f Remove V1 code. 2014-04-16 11:47:51 -07:00
Moxie Marlinspike
125a60290f Correctly handle key conflict resolution for incoming push. 2014-02-22 14:22:12 -08:00
Moxie Marlinspike
19dddd7adf Support for an 'end session' protocol message.
1) On the push side, this message is a flag in PushMessageContent.
   Any secure message with that flag will terminate the current
   sessin.

2) On the SMS side, there is an "end session" wire type and
   the convention that a message with this wire type must be
   secure and contain the string "TERMINATE."
2014-02-19 13:50:32 -08:00
Moxie Marlinspike
e7e5bc0884 Verify identity keys on outgoing messages.
If PreKeyEntity identity key doesn't match local DB, fail
outgoing message and queue "incoming" identity key update
message for manual user approval.
2014-02-16 15:23:49 -08:00
Moxie Marlinspike
0ace469d74 Support for multi-device.
1) In addition to the Recipient interface, there is now
   RecipientDevice.  A Recipient can have multiple corresponding
   RecipientDevices.  All addressing is done to a Recipient, but
   crypto sessions and transport delivery are done to
   RecipientDevice.

2) The Push transport handles the discovery and session setup
   of additional Recipient devices.

3) Some internal rejiggering of Groups.
2014-02-02 19:38:06 -08:00
Moxie Marlinspike
44092a3eff Support for Axolotl protocol.
1) Split code into v1 and v2 message paths.

2) Do the Axolotl protocol for v2.

3) Switch all v2 entities to protobuf.
2014-01-06 14:37:52 -08:00
Moxie Marlinspike
dbc070cd65 Refactor the ciphertext message parsing and building. 2014-01-06 14:36:22 -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
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
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
73bf21602a Move ReceiveKeyActivity back to themed dialog activity. 2013-10-20 19:12:53 -07:00
Moxie Marlinspike
5e2b31af60 Add appropriate text for manual case when identity is trusted. 2013-05-23 17:17:28 -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
c2dcf7ae74 Refactor MasterSecret initialization, access, and timeout paths.
1) Consolidate all of the KeyCachingService interaction into a single
   mixin. Activities extend delegates which call through to the mixin.

2) Switch Activity increment/decrement triggers from onStop to onPause
   in order to account for some screen locks that don't stop activities.
2013-02-10 17:30:51 -08:00
Moxie Marlinspike
bb0ec65744 Include source origin in string key name.
This should help eliminate string duplicates, as well as provide
visibility into where strings in a resource file are being used.
2012-09-19 19:56:04 -07:00
Moxie Marlinspike
4c3b7cbe08 Extract TextSecure strings for i18n.
1) Change all instances which use concatenation to build strings
with variables in them to use string formatting instead.

2) Extract all string literals from layouts and menus into strings.xml

3) Extract all string literals from code into strings.xml
2012-09-07 21:19:37 -07:00
Moxie Marlinspike
bbea3fe1b1 Initial Project Import 2011-12-20 10:20:44 -08:00