[OTR-dev] Fragmentation

Hannes Mehnert hannes at mehnert.org
Wed Dec 17 08:55:56 EST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Dear OTR hackers,

I just implemented reassembly of OTR fragments...
While doing this I stumbled upon (in Protocol-v3):
OTR version 2 messages get fragmented in a similar format, but without
the instance tags fields:

"?OTR,%hu,%hu,%s," , sender_instance, receiver_instance, k , n , piece[k]
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think those arguments should be removed (OTRv2 only uses k, n,
piece[k]).


Furthermore, the protocol description does allow for fragmented
fragments... I'm curious whether there is any use of it? (With my
formal methods background, whenever I write a recursive function
without a (straightforward) termination argument it hurts (tbh, the
termination argument is rather straightforward since fragmentation
prepends and appends some bytes, thus it should all be safe).
I'd explicitly only allow certain messages to be fragmented -- such as
data (query is shorter without fragmentation anyways, ...).

I'm roughly talking about (where arrows indicate fragmentation, using
v2 here for simplicity (and I didn't try to execute this..)):
?OTRv2
 -->
?OTR,1,2,?O,
?OTR,2,2,TRv2,
 -->
?OTR,1,2,?OTR,1,2,?,
?OTR,2,2,O,,
?OTR,2,2,TRv2,
 -->
...


Cheers,

Hannes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCQAGBQJUkYtsAAoJELyJZYjffCjurKIP/iiWZVlZIz/iPI1QE695pFIw
TAPWMZO9vlNMz/dD3ENDXVGoxe1HdASo0IRuphmGbVRWAPY+qIr0siRxW/SXpywx
oeEbKTe+UBVZkLDiEcIPGOvqV4H/pg0+ENpRUfrsmhhjgXNpupNKoMOjfDMI3RFE
B/5lRzHrvMFDlQPf/gpwaviDweJBAJNPpj9yuSl0zhl+vtI4yk/+ZVX/GDF0mN9r
JA2OCdu7XET0DbQApp2XdvFAr+HIWHxNcOOdmujsSD1l7gDyRkQh+eVbW9VWDG7X
gc0sE6oHo1at5+VY9rTHr+YPHBeUajuCW6O04OLDY3NOOGu3T7ORhuhq/SlP6KMn
lJmYCVb6rTFX02dF49PO1s875a3hC06Ruit7oxKq6/htJXk8VfVmWwcn0UYQd2K6
jC8EWqXXPyUk7NpIkxIu35V1YotWG9fGrlqM1MWBvtta7tahJRFWNTdGiH6wFcUb
OdmvLzIpDCFrkh0KzCmKNJHUkqz/LljEUJ6oPK63ZlzdmPI5ovlLcgm5Tjq7RT2u
4tWVXblZwjCnFAlwJPMGTc36v4ZKPb2jH92aJqmfkRhtC6Fy74+cF3HgagrStob9
+YnRURE/FpaPFyS0UJCWRMD/WTUk4D6rk/M5rvu+dh+k3HoW787JVjsj9Ezaqwwx
K5bJsfI17laym6odcfcz
=49Vw
-----END PGP SIGNATURE-----


More information about the OTR-dev mailing list