iNPUTmice / xeps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarify the meaning of 'rid' and 'sid' in OMEMO XEP

Flowdalic opened this issue · comments

The terms are, as far as I can tell, not explained in the XEP. I assume 'rid' stands for "remote (device) id"?

Using
https://open-whisper-systems.readme.io/docs/axolotl-java-library
and
https://whispersystems.github.io/libaxolotl-java/reference/classes.html
it appears
rid: recipientID
sid: sessionID

I'm currently unable where the sid can be retrieved from libacolotl-java's API. But since OMEMO is so tighly coupled with Axolotl, the XEP should reference the protocol and API more. Also with regard to #2 and https://whispersystems.github.io/libaxolotl-java/reference/org/whispersystems/libaxolotl/protocol/PreKeyWhisperMessage.html.

Sorry, I should've commented on this earlier, but I've been on vacation.

These attributes don't really have anything to do with libaxolotl-java directly. The sid is the sender's device id, the rids are the device ids of the recipients that the individual <key> elements are intended for. They aren't strictly needed, but without them the client would have to exhaustively try n*m combinations (where n is the number of devices the sender has and m is the number of <key> elements in the message) to find which session and which header to use.

Should we clear this up in the XEP?