[OTR-dev] Persisting userstate object across app restarts.

Madhav V madhav at avaamo.com
Mon Aug 11 19:38:36 EDT 2014


Hi

We are planning to use libotr in our mobile app and expect it to work like
this.

1. Bob opens the OTR chat screen (different from regular chat) with Alice.

2. If its the first time, we send a Apple push notification to Alice saying
'Bob wants to have OTR chat with you. Go to the app'.

3. Alice goes into the app. Bob and Alice apps establish a secure session.
The app persist the session on Alice' device.
The session is persisted on Bob's device as well.

4. Now Bob can send Alice messages even when her phone is switched off or
off the network or the app is in the background.

5. Alice's app can restore the session on restart or whenever necessary to
decrypt Bob's message.

We started persisting  userstate and so far not successful. I am wondering
if anybody has attempted persisting the userstate successfully or any
pointers in general?

Once it works will be happy to send a pull request.

Thanks
Madhav

PS: As a side note, we managed to save and restore OTR session for the
java(Android) implementation by extending https://github.com/jitsi/otr4j
the JSON format of the session looks like the attached. Although the
attachment is in JSON format, we use BSON in the app.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20140811/0cdf2939/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: otr4j-session.json
Type: application/json
Size: 6446 bytes
Desc: not available
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20140811/0cdf2939/attachment.json>


More information about the OTR-dev mailing list