RTFM: How hard are IoT platform providers making it for their developers?
Andrew Baldrian Joseph Hallett

Oxygen Isotope Exchange Between Dust Aggregates and Ambient Nebular Gas
    [
    September 4, 2024
=======================================================================





§ INTRODUCTION

IoT devices are everywhere, but have a reputation for being insecure <cit.>.
Providing usable documentation and example code is known to help developers implement security features <cit.>; so to explore why IoT devices might be insecure we looked at the resources IoT platforms provide to help developers implement security features. 

Internet connected devices are expected to exceed 29 billion units by the end of 2030 <cit.>. These IoT devices are used for a multitude of applications: for example, roadside weather monitoring, video doorbells, and internet-enabled fridge-freezers <cit.>.
Concerns have been raised around the security of IoT devices. In 2016, the Mirai botnet infected over 600 thousand devices simply by exploiting common default passwords used by IoT manufacturers <cit.>.  Increasingly these devices are seen as being vulnerable <cit.>.
Multiple organisations have publish recommendations or standards to minimise these vulnerabilities <cit.>.
As the use of this technology grows, the world of cyber physical systems and IoT is also interacting with the introduction of the IIoT <cit.>; further increasing the reach of these devices.

The explosion in the number of IoT devices and the concerns around their possible security vulnerabilities has fueled the need for regulation. For example, the UK Product Security and Telecommunications Infrastructure (Product Security) regime <cit.>, or the EU Cyber Resilience Act (EU-CRA)<cit.>.
These regulations attempt to address these security and privacy concerns by defining a set of minimal requirements that an IoT device should conform to <cit.>.
While the regulations may be welcome by industry bodies and governments <cit.>, they may also increase the cost of developing these devices with a possible knock-on effect of increasing the costs to the consumer <cit.>.
Engineers building these devices must address these requirements or IoT device manufacturers may lose access to geographical markets.

IoT devices are built using existing processors, communication peripherals, sensors and actuators. 
Chip manufacturers have recognised the need for an IoT platform that can be used by IoT device manufacturers to construct these IoT devices.
These platform manufacturers deliver IoT platforms with three core components: processors, memory and communications.
To achieve the regulatory goals, device engineers need IoT platforms to also provide a set of security features and the means to develop solutions that meet the requirements of the regulations.
This paper reviews some of the leading IoT platform manufacturers, looking at the security features they provide and the documentation available to engineers and the supporting material such as code examples, to help them meet these goals;
focusing on three security features, necessary to implement many of the regulatory goals:

  
  * Secure boot
  
  * Device identity key
  
  * Unique per device password.

This paper asks the following research questions:

  
  RQ1. To what extent are IoT platforms providing hardware functionality for device engineers to implement basic IoT security tasks? 
  
  RQ2. How are these platform manufacturers supporting device engineers to use these features correctly?
  
  RQ3. What additional support is provided to help device engineers take advantage of security features to meet their goals?

We find that whilst secure boot support is relatively common, functionality for other features is hidden (RQ1) and that in all cases documentation and code examples (if any are given) are relatively poor (RQ2). Cloud services or third party software my be used to provide basic security features but do not meet many of the additional regulatory requirements (RQ3).
This suggests that more needs to be done to support developers if we want to increase the adoption of security features.


§ STANDARDS AND SECURITY RECOMMENDATIONS



The diversity of IoT devices and their development in multiple markets results in multiple standards <cit.> covering multiple different markets, for example with medical devices, the Hippocratic Oath for Connected Medical Devices <cit.> or for telecommunications the GSMA CLP.13 - IoT Security Guidelines Endpoint Ecosystem <cit.>.
Standards such as ETSI EN 303 645 Cyber Security for Consumer Internet of Things: Baseline Requirements <cit.>, or NIST IR 8259A Core Device Cybersecurity Capability Baseline <cit.> provide a technical baseline set of requirements for device engineers to follow.
Often these standards will reference related standards that focus on information processing or privacy, for example ISO/IEC 27002 Information security, cybersecurity and privacy protection — Information security controls <cit.>.
While these standards may not be directly focused on IoT devices, they do provide requirements for data processing and data privacy.
This results in a complex set of security and privacy standards for device engineers to navigate.

To help device engineers manage these different sets of requirements, a number of organisations have published security frameworks.
For example, the IoT Security Foundation provide Secure Design Best Practice Guides and an IoT Security Assurance Framework <cit.>, providing a process that device engineers can follow to enable them to build compliant devices.
PSA Certified provides a certification program and security framework for device engineers to follow <cit.>.
The GSMA has an IoT Security Assessment with a checklist <cit.> of different requirements that device engineers should consider when designing an IoT device.

From a review of 13 IoT standards, we have selected three security features mentioned in multiple standards (Table <ref>). These  security features are not sufficient for an IoT deployment, but serve as a indication of the abilities of the IoT platform.
The security features are selected to highlight the differing types of feature that device engineers may face when implementing an IoT device.
The security features may also depend on specific hardware functionality that must be available in the IoT platform to implements this security feature.



 §.§ Secure boot


The boot process is the act of initialising the hardware and loading the firmware into memory when the IoT device is turned on.
The notion of a secure boot process requires that the firmware can be cryptographically validated as part of a root of trust <cit.> process.
This is normally implemented using a TEE, such as the Arm TrustZone <cit.>.
The boot sequence can be a single or two-stage process:



  §.§.§ Load the boot loader

The processor has a built-in immutable boot loader; its job is to validate the signature of the boot loader and load the second stage boot loader into memory.



  §.§.§ Load the firmware

The second stage boot loader will then validate the signature on the firmware application, load it into memory and start the application.

The signature validation and the public keys needed for the validation are all managed by the TEE. The public keys or certificates are written into the TEE in the IoT device manufacturing process.
There may also be the possibility to securely update a public key or revoke a key.
The IoT device manufacturer retains the private key that is used to digitally sign the firmware.
As long as the private signing key remains secure, this process should guarantee that only the device manufacturer can update the firmware and therefore the firmware can be trusted.
However some issues still remain, for example if the device manufacturer has not removed the debug interface, it may be possible to use this interface to change or add new keys <cit.>.

The secure boot process is part of the root of trust <cit.>, proving that the software running on the device is as expected and the keys being used are certified by the PKI.
Without a secure boot process, the software on the IoT device could have been modified, contain malware, or have modified keys. 



 §.§ Device identity key

In addition to each device having a unique identification number or string, a device should be able to authenticate its identity as part of an attestation process.
This requires the IoT device to have a private key that it can use to digitally sign a message.
Any entity communicating with the IoT device can use the public key of that IoT device to validate the digital signature and so can confirm the identity of the IoT device as the IoT device must be in possession of the private key. 
This private key is known as the device identity key.
The key can be written into the IoT device when it is manufactured or at a later stage, known as device provisioning. 

A public-private key pair is generated, with the private key being stored within the TEE, and the public key shared with multiple third parties.
A certificate for the public key can also be generated and signed by a trusted CA.
The private key is then used to generate a signature to attest ownership of the identity, for example using the PSA Attestation API <cit.>.
The process of generating the keys may be done as part of the manufacturing process, as part of device provisioning, or when a device enlists in a service.
Platform manufacturers that provide an IoT cloud platform may have a provisioning process, in which a public and private keys are generated (possibly on the device) and then the private key is stored in the TEE.
The public key certificate is then stored in the cloud service as part of the device description and is later used in the authentication process. 
Other platform manufacturers provide tools that allow the IoT device manufacturer to prevision a device themselves.
The platform manufacturers may also ship with a private key embedded in microprocessor or TEE, with the public key being included as part of the documentation.
The IoT device manufacturer can then register the public key for the device with cloud services.



 §.§ Unique per device password

An IoT device may require the user to log in to an administration interface to configure certain features.
This administration account should not use a default or well known device password, but should be secured with a unique per device password that is affixed to the device.
Users should be able to change this default password. This new password should be stored securely, adhering to standards such as NIST SP 800-63 standard <cit.>. The majority of users may not change their default password <cit.>, making it more important that any unique per device password follow good password practice, for example NIST SP 800-63B <cit.>, or three random words <cit.>. 
Factory resetting the device should also reset the password back to the unique per device password.
The unique per device password should be generated at manufacturing time and stored in the IoT device, possibly in the TEE depending on the hardware functionality.
The unique per device password is not a cryptographic key, it should be something that a users should be able to remember, but that an attacker should find hard to guess.
The unique per device password should be generated randomly and not be influenced by known information such as the device ID or MAC address, or follow a pattern for each device. 


§ METHOD

To generate a list of manufacturers and IoT platforms, the initial list of manufacturers was derived from the authors' knowledge of the IoT industry.
For each platform in the initial list, an internet search was made to find competitors or similar IoT platforms from other manufacturers.
We focused on devices that may be used within the consumer market, these devices tend to be initially configured by a user connecting with a phone via Bluetooth to the IoT device.
Once the initial configuration is done, the IoT device will then connect to the Wi-Fi network.
Therefore, we selected devices that have both Wi-Fi and Bluetooth functionality. 
We also limited the selection to IoT platforms that use a SoC 32bit microprocessor.
We only included devices where the platform manufacturer has provided a development or prototyping board.
These prototyping boards give IoT device engineers the ability to explore the functionality of the IoT platform and build the application without needing to design and build the IoT device PCB.
The prototyping boards come with debug and programming interfaces allowing them to be connected to a PC. This make the platform more accessible and allows the platform manufacturer to target a wider user base. 
For the review we limited the platform selection to the following criteria:

  
  * Platform manufacturers targeted a specific product for the IoT device market.
  
  * The platform was a SoC with a 32bit microprocessor.
  
  * The platform included both Wi-Fi and Bluetooth connectivity.
  
  * A development or prototyping board was available to evaluate the functionality of the SoC IoT platform.
  
  * The documentation was available without needing to be a member of a trade organisation or signing any form of NDA.

The list of IoT platforms reviewed is shown in Table <ref>. For each platform we reviewed the following:

  
  * The prototyping board data-sheet, the SoC data-sheet and any additional or peripheral data-sheets.
  
  * The IDE.
  
  * Programming guides for the following:
    
      
  * General security coding guidance or good practice.
      
  * Secure boot, root of trust and cryptographical operations.
      
  * Device identity keys and key management.
      
  * Generating unique per device passwords, password management or storage.
      
  * Guidance on storage of sensitive information such as passwords.
    
  
  * Code examples involving any aspect of the three security features.



Having completed the initial review, the evaluation criteria were constructed, and used to evaluate each set of material.




 §.§ Evaluation criteria

The review includes documentation, code examples, libraries and tools provided by the platform manufacturers.
Where the platform manufacturers have included direct links to the documentation provided by the manufacturer of a microprocessor or secure element used in the IoT platform, we have included them in the documentation set for the IoT platform manufacturer.
We have not included code examples from other third parties, blog posts, or post community sites (including community sites owned by the platform manufacturers).
We placed each review item into the following categories based on the criteria below:



  §.§.§ Supporting Documentation

The documentation provides an introduction to the security feature, providing the reader with an understanding of the security feature and why it is important for the IoT developer to include the security feature in their implementation.



  §.§.§ Standards or regulations

The documentation refers to the relevant recommendation, standard, regulation or certification for the security feature.
The documentation explains why the standard is relevant, how the standard should be applied and any additional consideration or actions that the device engineer should perform.



  §.§.§ Technical detail

The documentation provides a detailed technical description of the security feature. The documentation includes implementation detail and explains the internal operation of the security feature. Technical detail include data-sheets describing how the hardware supports the security feature.



  §.§.§ Developer support

The documentation provides detail of how the security feature can be implemented using the IoT platform hardware or software, including API documentation, examples of code, and configuration settings.
The documentation has a step-by-step guide to using the platform to achieve the security feature.



  §.§.§ Code examples

The platform manufacturer has provided example source code of how the security feature can be implemented using the hardware.
This should also include instructions for any device configuration, building and running the example code. 
This example source code should also follow security best practice.



  §.§.§ Library

The platform manufacturer provides a library that supports the implementation of the security feature.
This library may include an API that the device engineer can use to gain access to the security feature.



  §.§.§ Ancillary code

The platform manufacturer provides additional libraries, code or tools that can be used to support the implementation of the security feature. For example, additional key management, generation of strong passwords, or certification management.



 §.§ Threats to validity

There are many manufacturers providing platforms for the IoT market, often with multiple variations of each product, some targeting niche markets or very specific requirements.
Manufacturers may also provide a more componentised approach where different peripherals are added to a base computing platform, for example adding a Wi-Fi co-processor to an existing product to add Wi-Fi connectivity.
IoT device manufacturers may choose to take this componentised approach if they do not plan to use all the features of the SoC or have other constrains such as power consumption, cost etc.
Given the size and complexity of this market and the number of different variations, this review has only taken a thin slice of the possible set of all IoT device components.
We have used a selection criterion that only includes SoC with both Wi-Fi and Bluetooth, and where the manufacturer provides prototyping or development boards.
These criteria limited the number of devices in the review and may skew the findings as we may have missed some interesting examples.

Acar et al. (2019) <cit.> have shown that developers often use question-and-answer sites to find solutions for security questions; the study showed that developers using the documentation have more secure implementations but take longer writing the feature.
Following from this work, we focused on the platform manufacturers' documentation and example code and did not review corresponding developer community sites. Platform manufacturers such as Arduino or Raspberry Pi focus more on the educational or hobbyist market and may also rely more on the user community creating content. For this paper we have not reviewed the community content.

We focused the review on three example security recommendations from the standards and regulations.
We did not look at issues such as data security and privacy or other hardware features such as flash encryption; this may limit the generalisation of this work. 



§ RESULTS

Table <ref> contains the evaluation of IoT platforms.
The platform manufacturers take different approaches to helping IoT device manufacturers and their engineers; we categorise the approaches as:

  
  * Cloud services deployment
  
  * OS and security features support
  
  * Data-sheets
  
  * Limited security features




These approaches are discussed below.


 §.§ Development support approaches



  §.§.§ Cloud services deployment

In this category the platform manufacturers attempt to remove some of the security burden by providing a platform that includes: the SoC hardware, a device OS, security features and cloud infrastructure that manages the devices and provides features for the IoT device engineers. For example the Particle Platform-as-a-Service in Figure <ref>.
The platform manufacturers provide a root of trust via the cloud infrastructure, using a provisioning process to generate and securely store keys.
The IoT device engineers use the integrated development environment to build and sign the application firmware. The focus from the platform manufacturers is on their secure development process and providing a secure platform that device engineers can simply use.
Third party software vendors are also providing IoT cloud services for example, AWS IoT Core <cit.>. These services aim to allow any IoT device to use the services, with some platform manufacturers providing examples of how to integrate their device with the third party service.

For some IoT device engineers there are clear advantages for this approach and it can be useful for prototype development and small volume production.
Platform manufacturers such as Arduino and Particle have offerings in this space, but we can see other platform manufacturers moving in this direction.
Using these services introduces supply chain issues: consider, an IoT device collecting personal sensitive information. This information may be processed on the IoT cloud platform and stored using a cloud service provider, both actions may take place in different geo-political locations.
This can have both security and data protection ramifications that IoT device manufacturers will need to consider <cit.>.
The cost to a IoT device manufacturer could be significant for a large-scale deployment. IoT device manufacturers may also need to consider issues such as  vendor lock-in or over reliance on a single cloud service provider.


  §.§.§ OS and security features support

The platform provides the SoC, a real time OS, such as FreeRTOS <cit.> or zephyr <cit.> and a TEE.
The security functionality is implemented within the TEE using an environment such as TrustedFirmware-M <cit.>.
The aim is to provide an ecosystem that has all the parts that a IoT device engineer requires to build secure IoT devices.
This strategy relies on good documentation for the device engineers and access to example code that demonstrates the correct use of the security functionality.
All of the platform manufacturers have some technical detail normally delivered as data-sheets describing at least one of the security features.
The level of detail contained within the technical documentation can very significantly.
This documentation is intended to describe the functionality of the IoT platform. Additional material such as developer support and example code is needed to support a device engineer using the hardware functionality to deliver a security feature.  
Figure <ref> has some examples taken from technical documentation. 
These example show different levels of detail that can be found within the technical documentation, Figure <ref> has an example of an overview of the security functionality. More information or example code may be needed for device engineers to take advantage of these functionality. In contrast Figure <ref> is the beginning of a detailed explanation of the key management unit and how a device engineer can use the security functionality. 


Four of the platform manufacturers provided developer support documentation and two had code examples for the secure boot process. Figure <ref> is an example of the documentation explaining how the hardware is used to achieve a security feature, while Figure <ref> is the start of the documentation for example code containing a security application template. 
The results were similar for device identity keys: five platform manufacturers providing developer support documentation and four having code examples.
We found no developer support documentation or code examples for unique per device passwords.
We also found that some of the code examples used hard-coded credentials or defaulted to a non-secure option.





  §.§.§ Data-sheets

Some platform manufacturers provide the hardware for secure development but leave it to the IoT device engineers to implement the real time OS and other features.
This provides the device engineers with the flexibility to implement what is needed for their specific requirements.
The device engineers are reliant on the technical documentation provided by the platform manufacturers, this is usually in a data-sheet.
These data-sheets do not normally provide developer guides or example code. Eight of the platform manufacturers had data-sheets that described the operation and configuration of the secure boot process. Five of them had data-sheets describing device identity keys, with nothing covering unique per device passwords.



  §.§.§ Limited security features

Platform manufacturers such as Raspberry Pi may utilise existing development platforms for the IoT market. These existing platforms may not contain a TEE and so cannot directly support some of the security requirements for this review. 



 §.§ Secure boot

The secure boot process is supported by seven out of the nine platform manufacturers.
The documentation varied widely from one manufacturer having almost no detail, to three providing developer support documentation and example code. One of these also supplied a port of a code library to support the secure boot process. Three provided an introduction to the secure boot process and why it was important. Three  manufacturers introduced a standard, in all cases this was PSA Certified <cit.> as the secure boot process is part of the level one platform certification. Platform manufacturers can use PSA Certified to demonstrate that the hardware meets an industry security certification. We did not see any reference to regulations such as the EU Cyber Resilience Act (EU-CRA) <cit.>.



 §.§ Device identity key

Device identity keys are supported by seven of the platform manufacturers; again we see a wide difference in the documentation for this security feature and how this security feature is presented to device engineers.



  §.§.§ Cloud services

Platform manufacturers that supply cloud services demonstrate the use of a device identity key as part of the cloud provisioning process.
For example, Particle implements the integration with the IoT device and the Particle cloud platform <cit.>.
Arduino delivers a simple sketch that is used to provision the IoT device with the Arduino cloud platform <cit.>.
Microchip generates a key using a PUF as part of the manufacturing process. They include multiple examples of the use of device identity keys with third party IoT cloud services such as AWS IoT Core <cit.>  or Google cloud <cit.>.



  §.§.§ Data sheets

Five platform manufacturers supply technical details of secure boot or device identity key, without providing additional developer support.
This technical documentation focuses on the hardware functionality, not how to implement services like provisioning or attestation. See Figure <ref> for an example of a data-sheet explaining the use of digital signatures using the private key to sign a message.
Figure <ref> also has the overview of the device attestation process;
the device engineer must bridge the gap from the functional definition of the hardware and software support provided by the IoT platform and the security feature to be implemented, in this case device attestation using a device identity key.





 §.§ Unique per device password

Some of the platform manufacturers did provide more general security-related development guidelines or certification programs such as PSA Certified.
These certification programs provide a framework and checklist for the IoT device engineers.
If the IoT platform is also certified, that can then support the certification of the IoT device.
Implementing the unique per device password recommendations necessitates a number of requirements:

  
  * A mechanism to generate a unique per device password, at manufacturing time, that can be stored in the IoT device firmware and affixed to the outside of the device.
  
  * A mechanism to securely store the unique per device password. The password stored in a protected or tamper-proof zone, possibly in the TEE. 
  
  * A mechanism to override the device password with a user defined password. This also requires that user password is stored securely and should meet good password recommendations such as NIST SP 800-63B <cit.>.
  
  * A mechanism to reset the device password back to the original unique per device password as part of the factory reset process.

Implementing these requirements entails understanding the IoT platform security functionality, the recommendations or regulations covering the IoT device and how the customer will use the device.
IoT device engineers may wish to take advantage of the IoT platform security functionality, such as the storage of sensitive information or the use of cryptographic functions to impalement some of the features above. 
We did not find any evidence from the platform documentation for recommendations or support for providing unique per device passwords.
Some platform manufacturers do supply tools to run at manufacturing time to write keys or other data, these could be used as a template to write a unique per device password at manufacturing time.
Some of the platforms reviewed do present hardware support for storing sensitive data, but we found no discussion around how this could be used other than for key storage.

Naiakshina et al. (2019) <cit.> asked 42 freelance developers to store a password, 17 (40%) provide a secure solution.
Acar et al. (2017) <cit.> looked at the use of cryptographical library APIs. Having a simple interface was good, but they should also include ancillary functions to help the developers use the library.
We may conclude that if we want IoT device engineers to securely store and manage passwords, we should add these ancillary functions to existing cryptographic libraries that the TEE devices already provide. 



 §.§ Device engineer support

Eight of the nine platform manufacturers are providing hardware support for some basic IoT security tasks. Five platforms include a TEE, with three others having mechanisms to support security functionality such as the secure boot process or device identity keys. Platform manufacturers are also providing cryptographic libraries or hardware acceleration, and other features such as encrypted firmware. The security features provided do vary across manufacturers. Certification programs such as PSA Certified are driving some level of conformity but this standard may not be suitable for all IoT platform manufacturers.

The technical detail, developer support and code examples provided by different platform manufacturers varies significantly across manufacturers. Five of the nine platform manufacturers provide developer support or code examples.
Platform manufacturers focus on the hardware that they deliver and the security functionality of that hardware. 
Platform manufacturers do not address the needs of device engineers that must implement regulatory requirements  such as unique per device password.



  §.§.§ Additional support provided

Platform manufacturers take different approaches to providing additional support for device engineers to take advantage of the security functionality that they deliver.
Three platform manufacturers provide cloud solutions that attempt to shield the device engineers from the implementation details of the security features.
These solutions offer features like secure boot, device identity, and provisioning within the operations of the cloud service. Two platform manufacturers provide additional functionality using libraries or APIs that makes use of the hardware. For example the TrustedFirmware-M <cit.> Initial Attestation Service Integration Guide is implemented on the Arm TrustZone <cit.>. The API delivers a set of security features that can be used by device engineers without the need to deal directly with the low level hardware.  Some manufacturers take a componentised approach, providing discrete hardware components, that an IoT device manufacture would select to best meet their individual market or technical needs.

This additional support does not extend past the security primitives, to provide support for regulatory recruitment or IoT standards recommendations. 



§ RELATED WORK

IoT security has been a research focus area for some time; Alqassem & Svetinovic (2014) <cit.> proposed a taxonomy for IoT security and privacy requirements.
As part of a systematic review, Mohanty et al. (2021) <cit.> categorised the IoT security challenges, focusing on IoT architecture and protocols.
Mishra & Pandya (2021) <cit.> reviewed the security challenges and solutions including IDS, while Mohanta et al. (2020)  considered security challenges and solutions using machine learning and block chain technology.
Much of the research looks at the technical security challenges for IoT devices; Schiller et al. (2022) <cit.> take a wide view of the overall IoT security landscape, concluding that IoT security remains a concern given issues like limited resources or the need for fast time to market, though there are now devices on the market that can make the use of IoT devices more secure.
Pinto & Santos (2019) <cit.> reviewed the introduction of the Arm TrustZone <cit.> as a TEE within the IoT market. Ling et al. (2021) <cit.> looked at the use of TrustZone for IoT devices and demonstrated how it can be used for trusted boot and remote attestation. 

Chowdhury et al. (2021) <cit.> considered the issues being faced by developers when writing security-related functionality; they defined a number of developer challenges, behaviors, and interventions as well as a set of tropes (something that is considered true, but is not).
These tropes include the notion that the developer is an expert.
They may be an expert in software engineering, but that does not necessarily make them an expert in security, cryptography or privacy.
Yskout et al. (2015) <cit.> showed that development teams did not seem to perform any better when following security design patterns and that both teams suffered from a lack of detail, for example needing to manage keys when writing encrypted storage features, suggesting the need for supporting features or ancillary code.
When using privacy by design Senarath & Arachchilage (2018) <cit.> noted that developers struggled to map privacy requirements to engineering practice.
Naiakshina et al. (2019) <cit.> asked freelance developers to store a password; even when prompted to do this securely, 38% failed to provide a secure solution.
Hallett et al. (2021) went on to show that when the participants were asked to write a specification for the function to securely store a password before writing the code, only 3% (two participants) followed the current best practice guidelines.
Acar et al. (2017) <cit.> concluded that for cryptography libraries to reduce developer errors, it was not sufficient for the library to be simple to use.
The libraries also needed to include ancillary supporting functions, documentation and example code.
Acar et al. (2016) <cit.> demonstrated that where developers get their security solutions from can affect the security of the resulting code.
Using sources such as StackOverflow can result in less secure solutions. 



§ DISCUSSION

The regulatory and standards landscape for IoT device engineers is complicated. 
Streamlining these standards is made difficult given the breadth of application areas that IoT devices are deployed in, resulting in multiple standard bodies and differing requirements.
Organizations such as PSA Certified <cit.> provide a level of guidance to IoT device manufacturers and a certification checklist to demonstrate that the IoT device and development process meets a minimal standard.
Platform manufacturers are now including a TEE within the IoT device.
These TEEs deliver a set of security primitives such as enabling a secure boot root of trust process, secure key and certificate management, and cryptographic functions.
Platform manufacturers are taking a number of different paths to address the needs of IoT device manufacturers:

  
  * Delivering cloud-hosted services that integrate with the IoT platform providing device management, provisioning and attestation.   
  
  * Integration with third-party IoT cloud services.
  
  * Integrating with existing libraries for security functionality, such as Mcuboot <cit.> or TrustedFirmware-M <cit.>. 
  
  * Providing development tools for signing images or writing keys or certificates into the IoT device.

There remains a significant gap between the hardware security features provided by a TEE and the functionality needed to follow the standards recommendations or to meet the requirements of the regulations.
Beyond the use of these security primitives, there is even less guidance for the IoT device engineers to implement regulatory requirements such as password management.



 §.§ Standards landscape


The regulatory landscape for IoT device engineers is complex, with potentially multiple different regulations to consider, depending on the market, location of  deployment, and the data being collected.
Regulators are addressing the security concerns around IoT devices by laying down a set of legal requirements for IoT device engineers to follow (Figure <ref>).
It is the responsibility of the IoT device engineer to convert these regulatory requirements into solutions that can be deployed in IoT devices within a given set of constraints including cost, power, and size. 
Mapping the regulatory requirements to existing standards or recommendations is also challenging.
The ENISA Cyber Resilience Act Requirements Standards Mapping report <cit.>, attempts to do this mapping for the EU Cyber Resilience Act (EU-CRA) <cit.>.
They conclude that there is a need for a single unified set of IoT recommendations, and that the mapping of regulatory requirements to existing standards either results in gaps or the need to refer to multiple standards. 
Looking at one example:

  “(3) On the basis of the risk assessment referred to in Article 10(2) and where applicable, products with digital elements shall:
  (a) be delivered with a secure by default configuration, including the possibility to reset the product to its original state;” <cit.>
ENISA defines sub-requirements <cit.>:

  
  * In case default configurations foresee an initial/default credential, the same should use a complex and randomly chosen password, different for each product
  
  * In case default configurations cover cybersecurity items, they should adopt a reasonable level of security for each item
  
  * The default configuration should be placed in a non-erasable memory
  
  * A function to reset the product configuration to the default one should be implemented

The sub-requirements are mapped to other existing standards:

  
  * ISO/IEC 27002 Information security, cybersecurity and privacy protection — Information security controls <cit.>
  
  * ETSI EN 303 645 Cyber Security for Consumer Internet of Things: Baseline Requirements <cit.>
  
  * ISO/IEC 18031:2011 Information technology — Security techniques — Random bit generation <cit.>.


From the example above we can trace the requirement for a unique per device password, from the regulation via standard recommendations. Multiple standards would need to be consulted to implement this security feature.
Platform manufacturers provide no support for implementing this security feature.

The PSA <cit.> is an initiative lead by Arm to define a security architecture for IoT devices.
The security model provides a set of industry best practices for IoT platforms, defining a set of minimum security features that an IoT device should conform to.
The PSA Certified program <cit.> enables IoT device manufacturers to certify their product as following this standard.
Three of the platform manufacturers reviewed are part of the PSA Certified program <cit.>.
The PSA Certified level 1 questionnaire <cit.> also includes additional requirements to map the certification to the EU Cyber Resiliency Act (EU-CRA) <cit.>.
Additionally, the level 1 requirements are also mapped to ETSI EN 303 645 <cit.>, this can be seen in Figure <ref>.
This again demonstrates the complexity of mapping regulations to standards and certifications.
This makes it difficult for both consumers and manufacturers to determine if a given regulation or standard is achieved by an IoT device.




 §.§ Effect of regulation

When reviewing the security functionality for these IoT platforms, we see that the platform manufacturers are providing the security primitives: TEE, root of trust, device identity keys, and cryptography functions. 
The regulations take a broad view, looking at the security needs for the life cycle of the IoT device, including the development process, user data, vulnerability disclosure, and security updates, etc.
These regulations define a set of processes that should be followed by the IoT device manufacturing organisations, as well as security features that will need to be implemented on the IoT device by device engineers.
Regulations may also place additional requirements on the IoT hardware, and increase the need for more processing or storage.
For example, the need to log security events (such as a failed login attempt), or to interact with authorisation protocols. 

The implementation of a regulatory requirements may need the use of these security primitives. For example, encrypting data at rest or storing passwords in the TEE.
We have seen from the example of unique per device passwords that minimal support is provided above the use of the security primitives to deliver these regulatory requirements.
There is a gap between the security provision from the platform manufacturers and the regulatory requirements.
Device engineers will need to implement these regulatory requirements themselves with the possibility that this will introduce other vulnerabilities.



  §.§.§ Cloud deployment

The IoT cloud deployments have the ability to remove much of the security detail from device engineers.
These platforms provide security services for root of trust, device identity, provisioning, and encrypted communication, as well as application features such as storage, message queues, and events.
We have seen from the review that the cloud services are delivering these security primitives.
There remains a gap between these security primitives and the regulatory requirements.
The cloud service providers have an opportunity to extend their offering to add additional regulatory functionality.



 §.§ Recommendations



  §.§.§ Standards harmonisation

Harmonising the current complexity of existing standards and recommendations would reduce confusion and misunderstanding.
Standard harmonisation could provide a single set of functional requirements that IoT manufacturers could address, and encourage a unified certification program.
Harmonisation could also minimise the mapping from government regulations to multiple different IoT standards.
Ultimately this may be beneficial to  platform manufacturers, IoT device manufacturers, and to the consumer, potentially providing a single certificating mark that a consumer would recognize as being a certified secure device.
ETSI EN 303 645 <cit.> has been identified as a possible starting point for a single harmonised standard across the EU <cit.>.
The PSA Certified program <cit.> is attempting to take multiple standards and regulations into account. 
Continuing this work could make progress towards a harmonised standard, but work would be needed from multiple other regulators and standard bodies.



  §.§.§ Secure example code

We find that developer support remains inconsistent across different platform manufacturers, with minimal step-by-step guides and code examples to implement a security feature.
We would encourage platform manufacturers to include more code examples.
These code examples should follow security best practices, and should not default to low or non-secure implementations. 
Platform manufacturers could also include code examples to implement specific standards recommendations.
For example, platform manufacturers that are PSA Certified could also include code examples for PSA Certified requirements, such as ID storage, password best practices, or security configuration.
This would aid device engineers in achieving PSA certification for their IoT device. It would also encourage the device engineers to follow the platform manufacturers' security coding practices and potentially provide a library of standards-based security functionality.
This would make it easier for device engineers to gain certification, which is also in the best interests of the platform manufacturers, as this will help to drive the selection of the IoT platform.



  §.§.§ Software, and auxiliary code

Platform manufacturers are already taking advantage of third-party or open source software such as FreeRTOS <cit.> or TrustedFirmware-M <cit.> to provide functionality for IoT devices.
This model could be extended to deliver functionality for regulatory requirements, for example by providing a library for password management and storage.
The IoT platform manufacturer would be responsible for porting a set of libraries to their platform and keeping them up to date.
While this is additional work for the platform manufacturer, there is an  advantage; this would reduce the development cost of a new IoT device, making the IoT platform commercially more attractive, potentially  increasing thier market share.
From a security perspective, if these libraries are open to security scrutiny or certification, they may reduce the opportunity for additional vulnerabilities when implementing the regulatory requirements, and so have a positive impact of IoT device security.



 §.§ Future work

Further research is needed to map the existing IoT platform security features to the relevant regulations, to highlight the remaining areas that will need to be addressed.
This could also include a mapping of regulations to any existing software solutions. These existing solutions could be adopted by platform manufacturers to support device engineers when implementing specific regulations.
This paper has only looked at a small selection of  security features from the standards. Further research could look to extend this beyond the baseline security recommendations and also consider how device engineers are supported when needing to implement privacy features.
Research has already looked at the usability of cryptographic APIs <cit.>, this research could be extended to the usability of the cryptographic APIs provided by platform manufacturers and TEEs. 
A further study could be conducted with device engineers to understand how they translate the technical documentation found in data sheets to security regulation requirements. Potential research questions could be: 

  
  * What issues do device engineers find when translating technical data sheets to security features?
  
  * Where do device engineers go to get examples of good security practices?
  
  * What could be done to make this translation easier?

Researchers have previously looked at the software development process and testing frameworks. This research could be extended to consider the following questions:

  
  * How well does IoT device development integrate into existing software development processes? 
  
  * Do existing testing frameworks extend to IoT development? 




§ CONCLUSIONS

We find that platform manufacturers are providing features for device engineers to implement basic IoT security features. These security primitives include: TEE, the secure boot process, device identity keys, and cryptography functions (RQ1).
The platform manufacturers do not go beyond the security primitives to support device engineers to deliver regulatory requirements such as unique per device passwords.
The level of detail found in the documentation for these features varies depending on the manufacturer. Most manufacturers focus on the hardware functionality, and not how a device engineer can use the functionality to deliver a specific security feature. 
Six of the nine IoT platforms reviewed provided some additional support to help device engineers to use these security features correctly (RQ2). These manufacturers provided developer documentation, step-by-step guides or example code.
Some of the sample code included hard coded credentials or defaulted to a less or non-secure implementation.
Three of the platform manufacturers have a PSA Certification <cit.> for the device we reviewed.
We find no evidence for discussions of IoT standards such as ETSI EN 303 645 <cit.> or regulations such as the EU Cyber Resiliency Act (EU-CRA) <cit.> within the platform manufacturers' technical documentation or developer support material. 
The platform manufacturers take different approaches to support device engineers to take advantage of basic security features (RQ3):

  
  * Cloud services deployment
  
  * OS and security features support
  
  * Data-sheets
  
  * Limited security features

We find that even when the hardware supports a security feature, there is limited guidance for IoT device engineers. Device engineers are required either to use the cloud implementation or become a security expert. 
We find a complex standards and regulatory landscape for platform manufacturers and IoT device engineers to navigate. 
Platform manufacturers provide no support for other regulatory requirements, such as unique per device passwords.
We conclude that the platform manufacturers, regulators and standards bodies will need to do considerably more to support IoT device engineers if we wish to improve the security outcomes of IoT devices.

acm

