allowing to automate metric collection and analysis on different hardware and environments.
1.1 Motivation
While inter-device communication has numerous benefits, it is important to ensure the security of that
communication. For example, when you log in to your online banking account, you do not want others
to be able to see your password, as this may lead to the compromise of your account. Having your
account compromised means that a malicious entity might take a hold of your money. Similarly, when
you are transferring funds via online banking, you want the contents of that operation to be invisible to an
observer, for privacy reasons. It is also desirable that no party is able to tamper with the data en transit,
as it may lead to undesired consequences, such as the transfer of a larger amount than intended. Proper
communication security allows those goals to be achieved.
TLS is one of the most used protocols for communication security. It powers numerous technologies,
such as Hypertext Transfer Protocol Secure (HTTPS). TLS offers the security services of authentication,
confidentiality, privacy, integrity, replay protection and perfect forward secrecy. It is not a requirement to
use all of those services for every TLS connection. The protocol is similar to a framework, in the sense
that you can enable individual security services on a per-connection basis. For example, when you are
downloading software updates, while data confidentiality is probably not a concern, data authenticity
and integrity, are. In TLS, it is possible for a connection to only offer authenticity and integrity, without
offering confidentiality. Foregoing unnecessary services will lead to a smaller resource usage, which in
turn leads to smaller execution time and power usage. This is especially important in the context of IoT,
due to the constrained nature of the devices.
The existing work does not explore the computational costs of the security services available in TLS.
Examples of such costs are the number of CPU cycles executed, time taken and power consumed. Thus,
developers wishing to deploy the TLS protocol in constrained environments do not have a resource that
would help them in choosing a TLS configuration appropriate to the environment’s needs and limitations.
TLS is designed to run on top of a reliable, connection-oriented protocol, such as TCP. DTLS is the
version of TLS that runs on top of an unreliable transport protocol, such as UDP. Most IoT devices have
very limited processing power, storage and energy. Moreover, the performance of TCP is known to be
inefficient in wireless networks, due to its congestion control algorithm. This situation is worsened with
the use of low-power radios and lossy links found in sensor networks. Therefore, in many cases the
use of TCP with IoT is not the best option. For this reason, DTLS, which runs on top of UDP, is used
more frequently in such devices. While the work of this dissertation will be focused on TLS, the majority
of it can also be applied to DTLS. This is a consequence of DTLS being just an adaption of TLS over
unreliable transport protocols, without changes to the core protocol.
There are numerous IoT devices, each one with different hardware capabilities and security require-
ments. For example, some IoT devices have the resources to use public key cryptography, while for
others symmetric cryptography is the only option. In some cases, the communicating devices require
data authenticity, confidentiality and integrity (e.g. when logging in into a device), while in others data
2