The large standard deviation is caused by our implementation
behavior when message loss occurs. DTLS states that
an implementation should wait for an answer for a set
amount of time after sending a flight of messages. If it does
not receive an answer during this period it retransmits the
whole flight. We set this timeout value to 5 s to avoid
unnecessary retransmissions in networks with a high endto-
end delay, which is common in a low power lossy network,
and/or with energy limited thin clients that are slow
to respond. DTLS implementations for the Internet often
choose a retransmission timeout of 1 s or less. In general,
we see that the time to execute a handshake is shorter for
smaller RSA-keys and reduced by almost 2 s when client
authentication is omitted in the handshake. We observed
packet loss mainly in a multi-hop environment and when
larger DTLS messages were being sent. This increases the total
handshake time significantly because of the large DTLS
retransmission timeout. However, total energy consumption
of the client does not increase significantly because
all TPM operations, which are the largest contributor to
overall handshake energy costs (cf. Section 5.4), are only
executed after successful receipt of all relevant server messages.
Losing a packet with information obtained from the
TPM does not lead to a repeated execution of the TPM operations
because the resulting messages are buffered and can
be retransmitted. During our experiments we did not see
any failed handshake attempts. In earlier stages of development
a lost Finished message from the server would cause
the handshake to fail.
The client did not receive the expected Finished message
and kept retransmitting its last message flight. The
server, however, already considered the handshake to be
complete and was waiting for bulk data transfer from the
client, disregarding its repeated retransmissions of the
handshake messages. DTLS 1.2 addresses this issue by always
issuing a retransmission of the server’s last message
flight when it receives a Finished message from the client.
We ported this behavior to our version of OpenSSL
to address this problem.
DTLS requires successful transmission of all handshake
packets over an unreliable transport layer. Since it provides
its own reliability mechanism during the handshake,
network topology, congestion and link quality
have a large impact on the time needed to complete a
DTLS handshake. One parameter the programmer can
influence to achieve better performance in lossy networks
is the maximum transmission unit (MTU) for DTLS handshake
packets which determines the size of individual
handshake packet fragments. To study the influence of
the MTU on overall handshake establishment time we
introduced a random, artificial packet drop rate on the
link layer and measured handshake completion times
for various MTUs.