Commit Graph

12 Commits

Author SHA1 Message Date
Andreas Straub 9206a49b79 Rework PEP content verification
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)
2015-07-05 17:27:29 +02:00
Andreas Straub 7680a24180 Formatting fixes 2015-07-05 17:27:29 +02:00
Andreas Straub c1116b6066 When receiving, add mock session if none exists
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.
2015-07-05 17:27:29 +02:00
Andreas Straub a58d5e8ce3 Fetch bundles on-demand, encrypt in background
Bundles are now fetched on demand when a session needs to be
established. This should lessen the chance of changes to the bundles
occuring before they're used, as well as lessen the load of fetching
bundles.

Also, the message encryption is now done in a background thread, as this
can be somewhat costly if many sessions are present. This is probably
not going to be an issue in real use, but it's good practice anyway.
2015-07-05 17:27:22 +02:00
Andreas Straub ae75c571df Use bareJid for own session retrieval 2015-07-05 17:26:29 +02:00
Andreas Straub ba9520729f Migrate to new PEP layout
Merge prekeys into bundle node
2015-07-05 17:26:29 +02:00
Andreas Straub 287ce131d8 Formatting fixes 2015-07-05 17:26:29 +02:00
Andreas Straub 046a2d6045 Save IdentityKeys in database 2015-07-05 17:26:29 +02:00
Andreas Straub 0423852cb8 Reformat code to use tabs
This really sucks to do it like this. Sorry. :(
2015-07-05 17:26:29 +02:00
Andreas Straub 61f18d4dfc Added PEP and message protocol layers
Can now fetch/retrieve from PEP, as well as encode/decode messages
2015-07-05 17:14:46 +02:00
Andreas Straub 6805abbef0 Reworked axolotl protocol layer
Numerous fixes
2015-07-05 17:09:35 +02:00
Andreas Straub f16b77d382 CryptoNext persistance layer mockup
Initial sketch of the peripheral storage infrastructure for the new
axolotl-based encryption scheme.
2015-07-05 17:09:34 +02:00