work, there are onion proxies. The client-side onion
proxy has access to a directory of onion routers, and
when choosing the preferred onion routers, a circuit
is built. Each onion router in a circuit knows only its
predecessor and successor.
At the destination end of the circuit, an onion
proxy receives the traffic and sends it to the destina-
tion server, which is just an ordinary server reachable
from the Internet. The server is not aware of the use
of Tor. The Tor network protects the privacy of the
client by hiding the client identity from the server.
If a server wants to hide its location, the Tor Onion
Service protocol can be used. In this protocol, an
onion proxy on the server side will register an onion
service in the Tor network. It then gets a special type
of address, called an onion address, which is valid in-
side the Tor network. Clients can reach the server via
Tor by using the onion address. The protocol thus
makes it possible for a client to reach a server without
letting the client know the server’s real location.
As a side effect of hiding the server’s location, the
server becomes available without a public IP-address.
We also note that the onion proxy that registers the
onion service, initiates a connection from the server
side to the Tor overlay network. This means that the
server can be behind a NAT, since NAT only pre-
vents connections from the Internet to the server, not
in the opposite direction (Comer, 2014). An unin-
tended consequence of the protocol is therefore that
onion services can be used to reach servers behind
NAT. This is useful for Swirlwave, and the reason for
building the Swirlwave communication on Tor.
The use of the Tor Onion Service protocol makes
it possible to reach smartphones outside local area
networks. However, Tor does not include any means
to announce new addresses to clients, so clients are
not able to connect anymore when a smartphone
changes location. Also, there is no protocol trans-
parency, so a client connecting to the smartphone
server app must understand the protocol used by Tor.
The Swirlwave system is designed to solve these
problems transparently as a middleware.
4 SWIRLWAVE
Swirlwave builds on the Tor Onion Service protocol,
not because of the anonymity provided by the pro-
tocol, but because of the onion addresses assigned to
participating devices. Thus, Swirlwave uses onion ad-
dresses to reach devices that are lacking publicly vis-
ible IP addresses. However, since the Tor Onion Ser-
vice protocol is not designed for mobile devices, but
rather devices that never change location, Swirlwave
adds functionality for locating devices and keeping
peers up to date with correct addresses. As anonymity
is not required in Swirlwave, as opposed to in Tor, au-
thentication of peers is also added to Swirlwave.
4.1 Contacts
Keeping track of peer addresses is a central feature of
Swirlwave. This is achieved without external direc-
tory services or single points of failure. Each peer in
Swirlwave keeps its own, locally stored, contact list
of the known peers. New contacts are added out-of-
band, for example through near-field communication
(NFC) when friends meet face-to-face.
An entry in the contact list contains data that is
needed to communicate with that specific peer. It
also contains information about services offered by
the peer. An entry includes the peer ID, onion address,
services offered by the peer, phone number (used as
an alternative address in an SMS fallback protocol)
and its public-key. See Table 1 for the complete con-
tact list information.
To conduct meaningful communication, client and
server must use the same protocol. Swirlwave allows
applications to use whichever protocol that is suitable.
This flexibility is possible by representing protocols
as universally unique identifiers (UUID) (Leach et al.,
2005). More generally, they are identifiers of con-
tracts or agreements that server and client must com-
ply to in order to properly communicate. Swirlwave
does not care about the details of this contract, but
simply uses the identifier to match clients and servers.
For example, to send a message to a friend, a
user selects the friend from the Swirlwave contact list.
Based on protocol UUIDs registered for this friend,
Swirlwave presents a list of available communication
types. If the user has an application that can be used as
client, Swirlwave detects it by matching the identifiers
of the locally installed applications with the identifier
of the friend’s messaging service.
4.2 Authentication and Confidentiality
Each peer is equipped with its own key-pair
for public-key encryption (Goodrich and Tamassia,
2014). This is used for authentication purposes. It
is also used for ensuring confidentiality, integrity, and
non-repudiation of data when communicating over
other channels. Tor Onion Service communication
is end-to-end encrypted, which provides communica-
tion confidentiality.
The Tor protocol is designed for anonymity. Con-
sequently, the onion proxy on the server side will not
know the origin of incoming connections. In our ap-
WINSYS 2018 - International Conference on Wireless Networks and Mobile Systems
258