aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto/axolotl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Only announce device after publishing bundleAndreas Straub2015-08-261-6/+18
|
* Fix key publishingAndreas Straub2015-08-261-72/+68
| | | | | | | Remove invalid check for result code, which prevented publishing if the node was empty to begin with. Fix pepBroken check
* Add more logging to pep attemp counter logicAndreas Straub2015-08-251-0/+1
|
* Limit number of PEP publish triesAndreas Straub2015-08-251-9/+42
| | | | | | If PEP publish tries are repeatedly triggered by empty PEP updates, stop attempting to publish after 3 tries. This should work around broken PEP implementations in older ejabberd and OpenFire versions.
* Pass through device IDs when updating own listAndreas Straub2015-08-251-17/+17
|
* cleared up some error messages in axolotl service and execute ↵Daniel Gultsch2015-08-251-3/+7
| | | | publishOwnDevicesWhenNeeded() only if processing our own jid
* Add error handling to OMEMO PEP codeAndreas Straub2015-08-231-116/+131
| | | | Log received errors and abort processing
* Increase number of published prekeys for releaseAndreas Straub2015-08-071-1/+1
|
* Let UNTRUSTED/UNDECIDED keys become INACTIVEAndreas Straub2015-08-013-79/+94
|
* Provide process function for key transport messageAndreas Straub2015-07-313-18/+83
|
* Refactor axolotl message processing workflowAndreas Straub2015-07-313-152/+116
| | | | | | | | | | | | | | XmppAxolotlMessage is now entirely responsible for handling encryption and decryption of messages, only leveraging XmppAxolotlSession as a packing/unpacking primitive for payload keys. Removed pseudo-dead session generation code step from prepareMessage function, as sessions have been created by invoking the TrustKeysActivity for a while now. Added prepareKeyTransportMessage function, which creates a message with no payload. The key that is packed into the header keyElements can then be used for other purposes (e.g. encrypted file transfer).
* Reformat codeAndreas Straub2015-07-313-86/+87
|
* Change to new wire protocol versionAndreas Straub2015-07-314-72/+111
|
* Fix NPE: consider unknown keys UNDECIDEDAndreas Straub2015-07-291-1/+2
|
* Refactor out inner classes, cache trust storeAndreas Straub2015-07-294-563/+613
| | | | | | | Moves SQLiteAxolotlStore and XmppAxolotlSession into proper classes. IdentityKeys trust statuses are now cached in an LruCache to prevent hammering the database when rendering the UI.
* Always build own device session automaticallyAndreas Straub2015-07-221-6/+13
|
* Add INACTIVE state for removed keysAndreas Straub2015-07-211-11/+43
| | | | | | | | | | | | | We introduce a new trust state: INACTIVE. This state is intended for old keys that have been removed. When a TRUSTED device is removed from the PEP devicelist, it's status will be set to INACTIVE. INACTIVE keys are shown in the UI as greyed out, non-interactible key rows. Messages are not encrypted for INACTIVE devices. When an INACTIVE device reappears in PEP, or a message is received from an INACTIVE device, it is set back to trusted.
* Fill own device sessions into SessionMapAndreas Straub2015-07-211-7/+14
|
* Use properly fixed numeral values in Trust enumAndreas Straub2015-07-211-4/+26
| | | | Why, oh God, why?! #thanksjamesgosling
* Remove unused importAndreas Straub2015-07-211-1/+0
|
* Switch payload encryption to AES-GCMAndreas Straub2015-07-213-17/+46
| | | | This also ensures that the IV is generated with proper randomness.
* Also decrypt messages from UNTRUSTED sessionsAndreas Straub2015-07-201-1/+1
|
* Refactor axolotl send processing/caching flowAndreas Straub2015-07-201-9/+8
|
* Start TrustKeysActivity if no keys are TRUSTEDAndreas Straub2015-07-201-6/+6
| | | | | If there are no UNDECIDED keys, but none of the contact's keys are trusted, redirect the user to the TrustKeysActivity
* Add purge axolotl key optionAndreas Straub2015-07-202-30/+61
| | | | Can now long-press a key to permanently purge it.
* attempt to fix the delay problemDaniel Gultsch2015-07-201-5/+5
|
* Lock TrustKeys if no trusted keys are availableAndreas Straub2015-07-201-0/+8
|
* Optimize importsAndreas Straub2015-07-202-4/+1
|
* Ask for key trust when sending messagesAndreas Straub2015-07-191-37/+88
| | | | | | If the contact (or the own account) has keys that have UNDECIDED trust, we now drop the user into the new TrustKeysActivity, where they have to decide for each new key whether it should be TRUSTED or UNTRUSTED.
* Send correct body for HTTP filesAndreas Straub2015-07-191-1/+7
| | | | | When using HTTP upload to send files, take care to transmit only the URL rather than the entire body, which contains metadata.
* Fix trust status for outgoing messagesAndreas Straub2015-07-191-8/+8
| | | | | | Tag sent messages with own fingerprint, set own fingerprint as always trusted, include own fingerprint in database trust search, explicitly reset trust colorfilter
* Ensure that available sessions are always usedAndreas Straub2015-07-191-9/+30
| | | | | | | | | | | | | | | | | | Any time a new session is established, call syncRosterToDisk() to ensure that on subsequent restoreFromDatabase() calls, the roster is actually available. This is important so that initAccountServices() can properly initialize the SessionMap. This prevents a race condition where after adding a new account and initiating sessions with it, if the app is killed (e.g. by reinstall) before triggering a syncRosterToDisk(), subsequent restores will not have the roster available, leading to missing XmppAxolotlSessions in the SessionMap cache. As a result of this, a new session was initiated when sending a new message, and received messages could not be tagged with the originating session's fingerprint. As an added sanity check, go to the database to confirm no records are present before creating fresh XmppAxolotlSession objects (both in the sending and receiving case).
* Fix and expand key regeneration functionAndreas Straub2015-07-191-9/+18
| | | | | | Wipe session cache to prevent stale sessions being used. Wipe fetch status cache to enable recreation of sessions. Regenerate deviceId, so that foreign devices will talk to us again.
* Overhauled Message taggingAndreas Straub2015-07-192-43/+68
| | | | | | Messages are now tagged with the IdentityKey fingerprint of the originating session. IdentityKeys have one of three trust states: undecided (default), trusted, and untrusted/not yet trusted.
* Use full int range for device IDsAndreas Straub2015-07-191-1/+1
|
* Clean up unused constantAndreas Straub2015-07-191-1/+0
|
* Make some fields finalAndreas Straub2015-07-191-3/+3
|
* Clean up loggingAndreas Straub2015-07-191-54/+61
| | | | | Add a fixed prefix to axolotl-related log messages, set log levels sensibly.
* Add basic PEP managemend UI to EditAccountActivityAndreas Straub2015-07-191-0/+33
| | | | | | | | | EditAccountActivity now show own fingerprint, and gives an option to regenerate local keying material (and wipe all sessions associated with the old keys in the process). It also now displays a list of other own devices, and gives an option to remove all but the current device.
* Fix devicelist update handlingAndreas Straub2015-07-191-0/+5
| | | | | | No longer store own device ID (so that we don't encrypt messages for ourselves), verify that own device ID is present in update list (otherwise republish), reflect update in UI.
* Only cache session if successfully establishedAndreas Straub2015-07-191-1/+6
| | | | | | | | When receiving a message, only remember the XmppAxolotlSession wrapper if the prospective session was actually established. This prevents us from erroneously adding empty sessions that are never established using received PreKeyWhisperMessages, which would lead to errors if we try to use them for sending.
* Return empty set on invalid PEP devicelistAndreas Straub2015-07-191-1/+2
|
* Trust all IdentityKeysAndreas Straub2015-07-191-2/+3
| | | | | | | | | The trust-on-first-use policy leads to problems when receiving messages from two different devices of a contact before sending a message to them (as their IdentityKeys will not have been added yet). Since session trust will be managed externally anyway, this change is not a security problem, and will allow us to decrypt messages from yet-untrusted sessions.
* Refresh PEP on session establishAndreas Straub2015-07-191-0/+18
| | | | | | | | We now track preKeys used to establish incoming sessions with us. On each new established session, we remove the used prekey from PEP. We have to do this because libaxolotl-java internally clears the used preKey from its storage, so we will not be able to establish any future sessions using that key.
* Fix asynchronous axolotl message sendingAndreas Straub2015-07-191-6/+23
| | | | | | | | | | XmppConnectionService.sendMessage() now dispatches messages to the AxolotlService, where they only are prepared for sending and cached. AxolotlService now triggers a XmppConnectionService.resendMessage(), which then handles sending the cached message packet. This transparently fixes, e.g., handling of messages sent while we are offline.
* Properly track message senderAndreas Straub2015-07-192-11/+12
| | | | | | | Previously, the sender was assumed to be the conversation counterpart. This broke carboned own-device messages. We now track the sender properly, and also set the status (sent by one of the own devices vs received from the counterpart) accordingly.
* Rework PEP content verificationAndreas Straub2015-07-191-47/+61
| | | | | | Now checks which part(s) are out of sync w/ local storage, and updates only those, rather than assuming the entire node corrupt and overwriting it all (especially relevant for preKey list)
* Formatting fixesAndreas Straub2015-07-191-2/+2
|
* When receiving, add mock session if none existsAndreas Straub2015-07-191-1/+1
| | | | | | | | | | We need a session object in order to build a session from a PreKeyWhisperMessage, so add an empty one when none exists on receiving a message. Warning: this will break right now if the session can not be constructed from the received message.There will be an invalid session which will break if we try to send using it.
* Tag messages with originating sessionAndreas Straub2015-07-191-0/+5
| | | | | This can be used later in order to display trust status of messages, as well as for potential resending of messages in case of preKey conflicts.