[OTR-users] Packet order

Ian Goldberg ian at cypherpunks.ca
Tue Sep 14 21:57:21 EDT 2010


On Mon, Sep 13, 2010 at 09:59:06PM -0400, Michael Hung wrote:
> Is the order of packet arrival important? When implemented in a mobile
> environment, say otr-over-sms, packets may arrive (slightly) out-of-order or
> even lost.
> Does or how does the otr protocol handle it?
> 
> If the otr protocol cannot handle out-of-order or lost packets, can it be
> modified to handle these scenarios?
> 
> (Obviously we can put a reliable layer on top of plaintext sms too, but it's
> a lot of work not normally needed...)

OTR strongly relies on the underlying IM protocol delivering messages in
order (though it is allowed to drop messages).  When we designed it, we
figured that an IM protocol that reordered messages would make for
really bizarre conversations:

A: Are you going to the game?
B: Yes
A: How about the party?
B: No

If B's messages might be reordered, this would be crazy.

That said, it turns out some IM networks *do* reorder messages.  (Second
Life is one example.)  OTR treats out-of-order packets as replays and
drops the messages.

I don't know that I'd *want* OTR to pass messages to the application
layer out of order, though, as above.  I'd prefer it ordered them
correctly first, but that can't really happen if messages may be lost.

I guess what I really want is for IM networks to not reorder packets.
;-)

   - Ian



More information about the OTR-users mailing list