[OTR-dev] new TLV to query supported TLVs

Hans-Christoph Steiner hans at guardianproject.info
Fri Mar 13 11:10:32 EDT 2015


One thing that is often confusing in OTR UIs happens on apps that support SMP
verification.  If an app like ChatSecure is chatting with an app like Adium,
which does not support SMP (last I checked), then the ChatSecure user will get
no response on the SMP query.  Instead, if there was a TLV that let ChatSecure
query Adium for which TLVs it supports, then ChatSecure could adjust its UI
accordingly, so that the user knows that SMP is not an option in that chat
session.

This becomes more important as more TLVs are introduced.  For example, if
someone wants to send a file via a chat app, then the chat app can handle that
a lot better if it knows what options the other side supports, i.e. TLV8,
OTRDATA, etc.

We've discussed this a bit, so I wanted to start a discussion with a rough
proposal to see what others think of the idea.

Type 9: Query Supported TLVs
    A blank value is a request for the bitmask of supported TLVs.  When a
    blank TLVQ is received, the response is a TLVQ with as many bytes as
    needed to represent all supported TLVs.  Each byte is a bitmask that
    represents 8 TLVs, where 1 means supported, and 0 means unsupported.
    The first byte represents TLV 0-7, the next 8-15, and so on.  TLV types
    not represented in the collection of bytes are assumed to be unsupported.

Some examples:

\x00\x09\x00\x00
    A TLV of type 9, containing no data, which represents a request
\x00\x09\x00\x02\x03\x02
    A TLV of type 9, containing two bytes, which is a response saying that
    only TLVs 0, 1, and 9 are supported, and no others.
\x00\x09\x00\x02\x255\x15
    A TLV of type 9, containing two bytes, which is a response saying that
    TLVs 0 through 11 are supported, and no others.
\x00\x09\x00\x04\x255\x255\x255\x255
    A TLV of type 9, containing two bytes, which is a response saying that
    TLVs 0 through 31 are supported, and no others.

.hc

-- 
PGP fingerprint: 5E61 C878 0F86 295C E17D  8677 9F0F E587 374B BE81
https://pgp.mit.edu/pks/lookup?op=vindex&search=0x9F0FE587374BBE81


More information about the OTR-dev mailing list