Re: [SWMP] My understanding so far

Roland Weber <> Thu, 20 September 2007 17:33 UTC

Return-path: <>
Received: from [] ( by with esmtp (Exim 4.43) id 1IYPuE-0005i2-PH; Thu, 20 Sep 2007 13:33:38 -0400
Received: from [] ( by with esmtp (Exim 4.43) id 1IYPuC-0005a7-Ns for; Thu, 20 Sep 2007 13:33:36 -0400
Received: from ([]) by with esmtp (Exim 4.43) id 1IYPu8-0006Nr-P4 for; Thu, 20 Sep 2007 13:33:33 -0400
Received: from [] (helo=[]) by (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2xA-1IYPtn16zS-0002V5; Thu, 20 Sep 2007 19:33:31 +0200
Message-ID: <>
Date: Thu, 20 Sep 2007 19:33:44 +0200
From: Roland Weber <>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070807 SeaMonkey/1.1.4
MIME-Version: 1.0
Subject: Re: [SWMP] My understanding so far
References: <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Provags-ID: V01U2FsdGVkX1+9Zqkc2SgAgzqCyLoAYS1tnY20dWxFPn3sWpb ka/UfOjyEDmdWmcpBmX6i3PV3PhBXf//ZS6/BWrK/5Ef1h0vOt RvciBY/gLtp7D51pmhObUfT0M8jTlBO
X-Spam-Score: 0.0 (/)
X-Scan-Signature: f60d0f7806b0c40781eee6b9cd0b2135
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of a Simple Wide-area Multiuser-3D Protocol <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>

Hi Jay,

sorry for the late reply, I had little time to spare.

Jay C. Weber wrote:
> Roland Weber wrote:
>> Tickets are used similar to session cookies. When a network
>> element X opens the initial channel to Y, it sends a message
>> "HELLO, I am X and here is your ticket YtoX for contacting me".
> Yes and tickets usually have an expiration time/date (a date is part of the 
> ticket and the whole thing is digitally-signed to prevent tampering) in order to 
> address the man-in-the-middle attacks to which you alluded before.

In the web world, there is a distinction between session cookies
(like jsessionid) with an inactivity timeout, and authentication
cookies (like the LTPA cookie in WebSphere Application Server),
which have an expiration time.
The LTPA cookie fits your description: it is encrypted and has
an expiration time, in addition to user credentials. It is used
for Single Sign-On: one server issues the ticket, others receive
and verify it. However, the session is tracked by the standard
In SWMP, as discussed so far, the ticket is only sent back to
the server where it came from. That server will probably not
bother to decrypt it, since it can just as well compare the
encrypted data bit by bit. I don't really see the purpose of
the encryption here. Since a timestamp is encrypted, it will not
be possible to guess from one ticket what the next will be. But
that would also be achieved by any cryptographically strong
pseudo random number generator. On the other hand, expiration
of the ticket requires re-issuing tickets during a session.

A ticket that is simply copied into a message will not protect
against man-in-the-middle attacks. The MITM can take it from
the intercepted message and pass it on in a modified message.
As discussed so far, an attacker doesn't even need to be in the
middle. It is sufficient to spy on one UDP packet to hijack the
respective channel in the direction of the sent packet. Just
fire a few messages with the ticket, and increment the message
IDs by 5 instead of 1 each time. The receiver will accept the
forged messages because they have the correct ticket, and
ignore all messages from the genuine sender because their ID
is too low.
Switching to a hashing technique has some advantages over
this, though at the price of hash computation. Firstly, the
ticket is only sent in plain during the initial handshake on
the main TCP channel. The hash in the UDP packets will not
allow an eavesdropper to guess the ticket and forge messages.
If the hash is computed over the message header only, MITM
attacks are still possible. If the hash is computed over the
full message, message integrity can be verified. A MITM could
still selectively drop messages, but not forge them. If so
desired, the ticket exchange on the main channel can be
protected by standard mechanisms like TLS or SASL.
Secondly, the paper says that ticket size is not fixed. So
a server might have some clients that use a 32 bit random
number as the ticket, and others that use 3 kbyte BLOBs as
tickets. If updates are to be sent to all clients, those
with a large ticket would need different and more messages
than those with the small tickets.

We can discuss that stuff in detail when we tackle authentication.
As long as anyone can connect to anyone else and get a ticket,
MITM attacks are pretty pointless ;-) Does your implementation
have authentication mechanisms in place?


SWMP mailing list