powered by Jive Software

Smack 4.2.1-beta2-SNAPSHOT OmemoManager#regnerate does not update server DeviceList


#1

The test arecarried out with the following two devices. aTalk client has reflection implementation as mentioned in

Devices under test:

a. N3 - leopard@atalk.org(Note3-aTalk)

b. S3 - swan@atalk.org(S3-aTalk)

Initially N3 and S3 are setup to communicate in Omemo mode and olmMessages sending between them are working as expected.

Then performed an omemoDevice regeneration on S3. Check S3 sqlite database, and confirm all tables are correctly updated with the appropriate data for the new deviceID. S3 also publishes its new bundle data onto the xmpp server. However it was found that the server DeviceList is left untouched and still contains the old deviceID’s.

When an olmMessage is sent from S3, its sid reflected the new generated deviceID. N3 detects the new deviceID is not in its database, and sends RatchetUpdateMessage.

//—

07-24 21:36:05.509 D/SMACK: RECV (0): MwohBTukbWgBtdyMtlcLZumk3RRupsb5u+/KyTzyycJtyYwtEAEYASIwqdbm5e CLOfNC4rv4c+V9WBh1BsQDMQZdQBCqohFi4OQZpNJhZUBGreN+LgyQQLa4vTKVfRx+FhI= Jp5P+T5GPo7Qr1UFkIE6Uw==OX97sw==I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo849f7ecd-1fd8-400f-8180-b20218f6de01

07-24 21:36:05.589 W/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoStore.getOmemoSessionOf() getOmemoSessionOf could not load identityKey of swan@atalk.org:949870470: Loaded OMEMO IdentityKey is null for: swan@atalk.org:949870470

07-24 21:36:05.589 I/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoStore.getOmemoSessionOf() getOmemoSessionOf couldn’t find an identityKey for swan@atalk.org:949870470. Initiate session without.

07-24 21:36:05.599 W/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoStore.getOmemoSessionOf() Can’t update IdentityKey of swan@atalk.org:949870470: Loaded OMEMO IdentityKey is null for: swan@atalk.org:949870470

07-24 21:36:05.599 I/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoService.processStanza() Received message with invalid session from swan@atalk.org:949870470. Send RatchetUpdateMessage.

-------//

The S3 new bundle preKeys are then fetched from server and updated to its N3 tables. N3 then re-established new session with S3 new the deviceID.

//-------

07-24 21:36:05.629 D/SMACK: SENT (0):

07-24 21:36:05.709 D/SMACK: RECV (0): 01creation@001500:903258:096289creation@001500:903258:096 289BXBo2hKtYkXTfncroIgIO5JillmvK4Mb75C1YavoHG0s</signedPreKeyPu blic>BOjGMufrfrIDby06cBbCoHdw0Le5LykV8aPFwboHff4yhtA5/qVA 3VQL+BnhByI1ODkzWdTFcgKxpJkb13tEDg==BXLVgGw HJEUdquvvtJKRVEXuJPXZHm+vAYNP/YCpDOw5BYXM7QFTXUAyyH6VzJQTsDtKppdzKuLKF7cwRp7+2uMp<preKey Public

preKeyId=‘70’>BQh+Ze9GZ1tlpOo0RGVfaT0pDCuE/6ATsO5PaG3Uhe0qBZRIKffpOXLPbiG9SIY/J8GpacCBUgYkUQPgUiRrYgEh<p

07-24 21:36:06.089 I/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoService.processBundle() Session built with swan@atalk.org:949870470

----//

Send omemo message from N3 will prompt user to authenticate the new deviceID fingerprint.

//-----

07-24 21:36:06.089 W/αTalk: [28] org.jivesoftware.smackx.omemo.OmemoService.processStanza() internal omemoMessageListener failed to establish a session for incoming OMEMO message: org.whispersystems.libsignal.NoSessionException: No session for: swan@atalk.org:949870470

07-24 21:42:53.879 I/αTalk: [1] org.atalk.android.aTalkApp.setCurrentActivity().323 Current activity set to org.atalk.crypto.omemo.OmemoAuthenticateDialog@35d158f9

----------//

In order for N3 to build the olmMessage for all the required recipients, it also proceeds to fetch the deviceList.

//------------

07-24 21:43:00.149 D/SMACK: SENT (0):

07-24 21:43:00.169 D/SMACK: RECV (0): 11creation@001500:891555:861306creation@001500:891555:861 306

-------------//

However since the DeviceList has not being updated by S3, all olmMessages created are without the new

//-----

07-24 21:46:27.249 D/SMACK: SENT (0): I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo25081f9e-474a-4530-b543-9a0119f72513**MwohBczmmmQL93WTEseJqtqmbx2WCL7Od+3buZiarfVJhgcMEAEYASIwyBMV+t7Li+UNqDViMtt0Az03 fdTWD+563pWE7QhE9bHpKu3Q8OQlGZ20h+4MIc74+BbnEopyH2s=**MwohBQIJPQbsCh74AsZCpMg7dIjQNZi4QD8+p9DNip4yZhsqEB0YAyIw7katLPldTE169ETsVVnNSwUC 5Ou3XJimAyR/ao5fjLIKDQTVa7sgoqHBT3VaNBcxsAccsA6M59E=FlCdRUh7DUZzTiyHGf CJfA==HJ94NQ==

-----//

Therefore N3 and S3 omemo session cannot proceed further. S3 must restarts in order to get subscribeToDeviceLists() to update the DeviceList on the server.

Note: atalk must implement as per below link to get subscribeToDeviceLists() to work properly.