A Novel MQTT 5.0-Based Over-the-Air Updating Architecture Facilitating Stronger Security
Abstract
:1. Introduction
2. Related Work
3. Preliminaries of MQTT 5.0 New Features and of OTA General Architecture
3.1. New Features of MQTT 5.0
- Enhanced authentication. The enhanced authentication framework consists of a new framework and some APIs for users to design and implement their MQTT-aware authentication schemes. New fields are introduced to specify the authentication method (we denote it as auth_id in this paper) and to share the authentication data (denoted as auth_data). A new API called AUTH, accompanied by the existent CONNECT/CONNACK API with new fields (auth_id and auth_data), is used to negotiate the specified authentication method with the authentication data auth_data. Figure 1 shows the protocol stack of the enhanced authentication framework.
- User properties. “User properties” is a new field used to covey user-defined metadata among publishers, brokers, and subscribers. A user-defined metadata is a UTF-8 (key, value) pairs. For example, PUBLISH(topic = ‘Publisher/Pub1’, retain = TRUE, UserProperties = {“ClientId:Pub1”, “Certificate: Pub1.cert”, …}; the retain flag = TRUE indicates to the broker to keep this message until the next PUBLISH message with “retain = TRUE”; this setting lets the broker deliver this message to those clients which connect online later.
- Request–response interaction via response topic. MQTT 5.0’s “ResponseTopic” property facilitates the implementation of the conventional request–response interaction much more easily in MQTT 5.0. A PUBLISH packet or a CONNECT packet can specify ResponseTopic (an optional UTF-8 string) to notify its peers to respond their messages in the specified topic.
- Correlation data. This optional binary data is accompanied with the specified response topic to synchronize their communications between a requestor and a responder.
3.2. OTA Architectures
- Stage 1. The application manager who is responsible for maintaining the firmware/software/key-updating process can create a code-signing certificate; in this case, the manager delegates his signing authority to the AWS platform which signs the files on behalf of the manager. The other option on AWS allows the user to sign the image files on his local computers and then later sends the images files and the signatures to the AWS platform.
- Stage 2. The manager prepares the files to be downloaded by IoT devices, and send the files and the related meta data to the AWS server.
- Stage 3. The AWS server creates an IoT–OTA job which manages the related files, sends the messages through a particular MQTT topic (we can view a MQTT topic as a particular channel here), and maintains the communications and the records.
- Stage 4. A specialized software on those designated IoT devices would communicate with the AWS server to handle the OTA messages and the files via the MQTT interactions. Note that, on the left side of the figure, the CoreMQTT represents the basic MQTT capacity on the IoT devices to handle basic MQTT interactions, while the OTA update agent is the software responsible for handling the OTA tasks.
4. New OTA Model Using MQTT 5.0
4.1. The Overview of the Model and the Topic Tree Design
4.2. The Message Flows of the End2End Building and the OTA Phase
- The inner-channel establishment phase
- The OTA update phase
5. Security Analysis, Performance Evaluation, and Future Works
5.1. Analysis of the Security
5.2. Evaluation of the Performance
5.3. Discussion of Future Works
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Hamdy, K. Over-the-Air (OTA) Updates: What Is It and How to Do It Simply, Efficiently with ZDM. Available online: https://itskarim.medium.com/over-the-air-ota-updates-what-is-it-and-how-to-do-it-simply-efficiently-with-zdm-db613ea29678 (accessed on 30 August 2022).
- Afaneh, M. Implementing Over-the-Air Device Firmware Update (OTA DFU)—Part 1. Available online: https://www.novelbits.io/ota-device-firmware-update-part-1/ (accessed on 30 August 2022).
- Wikipedia. Over-the-Air Programming. Available online: https://en.wikipedia.org/wiki/Over-the-air_programming (accessed on 30 August 2022).
- ISO/IEC 20922:2016, Information Technology—Message Queuing Telemetry Transport (MQTT) v3.1.1. Available online: https://www.iso.org/standard/69466.html (accessed on 25 March 2022).
- OASIS, MQTT Version 5.0. 7 March 2019. Available online: https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html (accessed on 1 April 2022).
- Amazon. How to Perform Secondary Processor Over-the-Air Updates with FreeRTOS. Available online: https://aws.amazon.com/tw/blogs/iot/how-to-perform-secondary-processor-over-the-air-updates-with-freertos/ (accessed on 30 August 2022).
- Amazon. AWS IoT Over-the-Air Update. Available online: https://aws.github.io/amazon-freertos/202107.00/embedded-csdk/libraries/aws/ota-for-aws-iot-embedded-sdk/docs/doxygen/output/html/ota_design.html (accessed on 30 August 2022).
- HiveMQ Homepage. Enhanced Authentication. Available online: https://www.hivemq.com/blog/mqtt5-essentials-part11-enhanced-authentication/ (accessed on 2 April 2022).
- HiveMQ Homepage. User Properties—MQTT 5 Essentials Part 6. Available online: https://www.hivemq.com/blog/mqtt5-essentials-part6-user-properties/ (accessed on 24 March 2022).
- Steve Internet Guide. Understanding and Using MQTT v5 Request Response. Available online: http://www.steves-internet-guide.com/mqttv5-request-response/ (accessed on 14 March 2022).
- Lesjak, C.; Hein, D.; Hofmann, M.; Maritsch, M.; Aldrian, A.; Priller, P.; Ebner, T.; Ruprechter, T.; Pregartne, G. Securing Smart Maintenance Services: Hardware-Security and TLS for MQTT. In Proceedings of the 2015 IEEE 13th International Conference on Industrial Informatics (INDIN), Cambridge, UK, 22–24 July 2015; pp. 1243–1250. [Google Scholar]
- Andy, S.; Rahardjo, B.; Hanindhito, B. Attack Scenarios and Security Analysis of MQTT Communication Protocol in IoT System. In Proceedings of the EECSI 2017, Yogyakarta, Indonesia, 19–21 September 2017; pp. 19–21. [Google Scholar]
- Firdous, S.N.; Baig, Z.; Valli, C.; Ibrahim, A. Modelling and Evaluation of Malicious Attacks against the IoT MQTT Protocol. In Proceedings of the 2017 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Exeter, UK, 21–23 June 2017; pp. 748–755. [Google Scholar]
- Singh, M.; Rajan, M.A.; Shivraj, V.L.; Balamuralidhar, P. Secure MQTT for internet of things (iot). In Proceedings of the 2015 Fifth International Conference on Communication Systems and Network Technologies, Gwalior, India, 4–6 April 2015; pp. 746–751. [Google Scholar]
- Rizzardi, A.; Sicari, S.; Miorandi, D.; Coen-Porisini, A.O. AUPS: An Open Source Authenticated Publish/Subscribe system for the Internet of Things. Inf. Syst. 2016, 62, 9–41. [Google Scholar] [CrossRef]
- Neisse, R.; Steri, G.; Baldini, G. Enforcement of security policy rules for the internet of things. In Proceedings of the 2014 IEEE 10th International Conference on Wireless and Mobile Computing, Networking and Communications (WiMob), Larnaca, Cyprus, 8–10 October 2014; pp. 165–172. [Google Scholar]
- Shin, S.H.; Kobara, K. Efficient Augmented Password-Only Authentication and Key Exchange for IKEv2. IETF RFC 6628, Experimental. June 2012. Available online: https://tools.ietf.org/rfc/rfc6628.txt (accessed on 5 February 2022).
- Chien, H.Y.; Chen, Y.J.; Qiu, G.H.; Liao, J.F.; Hung, R.W.; Kou, X.A.; Lin, P.C.; Chiang, M.L.; Su, C.H. A MQTT-API-Compatible IoT Security-Enhanced Platform. Int. J. Sens. Netw. 2020, 32, 54–68. [Google Scholar] [CrossRef]
- Chien, H.-Y.; Lin, P.C.; Chiang, M.L. Efficient MQTT Platform Facilitating Secure Group Communication. J. Internet Technol. 2020, 21, 1929–1940. [Google Scholar]
- Chien, H.Y.; Qiu, G.H.; Hung, R.W.; Shih, A.T.; Su, C.H. Hierarchical MQTT with Edge Computation. In Proceedings of the 10th International Conference on Awareness Science and Technology (iCAST 2019), Morioka, Japan, 23–25 October 2019; pp. 1–5. [Google Scholar]
- Mektoubi, A.; Lalaoui, H.; Belhadaoui, H.; Rifi, M.; Zakari, A. New approach for securing communication over MQTT protocol A comparison between RSA and Elliptic Curve. In Proceedings of the 2016 Third International Conference on Systems of Collaboration (SysCo), Casablanca, Morocco, 8–29 November 2016. [Google Scholar]
- Lee, H.; Lim, J.; Kwon, T. MQTLS: Toward Secure MQTT Communication with an Untrusted Broker. In Proceedings of the 2019 International Conference on Information and Communication Technology Convergence (ICTC), Jeju, Korea, 16–18 October 2019; pp. 53–58. [Google Scholar]
- Ciou, P.-P.; Chien, H.-Y. An Implementation of Challenge-Response Authentication for MQTT 5.0 IoT System. In Proceedings of the 2021 International Conference on Emerging Industry and Health Promotion (EIHP2021), Puli, Taiwan, 3–4 July 2021. [Google Scholar]
- Chien, H.-Y. Design of End-to-End Security for MQTT 5.0. In Proceedings of the 4th International Conference on Science of Cyber Security—SciSec 2022, Matsue City, Japan, 10–12 August 2022. [Google Scholar]
- FreeRTOS. freeRTOS Running OTA over MQTT. Available online: https://www.freertos.org/ota/ota-mqtt-agent-demo.html (accessed on 30 August 2022).
- Last Minute Engineers Website. ESP32 Basic Over The Air (OTA) Programming in Arduino IDE. Available online: https://lastminuteengineers.com/esp32-ota-updates-arduino-ide/ (accessed on 30 August 2022).
- Ahmed, W.; Rasool, A.; Javed, A.R.; Kumar, N.; Gadekallu, T.R.; Jalil, Z.; Kryvinska, N. Security in Next Generation Mobile Payment Systems: A Comprehensive Survey. IEEE Access 2021, 9, 115932–115950. [Google Scholar] [CrossRef]
Properties | Target at MQTT 3.1 or 5.0 | Goals & Functions | MQTT-Standard Compatible | E2E Security | OTA Support | |
---|---|---|---|---|---|---|
Scheme | ||||||
Lesjak et al. [11] | 3.1 | TLS-embedded hardware | Yes | No | No | |
[12,13,14,15,16,17] | 3.1 | Customized key agreement | No | No | No | |
[18,19,20] | 3.1 | Customized key agreement | Yes | No | No | |
Lee et al. [22] | 3.1 | Customized key agreement | No | Yes | No | |
Ciou–Chien [23] | 5.0 | Customized key agreement | Yes | No | No | |
Chien [24] | 5.0 | Customized key agreement | Yes | Yes | No | |
Ours | 5.0 | Customized key agreement OTA scheme | Yes | Yes | Yes |
P1.Cert, S1.Cert | P1.Cert denotes Publisher P1’s certificate; S1.Cert denotes S1’s certificate. P1.Cert has the public key as ; S1.Cert has its public key as . Here we eliminate the specification of the underlying fields, and any secure fields like Elliptic Curve Cryptographies could be used. |
The End-to-End session keys between publisher-subscriber E2E session key. Here, . | |
Enckey[],Deckey[] | Encryption/Decryption using the key key. |
(a) The security performance comparison | ||||
Properties | E2E security | Which entity distributes E2E key | Privacy support of firmware update against the broker | |
Scheme | ||||
Ours | Yes | Publisher | Yes | |
AWS | No | NO | No | |
(b) The communication performance comparison of the proposed scheme | ||||
Properties | Number of MQTT interactions in the second phase | Number of MQTT interactions in the third phase | ||
Scheme | ||||
Ours | 6 | 6 | ||
AWS | Not applicable 1 | 15 2,3 | ||
(c) The computation performance comparison of the proposed scheme | ||||
Properties | Computations of MQTT interactions in the second phase | Computations of MQTT interactions in the third phase | ||
Scheme | ||||
Ours | 6 encryptions + 1 modular exponentiation | 6 encryptions | ||
AWS | Not applicable 4 | 15 encryption 5 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Chien, H.-Y.; Wang, N.-Z. A Novel MQTT 5.0-Based Over-the-Air Updating Architecture Facilitating Stronger Security. Electronics 2022, 11, 3899. https://doi.org/10.3390/electronics11233899
Chien H-Y, Wang N-Z. A Novel MQTT 5.0-Based Over-the-Air Updating Architecture Facilitating Stronger Security. Electronics. 2022; 11(23):3899. https://doi.org/10.3390/electronics11233899
Chicago/Turabian StyleChien, Hung-Yu, and Nian-Zu Wang. 2022. "A Novel MQTT 5.0-Based Over-the-Air Updating Architecture Facilitating Stronger Security" Electronics 11, no. 23: 3899. https://doi.org/10.3390/electronics11233899
APA StyleChien, H.-Y., & Wang, N.-Z. (2022). A Novel MQTT 5.0-Based Over-the-Air Updating Architecture Facilitating Stronger Security. Electronics, 11(23), 3899. https://doi.org/10.3390/electronics11233899